AspectRatioItem class
The AspectRatioItem
class represents an item with an aspect ratio value and an
optional text description. It is commonly used to define aspect ratio options for
widgets or components that require a specific aspect ratio.
Usage:
AspectRatioItem aspectRatioOption = AspectRatioItem(
value: 16 / 9, // Aspect ratio value (e.g., 16:9)
text: 'Wide Screen', // Optional text description
);
Properties:
-
text
: The text description for this aspect ratio item, which is typically used to provide a label or description for the aspect ratio. -
value
: The numerical value representing the aspect ratio. It is expressed as a double value, e.g., 16:9 is represented as16 / 9
. This property is optional but commonly used when setting aspect ratios for widgets.
Example Usage:
AspectRatioItem aspectRatioOption = AspectRatioItem(
value: 16 / 9, // Aspect ratio value (e.g., 16:9)
text: 'Wide Screen', // Optional text description
);
Constructors
- AspectRatioItem.new({double? value, required String text})
-
Creates an instance of the
AspectRatioItem
class with the specified properties.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited