S2ModalConfig class

Modal configuration

Mixed-in types
Annotations

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, double maxHeightFactor = 0.6, 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. If null the default color Colors.black54 is used.
final
barrierDismissible → bool
The barrierDismissible argument is used to indicate whether tapping on the barrier will dismiss the dialog. It is true by default and can not be null.
final
confirmBrightness → Brightness
custom confirmation brightness
final
confirmColor → Color?
custom confirmation color
final
confirmIcon → Icon?
custom confirmation icon
final
confirmIsDark → bool
Returns true if the confirm button brightness is dark
no setter
confirmIsLight → bool
Returns true if the confirm button brightness is light
no setter
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.
no setterinherited
headerStyle → S2ModalHeaderStyle
Configure modal header style
final
isBottomSheet → bool
Returns true if the modal type is bottom sheet
no setter
isFullPage → bool
Returns true if the modal type is full page
no setter
isPopupDialog → bool
Returns true if the modal type is popup dialog
no setter
maxHeightFactor → double
If type is S2ModalType.bottomSheet, specifies the max height factor, the value must be between 0 and 1
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
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, double? maxHeightFactor, 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.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
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 nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringShort() → String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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