GSize class

A value defines size in view area.

see different sizeType defined in GSizeValueType.

Inheritance

Constructors

GSize.custom(double sizeValue, GViewSizeConvertor? viewSizeConverter, GViewSizeConvertor? viewSizeConverterReverse)
Create a size value with sizeValue calculated by a user defined custom function.
GSize.pointSize(double size)
Create a size value with size as points in point viewport.
GSize.valueSize(double size)
Create a size value with size as value in view area.
GSize.viewHeightRatio(double ratio)
Create a size value with ratio as ratio of view height which is view height * ratio.
GSize.viewMaxRatio(double ratio)
Create a size value with ratio as ratio of max of view width and height which is max(view width, view height) * ratio.
GSize.viewMinRatio(double ratio)
Create a size value with ratio as ratio of min of view width and height which is min(view width, view height) * ratio.
GSize.viewSize(double size)
Create a size value with size as view size.
GSize.viewWidthRatio(double ratio)
Create a size value with ratio as ratio of view width which is view width * ratio.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeType GSizeValueType
defines the type of the value.
final
sizeValue double
size value with meaning defined by sizeType.
no setter
validator bool Function(double)
finalinherited
value double
The current value stored in this notifier.
getter/setter pairinherited
viewSizeConverter GViewSizeConvertor?
The converter function to convert a value to view size in view area.
final
viewSizeConverterReverse GViewSizeConvertor?
The converter function to convert view size back to specified size type value.
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
copyFromViewSize({required double viewSize, required Rect area, required GPointViewPort pointViewPort, required GValueViewPort valueViewPort}) GSize
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited
toViewSize({required Rect area, required GPointViewPort pointViewPort, required GValueViewPort valueViewPort}) double
Convert the size value to view size.

Operators

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