S2ModalConfig class
Modal configuration
- Mixed-in types
- Annotations
Constructors
- S2ModalConfig({S2ModalTypetype =S2ModalType.fullPage,Stringtitle,booluseHeader =true,booluseConfirm =false,IconconfirmIcon,WidgetconfirmLabel,ColorconfirmColor,EdgeInsetsGeometryconfirmMargin,BrightnessconfirmBrightness =Brightness.light,booluseFilter =false,boolfilterAuto =false,DurationfilterDelay =const Duration(milliseconds: 300),StringfilterHint,doublemaxHeightFactor =0.6,boolenableDrag =true,boolbarrierDismissible =true,ColorbarrierColor,S2ModalStylestyle =const S2ModalStyle(),S2ModalHeaderStyleheaderStyle =const S2ModalHeaderStyle()})
- Create modal configurationconst
Properties
- barrierColor→Color
- ThebarrierColor argument is used to specify the color of the modalbarrier that darkens everything the dialog. If
nullthe default colorColors.black54is used.final - barrierDismissible→bool
- ThebarrierDismissible argument is used to indicate whether tapping on thebarrier will dismiss the dialog. It is
trueby default and can not benull.final - confirmBrightness→Brightness
- custom confirmation brightnessfinal
- confirmColor→Color
- custom confirmation colorfinal
- confirmIcon→Icon
- custom confirmation iconfinal
- confirmIsDark→bool
- Returns true if the confirm button brightness is darkno setter
- confirmIsLight→bool
- Returns true if the confirm button brightness is lightno setter
- confirmLabel→Widget
- custom confirmation labelfinal
- confirmMargin→EdgeInsetsGeometry
- custom confirmation paddingfinal
- enableDrag→bool
- Iftype isS2ModalType.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 confirmationfinal
- filterDelay→Duration
- The filter autocomplete delayfinal
- filterHint→String
- Custom searchbar hintfinal
- hashCode→int
- The hash code for this object.no setterinherited
- headerStyle→S2ModalHeaderStyle
- Configure modal header stylefinal
- isBottomSheet→bool
- Returns true if the modal type is bottom sheetno setter
- isFullPage→bool
- Returns true if the modal type is full pageno setter
- isPopupDialog→bool
- Returns true if the modal type is popup dialogno setter
- maxHeightFactor→double
- Iftype isS2ModalType.bottomSheet, specifies the max height factor, the value must be between
0and1final - runtimeType→Type
- A representation of the runtime type of the object.no setterinherited
- style→S2ModalStyle
- Configure modal stylefinal
- title→String
- Use different title with the trigger widget titlefinal
- type→S2ModalType
- Modal type to display choicesfinal
- useConfirm→bool
- Whether the option list need to confirmto return the changed valuefinal
- useFilter→bool
- Whether the option list is filterable or notfinal
- useHeader→bool
- Whether the options list modal use header or notfinal
Methods
- copyWith(
{S2ModalTypetype,Stringtitle,booluseHeader,booluseConfirm,IconconfirmIcon,WidgetconfirmLabel,ColorconfirmColor,EdgeInsetsGeometryconfirmMargin,BrightnessconfirmBrightness,booluseFilter,boolfilterAuto,DurationfilterDelay,StringfilterHint,doublemaxHeightFactor,boolenableDrag,boolbarrierDismissible,ColorbarrierColor,S2ModalStylestyle,S2ModalHeaderStyleheaderStyle})→S2ModalConfig - Creates a copy of thisS2ModalConfig but withthe given fields replaced with the new values.
- debugFillProperties(
DiagnosticPropertiesBuilderproperties)→ void - Add additional properties associated with the node.inherited
- merge(
S2ModalConfigother)→S2ModalConfig - Returns a newS2ModalConfig that isa combination of this object and the given
otherstyle. - noSuchMethod(
Invocationinvocation)→ 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 debuggingtools and byDiagnosticsNode.toStringDeep.inherited
- toString(
{DiagnosticLevelminLevel =DiagnosticLevel.info})→String - A string representation of this object.inherited
- toStringShort(
)→String - A brief description of this object, usually just theruntimeType and thehashCode.inherited
Operators
- operator ==(
Objectother)→bool - The equality operator.inherited