BaseMaterialWidget.material3 constructor

BaseMaterialWidget.material3({
  1. Key? key,
  2. required Widget child,
  3. ThemeData? theme,
  4. InteractiveInkFeatureFactory? splashFactory,
  5. bool enableLiquidGlass = true,
  6. bool enableEnvironmentalAwareness = true,
  7. bool enableHapticFeedback = true,
  8. Color? surfaceColor,
  9. double? elevation = 1.0,
  10. BorderRadius? borderRadius,
  11. EdgeInsetsGeometry? padding,
})

Factory for Material 3 Design System integration

Implementation

factory BaseMaterialWidget.material3({
  Key? key,
  required Widget child,
  ThemeData? theme,
  InteractiveInkFeatureFactory? splashFactory,
  bool enableLiquidGlass = true,
  bool enableEnvironmentalAwareness = true,
  bool enableHapticFeedback = true,
  Color? surfaceColor,
  double? elevation = 1.0,
  BorderRadius? borderRadius,
  EdgeInsetsGeometry? padding,
}) {
  return BaseMaterialWidget(
    key: key,
    child: child,
    theme: theme,
    splashFactory: splashFactory ?? InkRipple.splashFactory,
    enableLiquidGlass: enableLiquidGlass,
    enableEnvironmentalAwareness: enableEnvironmentalAwareness,
    enableHapticFeedback: enableHapticFeedback,
    materialType: MaterialType.card,
    surfaceColor: surfaceColor,
    elevation: elevation,
    borderRadius: borderRadius ?? BorderRadius.circular(12.0),
    padding: padding,
  );
}