ModalBackdropTheme class
Theme configuration for modal backdrop appearance and behavior.
Defines the visual and behavioral properties of the backdrop that appears behind modal dialogs, including border radius, padding, barrier color, and modal interaction settings.
Example:
ComponentThemeData(
data: {
ModalBackdropTheme: ModalBackdropTheme(
barrierColor: Colors.black54,
borderRadius: BorderRadius.circular(12),
modal: true,
),
},
child: MyApp(),
)
Constructors
- ModalBackdropTheme.new({BorderRadiusGeometry? borderRadius, EdgeInsetsGeometry? padding, Color? barrierColor, bool? modal, bool? surfaceClip})
-
Creates a ModalBackdropTheme.
const
Properties
- barrierColor → Color?
-
Color of the barrier that appears behind the modal.
final
- borderRadius → BorderRadiusGeometry?
-
Border radius applied to the modal surface.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- modal → bool?
-
Whether the backdrop behaves as a modal (blocking interaction).
final
- padding → EdgeInsetsGeometry?
-
Padding around the modal content area.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- surfaceClip → bool?
-
Whether to clip the surface for visual effects.
final
Methods
-
copyWith(
{ValueGetter< BorderRadiusGeometry?> ? borderRadius, ValueGetter<EdgeInsetsGeometry?> ? padding, ValueGetter<Color?> ? barrierColor, ValueGetter<bool?> ? modal, ValueGetter<bool?> ? surfaceClip}) → ModalBackdropTheme - Creates a copy of this theme with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override