assorted_layout_widgets library

Classes

AllowedCharsTextInputFormatter
AllowedCharsTextInputFormatter is a TextInputFormatter that allows only characters that match the given allowedPattern.
AlwaysAtTheEndTextInputFormatter
AlwaysAtTheEndTextInputFormatter is a TextInputFormatter that forces the cursor to always stay at the end of what is being typed.
AnimatedBetween
Animates smoothly between two children, cross-fading their content while resizing the enclosing box. The old and new children can differ in both width and height; their sizes do not need to be known in advance — they are measured as they lay out.
BlinkingCursorState
Box
BoxAnimatingWidth
This widget is meant only to be used for layout demonstrations of other widgets.
Button
Transforms any widget in a button, with visual feedback in the onPointerDown. The widget must be created with a builder of type ButtonBuilder, which provides an isPressed boolean to indicate whether the button is pressed or not.
ButtonBarSuper
CapitalizationTextInputFormatter
CapitalizationTextInputFormatter is a TextInputFormatter that capitalizes text as the user types, according to the specified Capitalize option:
CaptureGestures
All touches in the child will be captured and ignored.
CircleButton
Circular button, similar to IconButton, but with the following differences:
ColumnSuper
Given a list of children widgets, this will arrange them in a column. It can overlap cells, add separators and more.
Delayed
This widget can be used with implicitly animated widgets to give it an initial value, and then quickly change it to another.
DetectScroll
The DetectScroll can detect if the content of a Scrollable is larger than the Scrollable itself, which means that the content can be scrolled, and that a scrollbar is likely visible. It can also tell you the probable width of that scrollbar.
Email
EmailTextInputFormatter
While the user types an email address, this input formatter removes some obviously invalid characters from the input. It does not check if the email address is complete or valid. Note, you should not use this input formatter if you want to allow the user to type anything just to check the validity of the email address only when they finish typing.
FitHorizontally
The child will be asked to define its own intrinsic height. If fitsHeight is true, the child will be proportionately resized (keeping its aspect ratio) to fit the available height.
FixedWidth
The FixedWidth widget gives a child of RowProportional an immutable width, that never scales and does not participate in the proportional distribution of space. The fixed widths are carved out of the available space first, and only the remaining space is distributed between the other children.
GlobalStringKey
Global-key that uses equals operator == of the String value to identify the key.
GlobalValueKey<T extends State<StatefulWidget>>
Global-key that uses equals operator == of the keyValue to identify the key.
KeepTallest
Widget KeepTallest tracks its child's height and never visually shrinks its own height below the tallest height observed so far. Growing is always instantaneous.
Keyboard
Widget Keyboard must be placed near the top of the widget tree, where it has the same size as the screen, for example, in MaterialApp.builder, above any Scaffold. For example:
KeyboardDismiss
The KeyboardDismiss widget is DEPRECATED. Use Keyboard instead.
KeyboardSwitch
KeyboardSwitch renders different content depending on whether the system keyboard is open or closed.
MaskFunctionTextInputFormatter
A TextInputFormatter based on the maskFunction formatter, for using in TextFields.
NonUniformOutlineInputBorder
Draws a rounded rectangle around an InputDecorator's container.
NonUniformRoundedRectangleBorder
A rectangular border with rounded corners.
NormalizedOverflowBox
A widget that imposes different constraints on its child than it gets from its parent, possibly allowing the child to overflow the parent.
NoSpacesTextInputFormatter
NoSpacesTextInputFormatter is a TextInputFormatter that prevents the user from typing any spaces (including tabs and newlines). It removes all whitespace characters from the input.
NumbersTextInputFormatter
NumbersTextInputFormatter is a TextInputFormatter that allows only numbers to be typed, with four options:
OtpCodeVerificationField
Widget OtpCodeVerificationField is a verification code field, used for one-time-password (OTP) flows such as confirming an email address or a phone number.
Pad
Pad is an EdgeInsetsGeometry which is easy to type and remember. It can be used in all widgets that accept padding, like Container, Padding and Box.
RenderConstrainedNormalizedOverflowBox
RenderFitHorizontally
RenderRowSpacer
RowProportional
The RowProportional widget arranges its children horizontally, dividing all the available horizontal space between them, proportionally to their preferred (natural, intrinsic) widths.
RowProportionalParentData
Parent data for use with RowProportional.
RowSpacer
RowSuper
Given a list of children widgets, this will arrange them in a row. It can overlap cells, add separators and more.
ScrollShadow
A widget that adds shadows to the top and bottom edges of a scrollable area to visually indicate overflow content.
SideBySide
The SideBySide widget arranges its children widgets horizontally, achieving a layout that is not possible with Row or RowSuper widgets.
SquircleBorder
A rounded-rectangle shape — a "squircle" — where two things are chosen independently: how big the corners are, and how the corner curve looks.
StringDotLengthLimiterTextInputFormatter
StringDotLengthLimiterTextInputFormatter is a TextInputFormatter that limits text by String.length, not user-perceived characters (grapheme clusters).
SuperRadius
Ready-made values for SquircleBorder.superRadius, the number that controls how the corner curve looks.
TextOneLine
TextOneLine was a substitute for Text when maxLines is 1.
ThousandsSeparatorTextInputFormatter
The ThousandsSeparatorTextInputFormatter is a TextInputFormatter that formats numeric input with thousands separators while the user types, and preserves the caret or selection as naturally as possible.
TimeBuilder
Very efficient timer, which rebuilds only when needed:
WrapSuper

Enums

AnimatedBetweenMode
Controls how each child of AnimatedBetween fills the animated box during a transition.
Arrow
Capitalize
OtpCodeLetterCasing
How letters typed into the OtpCodeVerificationField are normalized.
OtpCodeLetterSet
Which alphabet of characters is accepted by the OtpCodeVerificationField.
OtpCodeType
Which characters are accepted by the OtpCodeVerificationField.
ShadowVisibility
The ShadowVisibility defines the behavior of shadows applied to the top and bottom edges of a scrollable widget, based on the scroll state and content dimensions. This applies independently to the top and bottom edges, allowing different shadow behaviors for each.
WrapFit
WrapSuperAlignment
WrapType

Functions

showCupertinoDialogSuper<T>({required BuildContext context, required WidgetBuilder builder, bool barrierDismissible = true, Color? barrierColor = Colors.black54, String? barrierLabel, bool useSafeArea = true, bool useRootNavigator = true, RouteSettings? routeSettings, void onDismissed(T?)?}) Future<T?>
Displays an iOS-style dialog above the current contents of the app, with iOS-style entrance and exit animations, modal barrier color, and modal barrier behavior (by default, the dialog is not dismissible with a tap on the barrier).
showDialogSuper<T>({required BuildContext context, required WidgetBuilder builder, bool barrierDismissible = true, Color? barrierColor = Colors.black54, String? barrierLabel, bool useSafeArea = true, bool useRootNavigator = true, RouteSettings? routeSettings, void onDismissed(T?)?}) Future<T?>
Displays a Material dialog above the current contents of the app, with Material entrance and exit animations, modal barrier color, and modal barrier behavior (dialog is dismissible with a tap on the barrier).

Typedefs

ButtonBuilder = Widget Function({required bool isPressed})
CircleButtonBuilder = Widget Function({required Widget child, required bool isHover, required bool isPressed})
CountdownWidgetBuilder = Widget Function({required BuildContext context, required int countdown, required DateTime currentTickTime, required DateTime initialTime, required bool isFinished, required int ticks})
IfShouldTickAndRebuild = bool Function({required DateTime currentTime, required DateTime initialTime, required DateTime? lastTickTime, required int ticks})
You should return true if the TimeBuilder should tick and rebuild. Or return false if it should NOT tick nor rebuild.
IsFinished = bool Function({required DateTime currentTime, required DateTime initialTime, required DateTime? lastTickTime, required int ticks})
You should return true to end the ticking. The TimeBuilder generate one last tick/rebuild, and then will stop. Or return false if it is still going on.
MaskFunction = String? Function({required TextEditingValue newValue, required TextEditingValue oldValue})
TimeBuilderBuilder = Widget Function({required BuildContext context, required DateTime currentTickTime, required DateTime initialTime, required bool isFinished, required int ticks})
You should return the widget that should be built.