MScaffold constructor

MScaffold({
  1. Key? key,
  2. PreferredSizeWidget? appBar,
  3. Widget? body,
  4. String? title,
  5. Color? titleColor,
  6. Widget? leading,
  7. bool isRoot = false,
  8. List<Widget>? actions,
  9. VoidCallback? onBack,
  10. String? previousRoute,
  11. Color? barBackgourndColor,
  12. Color? barForegroundColor,
  13. bool? centerTitle,
  14. Widget? floatingActionButton,
  15. FloatingActionButtonLocation? floatingActionButtonLocation,
  16. FloatingActionButtonAnimator? floatingActionButtonAnimator,
  17. List<Widget>? persistentFooterButtons,
  18. AlignmentDirectional persistentFooterAlignment = AlignmentDirectional.centerEnd,
  19. Widget? drawer,
  20. DrawerCallback? onDrawerChanged,
  21. Widget? endDrawer,
  22. DrawerCallback? onEndDrawerChanged,
  23. Widget? bottomNavigationBar,
  24. Widget? bottomSheet,
  25. Color? backgroundColor,
  26. bool? resizeToAvoidBottomInset,
  27. bool primary = true,
  28. DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
  29. bool extendBody = false,
  30. bool extendBodyBehindAppBar = false,
  31. Color? drawerScrimColor,
  32. double? drawerEdgeDragWidth,
  33. bool drawerEnableOpenDragGesture = true,
  34. bool endDrawerEnableOpenDragGesture = true,
  35. String? restorationId,
})

Implementation

MScaffold({
  super.key,
  PreferredSizeWidget? appBar,
  super.body,
  String? title,
  Color? titleColor,
  Widget? leading,
  bool isRoot = false,
  List<Widget>? actions,
  VoidCallback? onBack,
  String? previousRoute,
  Color? barBackgourndColor,
  Color? barForegroundColor,
  bool? centerTitle,
  super.floatingActionButton,
  super.floatingActionButtonLocation,
  super.floatingActionButtonAnimator,
  super.persistentFooterButtons,
  super.persistentFooterAlignment = AlignmentDirectional.centerEnd,
  super.drawer,
  super.onDrawerChanged,
  super.endDrawer,
  super.onEndDrawerChanged,
  super.bottomNavigationBar,
  super.bottomSheet,
  super.backgroundColor,
  super.resizeToAvoidBottomInset,
  super.primary = true,
  super.drawerDragStartBehavior = DragStartBehavior.start,
  super.extendBody = false,
  super.extendBodyBehindAppBar = false,
  super.drawerScrimColor,
  super.drawerEdgeDragWidth,
  super.drawerEnableOpenDragGesture = true,
  super.endDrawerEnableOpenDragGesture = true,
  super.restorationId,
}) : super(
        appBar: appBar ??
            (title != null || actions != null
                ? MAppBar(
                    titleText: title,
                    leading: leading,
                    isRoot: isRoot,
                    actions: actions,
                    onBack: onBack,
                    backgroundColor: barBackgourndColor,
                    foregroundColor: barForegroundColor,
                    previousRoute: previousRoute,
                    centerTitle: centerTitle ?? true,
                  )
                : null),
      );