MenuSizeConfiguration class
Defines the size constraints of the Menu and behavior of Size in certain conditions.
Constraints must be provided, these can be in the form of screen fractions, logical pixels or mixed.
See related example here.
Constructors
- MenuSizeConfiguration({double? maxWidthFraction, double? maxHeightFraction, double? minWidthFraction, double? minHeightFraction, double? minWidth, double? minHeight, double? maxWidth, double? maxHeight, double? width, double? height, double? widthFraction, double? heightFraction, bool enforceMinWidthToMatchTrigger = false, bool enforceMaxWidthToMatchTrigger = false, bool requestConstantHeight = false, bool requestAvoidBottomInset = true})
-
const
Properties
- enforceMaxWidthToMatchTrigger → bool
-
Defines if the menu's maximum width should be forced to match the width of
the button for the menu.
final
- enforceMinWidthToMatchTrigger → bool
-
Defines if the menu's minimum width should be forced to match the width of
the button for the menu.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Preferred Height of menu in logical pixels.
final
- heightFraction → double?
-
Preferred Height of menu in fraction (0.0 - 1.0 inclusive) of screen height.
final
- maxHeight → double?
-
Maximum height of menu in logical pixels.
final
- maxHeightFraction → double?
-
Maximum fraction (0.0 - 1.0 inclusive) of screen height the menu should take.
final
- maxWidth → double?
-
Maximum width of menu in logical pixels.
final
- maxWidthFraction → double?
-
Maximum fraction (0.0 - 1.0 inclusive) of screen width the menu should take.
final
- minHeight → double?
-
Minimum height of menu in logical pixels.
final
- minHeightFraction → double?
-
Minimum fraction (0.0 - 1.0 inclusive) of screen height the menu should take.
final
- minWidth → double?
-
Minimum width of menu in logical pixels.
final
- minWidthFraction → double?
-
Minimum fraction (0.0 - 1.0 inclusive) of screen width the menu should take.
final
- requestAvoidBottomInset → bool
-
Defines if the menu should avoid Inset on the bottom, typically caused by
the opened keyboard.
final
- requestConstantHeight → bool
-
Defines if the menu's height should be forced to remain consistent,
disregarding the available space and position.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → double?
-
Preferred Width of menu in logical pixels.
final
- widthFraction → double?
-
Preferred Width of menu in fraction (0.0 - 1.0 inclusive) of screen width.
final
Methods
-
getConstraints(
Size triggerSize, Size screenSize) → BoxConstraints - Returns BoxConstraints calculated from the configuration.
-
getPreferredSize(
Size screenSize) → Size? - Returns Size calculated from the configuration.
-
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