MoyeWidgetExtension extension
- on
Properties
- asSliver → SliverToBoxAdapter
-
sliver extensions for widget (converts a widget to sliver)
no setter
- expanded → Expanded
-
Wrap this widget with a Expanded Widget
no setter
Methods
-
expandedWith(
int flex) → Expanded -
Wrap this widget with a Expanded Widget and specify a
flex
for it -
onTap(
{VoidCallback? onTap}) → Widget - Detect taps on a widget easily
-
rotate(
int quarterTurns) → Widget - The number of clockwise quarter turns the child should be rotated.
-
withAspectRatio(
{required double aspectRatio}) → Widget -
Show the widget with the given
aspectRatio
-
withConstraints(
BoxConstraints constraints) → Widget -
Wrap this widget with a ConstrainedBox, and set it's constraints to
constraints
-
withFlexible(
{int flex = 1, FlexFit fit = FlexFit.loose}) → Widget - Wraps this inside a Flexible
-
withHeight(
double? height) → Widget -
Set the height of this widget set to
height
by wrapping it inside a SizedBox -
withMinHeight(
double minHeight) → Widget -
Set the min height of this widget to
minHeight
by wrapping it inside a ConstrainedBox -
withMinWidth(
double minWidth) → Widget -
Set the min width of this widget to
minWidth
by wrapping it inside a ConstrainedBox -
withPadding(
EdgeInsetsGeometry padding) → Widget - Wrap this widget with a padding for a given EdgeInsetsGeometry
-
withRoundCorners(
{BoxBorder? border, BorderRadius? borderRadius}) → Widget -
Makes this widget have round corners. You could also specify
border
-
withSize(
{double? width, double? height}) → Widget - Give a size to this widget
-
withSliverPadding(
EdgeInsetsGeometry padding) → Widget - Wrap this widget with a sliver padding for a given EdgeInsetsGeometry
-
withWidth(
double? width) → Widget -
Set the width of this widget set to
width
by wrapping it inside a SizedBox