CustomScaffold constructor

CustomScaffold({
  1. Key? key,
  2. required Scaffold scaffold,
  3. required List<Widget> children,
  4. dynamic onItemTap(
    1. int
    )?,
})

Implementation

CustomScaffold(
    // Can't be constant because of assertions :(
    {Key? key,
    required this.scaffold,
    required this.children,
    this.onItemTap})
    : assert(scaffold.bottomNavigationBar != null),
      assert(scaffold.bottomNavigationBar is BottomNavigationBar,
          '[CustomScaffold] require an instance of [BottomNavigationBar]'),
      assert(
          (scaffold.bottomNavigationBar as BottomNavigationBar)
                  .items
                  .length ==
              children.length,
          '[BottomNavigationBar] and `children` should be the same size'),
      super(key: key);