scaffold_factory 0.7.8

  • Example
  • Installing
  • Versions
  • new73

Scaffold Factory


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.

How to use

Import the package

To use this plugin, add scaffold_factory as a dependency in your pubspec.yaml file. Also, You can use Dart packages' install instruction for this package.

Use the plugin

1- Add the following import to your Dart code:

import 'package:scaffold_factory/scaffold_factory.dart';

2- Define these private variables inside your widget.

final _scaffoldKey = GlobalKey<ScaffoldState>();
ScaffoldFactory _scaffoldFactory;
MaterialPalette _sampleColorPalette = MaterialPalette(
  primaryColor: Colors.teal,
  accentColor: Colors.pinkAccent,

3- Your state class can Implements ScaffoldFactoryBehaviors interface:

class _ExampleScaffoldFactoryState extends State<ExampleScaffoldFactory> implements ScaffoldFactoryBehaviors {
  // body
  void onBackButtonPressed() {
    print("Scaffold Factory => onBackButtonPressed()");

  void onFloatingActionButtonPressed() {
    print("Scaffold Factory => onFloatingActionButtonPressed()");

  Future onEventBusMessageReceived(event) async {
    print("ScaffoldFactory: Event Received");

4- Initialize ScaffoldFactory with the scopes you want:

  void initState() {
  void _initScaffoldFactory() {
    _scaffoldFactory = ScaffoldFactory(
      scaffoldKey: _scaffoldKey,
      materialPalette: _sampleColorPalette,
    _scaffoldFactory.scaffoldFactoryBehavior = this;

      backgroundType: BackgroundType.normal,
      appBarVisibility: false,
      floatingActionButtonVisibility: false,
      drawerVisibility: false,
      nestedAppBarVisibility: false,
      bottomNavigationBarVisibility: false,

5- Pass the body widget to build method of your _scaffoldFactory object and define your theme of texts:

Widget build(BuildContext context) {
  _scaffoldFactory.textTheme = Theme.of(context).textTheme;


Widget _buildBody(BuildContext context) {
  // return your body widget    


  • Easily create a material interface with simple configurations.
  • There is an implementation for each of scaffold's widget like the AppBar, BottomNavigationBar, FloatingActionButton, etc.
buildAppBarAppBar widget
buildNestedScrollViewNestedScrollView widget
buildBottomNavigationBarBottomNavigationBar widget
buildBottomAppBarBottomAppBar widget
buildFloatingActionButtonFloatingActionButton widget
  • You can change the visibility of scaffold's widgets and pass your custom widget in the init method
      appBarVisibility: true,
      appBar: _scaffoldFactory.buildAppBar(
        titleVisibility: true,
        leadingVisibility: false,
        tabBarVisibility: false,
        titleWidget: Text('Scaffol Factory Example'),
        backgroundColor: _scaffoldFactory.colorPalette.primaryColor,

or whenever you want in the build method of your state.

Widget build(BuildContext context) {
  _scaffoldFactory.textTheme = Theme.of(context).textTheme;
  _scaffoldFactory.appBarVisibility = true;
  _scaffoldFactory.appBar = _scaffoldFactory.buildAppBar(
      titleVisibility: true,
      leadingVisibility: false,
      tabBarVisibility: false,
      titleWidget: Text('Scaffol Factory Example'),
      backgroundColor: _scaffoldFactory.colorPalette.primaryColor,



There are two examples in the example application package.

Solid Solid Solid Solid


  • Modify example.dart file and simplify body widget
  • Add comments for scaffold_factory variables and methods
  • Enable Super Mixin in analysis_options.yaml
  • Update API Documentation


  • Now, The user can pass the text style to snack bar
  • Add background color parameter to init method


  • Fixed app bar problem. Removed blank space above of tab bar when title and leading widgets are invisible.
  • Removed category card's background image URL and replaced it with the local asset.


  • Change some scaffold factory's initialize parameters type to required.


  • Add analysis options to project and reformat codes with new rules.
  • Add example file for publishing in dart packages
  • Modify some import path to pass the dry-run analysis


  • Add API Documentation


  • Add bottom app bar to scaffold factory
  • Add drawer to scaffold factory
  • Modify updateAndroidFrameColor method
  • Modify SamplePlaceholder constructor
  • Some bugs fixed


  • Add Event bus to scaffold factory. Now, The user can define a custom event, fire it and stop it whenever needs. The Scaffold Factory listen to the bus and call the onEventBusMessageReceived method.
  • Change the name of ScaffoldFactoryButtonsBehavior class to ScaffoldFactoryBehaviors
  • Add a new method to scaffold factory named updateAndroidFrameColor. This method changes android's status bar and navigation bar colors.
  • Add the global EventBus object
  • Modify sample screens


  • Add new sample for snack bar
  • Add method to scaffold factory for showing snack bar
  • Modify sample floating action button and use snack bar


  • Add sample_tab_bar.dart file and implement an example of tab bar widget in scafoold factory
  • Modify colors of some sample pages
  • Modify nested app bar and complete it with vertical slider to be a better example


  • Complete nested app bar implementation and fix some bugs in scaffold factory


  • Add nested app bar
  • Create sample for nested app bar


  • Remove scaffold visibility and replace it with boolean
  • Reformat project
  • Add center text to placeholder
  • Modify code with new visibility parameters


  • Add sample_bottom_naviagation_bar
  • Add sample_placeholder
  • Modify scaffold factory and add bottom navigation bar parameters


  • Add center title switch to sample_app_bar and scaffold factory
  • Add center and floating switch to sample_floating_action_button


  • Modify variables in scaffold_factory
  • Now we can call scaffold_factory.launchURL and open the url in the web browser
  • Create routes with the specific name for example application
  • Create sample_catalog and use it as the home screen
  • Create sample_app_bar
  • Create sample_floating_action_button


  • Add Floating action button support


  • Add Floating action button support


  • Add app bar to scaffold factory and create simple custom app bar


  • Add color palette


  • Remove .idea folder from repository
  • Clear template data and add constructor of the class


  • First commit


Scaffold Factory Examples

There are two example applications to demonstrate how to use the scaffold_factory plugin.

Example 1

Demonstrates how to use the scaffold_factory plugin. Run the example.dart file to use this example.

Solid Solid

Example 2

Sample application with a catalog to show you how to implement the different parts of the scaffold_factory plugin. Run the main.dart file to use this example.

Solid Solid Solid Solid

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  scaffold_factory: ^0.7.8

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:scaffold_factory/scaffold_factory.dart';
Version Uploaded Documentation Archive
0.7.8 Nov 23, 2018 Go to the documentation of scaffold_factory 0.7.8 Download scaffold_factory 0.7.8 archive
0.7.7 Nov 21, 2018 Go to the documentation of scaffold_factory 0.7.7 Download scaffold_factory 0.7.7 archive
0.7.6 Nov 21, 2018 Go to the documentation of scaffold_factory 0.7.6 Download scaffold_factory 0.7.6 archive
0.7.5 Nov 21, 2018 Go to the documentation of scaffold_factory 0.7.5 Download scaffold_factory 0.7.5 archive
0.7.4 Nov 19, 2018 Go to the documentation of scaffold_factory 0.7.4 Download scaffold_factory 0.7.4 archive
0.7.3 Nov 18, 2018 Go to the documentation of scaffold_factory 0.7.3 Download scaffold_factory 0.7.3 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
event_bus ^1.0.1 1.0.1
flutter 0.0.0
flutter_statusbarcolor ^0.1.1 0.1.1
url_launcher ^4.0.1 4.0.2
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8