BaseAlertDialog class

BaseAlertDialog with iOS 26 Liquid Glass Dynamic Material and Material 3 support

Features iOS 26 Liquid Glass Dynamic Material with:

  • Transparency with optical clarity zones
  • Multi-layer reflections and refractions
  • Dynamic adaptability to content and context
  • Real-time interactivity with haptic feedback
  • Unified design language across platforms
  • Content hierarchy separation through optical layers

Material 3 Integration:

  • Semantic ColorScheme usage with role-based colors
  • Enhanced elevation system with shadow groups
  • Modern typography scale with optical sizing
  • Accessibility improvements with semantic labels

Cross-platform support:

  • CupertinoAlertDialog with Liquid Glass enhancement by cupertino
  • AlertDialog with Material 3 design by material *** use cupertino = { forceUseMaterial: true } force use AlertDialog on cupertino *** use material = { forceUseCupertino: true } force use CupertinoAlertDialog on material

Enhanced: 2024.01.20 with iOS 26 Liquid Glass Dynamic Material

Inheritance

Constructors

BaseAlertDialog({Key? key, Widget? title, Widget? content, List<Widget> actions = const <Widget>[], bool enableLiquidGlass = true, double glassOpacity = 0.8, double reflectionIntensity = 0.6, double refractionStrength = 0.4, bool adaptiveInteraction = true, bool contentHierarchy = true, bool hapticFeedback = true, ScrollController? scrollController, ScrollController? actionScrollController, Duration insetAnimationDuration = const Duration(milliseconds: 100), Curve insetAnimationCurve = Curves.decelerate, EdgeInsetsGeometry? titlePadding, TextStyle? titleTextStyle, EdgeInsetsGeometry contentPadding = const EdgeInsets.fromLTRB(24.0, 20.0, 24.0, 24.0), TextStyle? contentTextStyle, Color? backgroundColor, EdgeInsetsGeometry actionsPadding = EdgeInsets.zero, VerticalDirection? actionsOverflowDirection, double? actionsOverflowButtonSpacing, EdgeInsetsGeometry? buttonPadding, double? elevation, String? semanticLabel, EdgeInsets insetPadding = const EdgeInsets.symmetric(horizontal: 40.0, vertical: 24.0), Clip clipBehavior = Clip.none, ShapeBorder? shape, bool scrollable = false, BaseParam? baseParam})
const

Properties

actions → List<Widget>
CupertinoAlertDialog.actions or AlertDialog.actions
final
actionScrollController → ScrollController?
CupertinoAlertDialog.actionScrollController
final
actionsOverflowButtonSpacing → double?
AlertDialog.actionsOverflowButtonSpacing
final
actionsOverflowDirection → VerticalDirection?
AlertDialog.actionsOverflowDirection
final
actionsPadding → EdgeInsetsGeometry
AlertDialog.actionsPadding
final
adaptiveInteraction → bool
Enable adaptive interaction with context awareness Provides real-time responsiveness to user actions and system state
final
backgroundColor → Color?
AlertDialog.backgroundColor
final
baseParam → BaseParam?
Personalization parameters, gets platform parameters first, then mode parameters
finalinherited
buttonPadding → EdgeInsetsGeometry?
AlertDialog.buttonPadding
final
clipBehavior → Clip
AlertDialog.clipBehavior
final
content → Widget?
CupertinoAlertDialog.content or AlertDialog.content
final
contentHierarchy → bool
Enable content hierarchy separation through optical layers Creates visual depth and importance distinction between elements
final
contentPadding → EdgeInsetsGeometry
AlertDialog.contentPadding
final
contentTextStyle → TextStyle?
AlertDialog.contentTextStyle
final
elevation → double?
AlertDialog.elevation
final
enableLiquidGlass → bool
*** general properties end *** *** iOS 26 Liquid Glass Dynamic Material properties start *** Enable Liquid Glass Dynamic Material optical effects Provides transparency, reflections, and refractions for immersive experience
final
glassOpacity → double
Glass transparency level for optical clarity zones Creates depth perception through graduated opacity (0.0 to 1.0)
final
hapticFeedback → bool
Enable haptic feedback for enhanced tactile experience Provides appropriate haptic responses for glass-like interactions
final
hashCode → int
The hash code for this object.
no setterinherited
insetAnimationCurve → Curve
CupertinoAlertDialog.insetAnimationCurve
final
insetAnimationDuration → Duration
CupertinoAlertDialog.insetAnimationDuration
final
insetPadding → EdgeInsets
AlertDialog.insetPadding
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
reflectionIntensity → double
Reflection intensity for environmental awareness Simulates real-world glass reflection behavior (0.0 to 1.0)
final
refractionStrength → double
Refraction strength for light distortion effects Creates realistic glass light-bending properties (0.0 to 1.0)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollable → bool
AlertDialog.scrollable
final
scrollController → ScrollController?
*** iOS 26 Liquid Glass Dynamic Material properties end *** *** cupertino properties start *** CupertinoAlertDialog.scrollController
final
semanticLabel → String?
AlertDialog.semanticLabel
final
shape → ShapeBorder?
AlertDialog.shape
final
title → Widget?
*** general properties start *** CupertinoAlertDialog.title or AlertDialog.title
final
titlePadding → EdgeInsetsGeometry?
*** cupertino properties end *** *** material properties start *** AlertDialog.titlePadding
final
titleTextStyle → TextStyle?
AlertDialog.titleTextStyle
final

Methods

beforeBuild(BuildContext context) → void
Called before build
inherited
beforeBuildByCupertino(BuildContext context) → void
Called before buildByCupertino
inherited
beforeBuildByCupertinoNative(BuildContext context) → void
Called before buildByCupertinoNative (native iOS implementation)
inherited
beforeBuildByMaterial(BuildContext context) → void
Called before buildByMaterial
inherited
build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
inherited
buildByCupertino(BuildContext context) → Widget
*** material properties end ***
buildByCupertinoNative(BuildContext context) → dynamic
build on cupertino mode with native iOS components (cupertino_native package) This is called when baseParam.nativeIOS = true Default implementation falls back to buildByCupertino()
inherited
buildByMaterial(BuildContext context) → Widget
build on material mode
commonBuild(BuildContext context, BaseParam? baseParam) → dynamic
inherited
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
getBuildMode(BaseParam? baseParam) → WidgetBuildMode
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show<T>(BuildContext context, {bool barrierDismissible = true, Color? barrierColor = Colors.black54, String? barrierLabel, bool useSafeArea = true, bool useRootNavigator = true, RouteSettings? routeSettings}) → Future<T?>
showDialog
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
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited
valueOf(String key, dynamic value) → dynamic
inherited
valueOfBaseParam(BaseParam? baseParam, String key, dynamic value) → dynamic
No reflection available in Dart First get value from platform, then from mode, finally from value itself
inherited

Operators

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