iframe class final

The <iframe> HTML element represents a nested browsing context, embedding another HTML page into the current one.

Inheritance

Constructors

iframe(List<Component> children, {required String src, String? allow, String? csp, MediaLoading? loading, String? name, String? sandbox, ReferrerPolicy? referrerPolicy, int? width, int? height, String? id, String? classes, Styles? styles, Map<String, String>? attributes, Map<String, EventCallback>? events, Key? key})
The <iframe> HTML element represents a nested browsing context, embedding another HTML page into the current one.
const

Properties

allow → String?
Specifies a feature policy for the <iframe>. The policy defines what features are available to the <iframe> based on the origin of the request (e.g. access to the microphone, camera, battery, web-share API, etc.).
final
attributes → Map<String, String>?
Additional attributes to apply to the HTML element.
final
children → List<Component>
The children of this component.
final
classes → String?
The CSS classes to apply to the HTML element, separated by whitespace.
final
csp → String?
A Content Security Policy enforced for the embedded resource.
final
events → Map<String, EventCallback>?
Event listeners to attach to the HTML element.
final
hashCode → int
The hash code for this object.
no setterinherited
height → int?
The height of the frame in CSS pixels. Default is 150.
final
id → String?
The id of the HTML element. Must be unique within the document.
final
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
loading → MediaLoading?
Indicates how the browser should load the iframe.
final
name → String?
A targetable name for the embedded browsing context. This can be used in the target attribute of the <a>, <form>, or <base> elements; the formtarget attribute of the <input> or <button> elements; or the windowName parameter in the window.open() method.
final
referrerPolicy → ReferrerPolicy?
Indicates which referrer to send when fetching the frame's resource.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sandbox → String?
Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions.
final
src → String
The URL of the page to embed. Use a value of about:blank to embed an empty page that conforms to the same-origin policy. Also note that programmatically removing an <iframe>'s src attribute (e.g. via Element.removeAttribute()) causes about:blank to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS.
final
styles → Styles?
The inline styles to apply to the HTML element.
final
width → int?
The width of the frame in CSS pixels. Default is 300.
final

Methods

build(BuildContext context) → Component
Describes the part of the user interface represented by this component.
override
createElement() → Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) → bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited