ScaffoldFactory class
This is a Flutter plugin to build and customize the Flutter's scaffold widget with simple and flexible configurations. Also, this plugin provides various implementations of useful widgets that can be used in UI design. The scaffold is a class provides APIs for showing drawers, snack bars, and bottom sheets.
See also:
AppBar
, which is a horizontal bar typically shown at the top of an app using the appBar property.BottomAppBar
, which is a horizontal bar typically shown at the bottom of an app using the bottomNavigationBar property.FloatingActionButton
, which is a circular button typically shown in the bottom right corner of the app using the floatingActionButton property.FloatingActionButtonLocation
, which is used to place the floatingActionButton within theScaffold
's layout.FloatingActionButtonAnimator
, which is used to animate the floatingActionButton from onefloatingActionButtonLocation
to another.Drawer
, which is a vertical panel that is typically displayed to the left of the body (and often hidden on phones) using the drawer property.BottomNavigationBar
, which is a horizontal array of buttons typically shown along the bottom of the app using the bottomNavigationBar property.SnackBar
, which is a temporary notification typically shown near the bottom of the app using theScaffoldState.showSnackBar
method.BottomSheet
, which is an overlay typically shown near the bottom of the app. A bottom sheet can either be persistent, in which case it is shown using theScaffoldState.showBottomSheet
method, or modal, in which case it is shown using theshowModalBottomSheet
function.ScaffoldState
, which is the state associated with this widget.- material.google.com/layout/structure.html
Constructors
-
ScaffoldFactory({@required GlobalKey<
ScaffoldState> scaffoldKey, @required MaterialPalette materialPalette, dynamic event }) -
factory
Properties
- appBar ↔ AppBar
-
An app bar to display at the top of the scaffold.
read / write
- appBarVisibility ↔ bool
-
An app bar to display at the top of the scaffold.
Whether the
nestedAppBar
is being displayed at the screen.read / write - backgroundColor ↔ Color
-
The color of the
Material
widget that underlies the entire Scaffold.read / write - backgroundType ↔ BackgroundType
-
Contains
read / write
-
A bottom navigation bar to display at the bottom of the scaffold. [...]
read / write
-
Whether the
bottomNavigationBar
is being displayed at the screen. [...]read / write - colorPalette ↔ MaterialPalette
-
The Material Design color system can be used to create a color theme that
reflects your brand or style.
read / write
- drawer ↔ Widget
-
A panel displayed to the side of the
body
, often hidden on mobile devices. Swipes in from either left-to-right (TextDirection.ltr
) or right-to-left (TextDirection.rtl
) [...]read / write - drawerVisibility ↔ bool
-
Drawer
read / write
- fabLocation ↔ FloatingActionButtonLocation
-
Responsible for determining where the
floatingActionButton
should go. [...]read / write - floatingActionButton ↔ Widget
-
A button displayed floating above
body
, usually in the bottom right corner. [...]read / write - floatingActionButtonVisibility ↔ bool
-
Whether the
floatingActionButton
is being displayed at the screen. [...]read / write -
gradientBackgroundColors
↔ List<
Color> -
The list of gradient colors of the
Material
widget that underlies the entire Scaffold.read / write - nestedAppBar ↔ NestedScrollView
-
A nested app bar to display at the top of the scaffold.
read / write
- nestedAppBarVisibility ↔ bool
-
Whether the
nestedAppBar
is being displayed at the screen. [...]read / write - primary ↔ bool
-
Whether this scaffold is being displayed at the top of the screen. [...]
read / write
- scaffoldFactoryBehavior ↔ ScaffoldFactoryBehaviors
-
Your state class can Implements
ScaffoldFactoryBehaviors
interface. This interface allows you to listen to the event bus and implement the onPressed method for back button and floating action button.read / write -
scaffoldKey
↔ GlobalKey<
ScaffoldState> -
read / write
- textTheme ↔ TextTheme
-
Material design text theme. [...]
read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
build(
Widget bodyWidget) → Widget -
buildAppBar(
{bool titleVisibility, bool leadingVisibility, bool tabBarVisibility, Widget titleWidget, Widget leadingWidget, Color backgroundColor, bool centerTitle: false, bool scrollableTab, TabController tabController, List< Widget> tabWidgetList }) → AppBar - Simple implementation of App Bar which user can use it with easy configuration
-
buildBottomAppBar(
{Widget child, bool showNotch: false, Color color, Color splashColor }) → Widget - Simple implementation of Bottom App Bar which user can use it with easy configuration
- Simple implementation of Bottom Navigation Bar which user can use it with easy configuration
-
buildFloatingActionButton(
{Widget fabBody, String tooltip: "", String heroTag: "", Color backgroundColor, bool mini: false }) → FloatingActionButton - Simple implementation of Floating Action Button which user can use it with easy configuration
-
buildNestedScrollView(
{bool titleVisibility, bool leadingVisibility, bool tabBarVisibility, Widget bodyWidget, bool scrollableTab, List< Widget> tabWidgetList, TabController tabController, Widget titleWidget, Widget leadingWidget, Color backgroundColor, bool centerTitle: false, bool floating: false }) → NestedScrollView - Simple implementation of Nested Scroll View which user can use it with easy configuration
-
dispose(
) → void -
init(
{bool appBarVisibility, bool floatingActionButtonVisibility, bool nestedAppBarVisibility, bool drawerVisibility, BackgroundType backgroundType: BackgroundType.normal, Widget floatingActionButton, FloatingActionButtonLocation floatingActionButtonLocation, AppBar appBar, NestedScrollView nestedAppBar, Widget drawer, List< Color> gradientBackgroundColors, Color backgroundColor }) → void - Initialize ScaffoldFactory with the scopes you want
-
launchURL(
String url) → void -
showSnackBar(
{SnackBarMessageType messageType, bool iconVisibility, String message: "", Duration duration, Color backgroundColor: Colors.black, Color textColor: Colors.white, Color iconColor: Colors.white, TextDirection textDirection: TextDirection.ltr, TextStyle style }) → void -
updateAndroidFrameColor(
{Color statusBarColor, }) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited