Skip to content
masterclass Buddy

Flutter & Dart · Component

Scaffold

Scaffold provides the basic Material page layout. It arranges common parts such as an app bar, body, drawers, bottom navigation, bottom sheets, and a floating action button.

Last updated

Syntax

const Scaffold({
  Key? key,
  PreferredSizeWidget? appBar,
  Widget? body,
  Widget? floatingActionButton,
  FloatingActionButtonLocation? floatingActionButtonLocation,
  FloatingActionButtonAnimator? floatingActionButtonAnimator,
  List<Widget>? persistentFooterButtons,
  AlignmentDirectional persistentFooterAlignment = AlignmentDirectional.centerEnd,
  BoxDecoration? persistentFooterDecoration,
  Widget? drawer,
  DrawerCallback? onDrawerChanged,
  Widget? endDrawer,
  DrawerCallback? onEndDrawerChanged,
  Widget? bottomNavigationBar,
  Widget? bottomSheet,
  Color? backgroundColor,
  bool? resizeToAvoidBottomInset,
  bool primary = true,
  DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
  bool extendBody = false,
  bool drawerBarrierDismissible = true,
  bool extendBodyBehindAppBar = false,
  Color? drawerScrimColor,
  double? drawerEdgeDragWidth,
  bool drawerEnableOpenDragGesture = true,
  bool endDrawerEnableOpenDragGesture = true,
  String? restorationId,
})

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • AppBar
  • Drawer
  • BottomNavigationBar
  • BottomSheet
  • SnackBar
  • MaterialBanner
  • ScaffoldState
  • ScaffoldMessengerState

Source: Scaffold class - material library - Dart API. Checked 2026-11-03.