S2ModalConfig class
Modal configuration
Constructors
- S2ModalConfig({S2ModalType type = S2ModalType.fullPage, String title, bool useHeader = true, bool useConfirm = false, Icon confirmIcon, Widget confirmLabel, Color confirmColor, EdgeInsetsGeometry confirmMargin, Brightness confirmBrightness = Brightness.light, bool useFilter = false, bool filterAuto = false, Duration filterDelay = const Duration(milliseconds: 300), String filterHint, bool enableDrag = true, bool barrierDismissible = true, Color barrierColor, S2ModalStyle style = const S2ModalStyle(), S2ModalHeaderStyle headerStyle = const S2ModalHeaderStyle()})
-
Create modal configuration
const
Properties
- barrierColor → Color
-
The
barrierColor
argument is used to specify the color of the modal barrier that darkens everything the dialog. Ifnull
the default colorColors.black54
is used.final - barrierDismissible → bool
-
The
barrierDismissible
argument is used to indicate whether tapping on the barrier will dismiss the dialog. It istrue
by default and can not benull
.final - confirmBrightness → Brightness
-
custom confirmation brightness
final
- confirmColor → Color
-
custom confirmation color
final
- confirmIcon → Icon
-
custom confirmation icon
final
- confirmLabel → Widget
-
custom confirmation label
final
- confirmMargin → EdgeInsetsGeometry
-
custom confirmation padding
final
- enableDrag → bool
-
If type is S2ModalType.bottomSheet, specifies whether the bottom sheet can be dragged up and down and dismissed by swiping downwards.
final
- filterAuto → bool
-
Whether the filter is autocomplete or need confirmation
final
- filterDelay → Duration
-
The filter autocomplete delay
final
- filterHint → String
-
Custom searchbar hint
final
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- headerStyle → S2ModalHeaderStyle
-
Configure modal header style
final
- isFullPage → bool
-
whether the modal is full page or not
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- style → S2ModalStyle
-
Configure modal style
final
- title → String
-
Use different title with the trigger widget title
final
- type → S2ModalType
-
Modal type to display choices
final
- useConfirm → bool
-
Whether the option list need to confirm
to return the changed value
final
- useFilter → bool
-
Whether the option list is filterable or not
final
- useHeader → bool
-
Whether the options list modal use header or not
final
Methods
-
copyWith(
{S2ModalType type, String title, bool useHeader, bool useConfirm, Icon confirmIcon, Widget confirmLabel, Color confirmColor, EdgeInsetsGeometry confirmMargin, Brightness confirmBrightness, bool useFilter, bool filterAuto, Duration filterDelay, String filterHint, bool enableDrag, bool barrierDismissible, Color barrierColor, S2ModalStyle style, S2ModalHeaderStyle headerStyle}) → S2ModalConfig - Creates a copy of this S2ModalConfig but with the given fields replaced with the new values.
-
merge(
S2ModalConfig other) → S2ModalConfig -
Returns a new S2ModalConfig that is
a combination of this object and the given
other
style. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited