View class

Implemented types
Implementers

Constructors

View.borrowed(int nativeHandle)
Wraps a handle owned elsewhere; releasing it stays the owner's job.
View.fromHandle(int nativeHandle)
Adopts a handle returned by the C API and releases it when this object becomes unreachable.

Properties

alignment ↔ ViewAlignment
getter/setter pair
backend → ViewBackend
no setter
backgroundColor ↔ Color
getter/setter pair
flex ↔ double
getter/setter pair
frame ↔ Rectangle
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
id → int
no setter
intrinsicSize → Size
no setter
isEnabled ↔ bool
getter/setter pair
isFocused → bool
no setter
isUpdatePending → bool
no setter
isVisible ↔ bool
getter/setter pair
layout ↔ ViewLayout
getter/setter pair
nativeHandle → int
The underlying handle-table entry.
final
nativeObject → Pointer<Void>
Platform-specific native object behind this handle.
no setter
padding ↔ EdgeInsets
getter/setter pair
parent → View?
no setter
preferredSize ↔ Size
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spacing ↔ double
getter/setter pair
subviewCount → int
no setter
subviews → List<View>
no setter
tooltip ↔ String?
getter/setter pair
window → Window?
no setter

Methods

addListener(FutureOr<void> callback(ViewEvent)) → ListenerId
Registers callback for every ViewEvent this View emits.
addSubview(View? subview) → void
blur() → void
cancelUpdate() → void
clearSubviews() → void
dispose() → void
Releases the handle now instead of at collection.
focus() → void
getSubviewAt(int index) → View?
insertSubview(int index, View? subview) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(ListenerId listenerId) → bool
Unregisters a listener. Returns false if unknown.
removeSubview(View? subview) → bool
removeSubviewAt(int index) → bool
requestUpdate() → bool
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

beginUpdates() → void
create() → View?
Creates a new View; returns null if the native side failed.
createWithNativeView(Pointer<Void> nativeView) → View?
Creates a new View; returns null if the native side failed.
endUpdates(bool redraw) → void
getDefaultBackend() → ViewBackend
isBackendSupported(ViewBackend backend) → bool
isSupported() → bool
isUpdating() → bool
setDefaultBackend(ViewBackend backend) → bool