BSModal class

Creates a Bootstrap like modal.

Constructors

BSModal({Widget? content, Function? onHide, Function? onShow, bool dynamicSize = false, String modalType = "md", Widget titleDivider = const Divider(), Widget actionsDivider = const Divider(), BSModalTitleColumnOptions? bsModalTitleColumnOptions, BSModalActionsRowOptions? bsModalActionsRowOptions, bool enableTitleDivider = true, bool enableActionsDivider = true, Color? barrierColor = Colors.black54, bool barrierDismissible = true, String? barrierLabel, RouteSettings? routeSettings, bool useSafeArea = true, bool useRootNavigator = true, Widget? title, List<Widget>? actions, Color? backgroundColor, Clip clipBehavior = Clip.none, MainAxisAlignment? actionsAlignment, double? actionsOverflowButtonSpacing, VerticalDirection? actionsOverflowDirection, EdgeInsetsGeometry actionsPadding = const EdgeInsets.all(16.0), EdgeInsetsGeometry? buttonPadding = EdgeInsets.zero, EdgeInsetsGeometry contentPadding = const EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 16.0), TextStyle? contentTextStyle, double? elevation, EdgeInsets insetPadding = EdgeInsets.zero, bool scrollable = true, String? semanticLabel, ShapeBorder? shape, EdgeInsetsGeometry? titlePadding = const EdgeInsets.all(16.0), TextStyle? titleTextStyle})

Properties

actions List<Widget>?
getter/setter pair
actionsAlignment MainAxisAlignment?
getter/setter pair
actionsDivider Widget
A divider above the actions content
getter/setter pair
actionsOverflowButtonSpacing double?
getter/setter pair
actionsOverflowDirection VerticalDirection?
getter/setter pair
actionsPadding EdgeInsetsGeometry
getter/setter pair
backgroundColor Color?
getter/setter pair
barrierColor Color?
getter/setter pair
barrierDismissible bool
getter/setter pair
barrierLabel String?
getter/setter pair
bsModalActionsRowOptions BSModalActionsRowOptions?
options that can be passed to the row in the action of the modal
getter/setter pair
bsModalTitleColumnOptions BSModalTitleColumnOptions?
options that can be passed to the column in the title of the modal
getter/setter pair
buttonPadding EdgeInsetsGeometry?
getter/setter pair
clipBehavior Clip
getter/setter pair
content Widget?
getter/setter pair
contentPadding EdgeInsetsGeometry
getter/setter pair
contentTextStyle TextStyle?
getter/setter pair
dynamicSize bool
if true the modal will be sm, md, lg, or xl size depending on how big the screen is
getter/setter pair
elevation double?
getter/setter pair
enableActionsDivider bool
if true a divider is placed above the actions
getter/setter pair
enableTitleDivider bool
if true a divider is placed below the title
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
insetPadding EdgeInsets
getter/setter pair
modalType String
The max size the modal can be default is md
getter/setter pair
onHide Function?
function that runs when the modal done being hidden
getter/setter pair
onShow Function?
function that runs when the modal is done being shown
getter/setter pair
routeSettings RouteSettings?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollable bool
getter/setter pair
semanticLabel String?
getter/setter pair
shape ShapeBorder?
getter/setter pair
title Widget?
getter/setter pair
titleDivider Widget
A divider below the title content
getter/setter pair
titlePadding EdgeInsetsGeometry?
getter/setter pair
titleTextStyle TextStyle?
getter/setter pair
useRootNavigator bool
getter/setter pair
useSafeArea bool
getter/setter pair

Methods

hide() → void
closes the modal
isOpen() bool
returns true if modal is currently open returns false if modal is currently close
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show(BuildContext passedContext) Future<void>
opens the modal
toggle(BuildContext passedContext) → void
opens or closes the modal. if open, closes if closed, opens
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited