MenuSizeConfiguration constructor
const
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,
Implementation
const MenuSizeConfiguration({
this.maxWidthFraction,
this.maxHeightFraction,
this.minWidthFraction,
this.minHeightFraction,
this.minWidth,
this.minHeight,
this.maxWidth,
this.maxHeight,
this.width,
this.height,
this.widthFraction,
this.heightFraction,
this.enforceMinWidthToMatchTrigger = false,
this.enforceMaxWidthToMatchTrigger = false,
this.requestConstantHeight = false,
this.requestAvoidBottomInset = true,
}) : assert(minWidth != null || minWidthFraction != null,
'''No minimum width provided.
At least one of minWidth or minWidthFraction must not be null.'''),
assert(maxWidth != null || maxWidthFraction != null,
'''No maximum width provided.
At least one of maxWidth or maxWidthFraction must not be null.'''),
assert(minHeight != null || minHeightFraction != null,
'''No minimum height provided.
At least one of minHeight or minHeightFraction must not be null.'''),
assert(maxHeight != null || maxHeightFraction != null,
'''No maximum height provided.
At least one of maxHeight or maxHeightFraction must not be null.'''),
assert(
(maxWidthFraction == null ||
minWidthFraction == null ||
maxWidthFraction >= minWidthFraction) &&
(maxHeightFraction == null ||
minHeightFraction == null ||
maxHeightFraction >= minHeightFraction),
"Max Width and Max Height should be lesser or equal to Min Width and Min Height respectively.\n"
"AKA, the contrainsts should be normalized.\n"),
assert(minWidth == null || maxWidth == null || minWidth <= maxWidth,
"""minWidth should be less than or equal to maxWidth."""),
assert(minHeight == null || maxHeight == null || minHeight <= maxHeight,
"""minHeight should be less than or equal to maxHeight.""");