easyfooter- just create the pages and the package will take care of the navigation of your application

result

20200707_113755 footer2 fotter 3

step 1

create all your pages: statefull/stateless example

class Page2 extends StatelessWidget {
  Page2({Key key}) : super(key: key);
  static const String id = "page2";
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Text('page2',style: TextStyle(
        fontSize: 50,
      ),),
    );
  }
}
  • add for every page id name
static const String id = "page2";

step 2

create list for all the pages example

 List<Widget> pages = [

    Page1(
      key: PageStorageKey('page1'),
    ),
    Page2(
      key: PageStorageKey('page2'),
    ),
    Page3(
      key: PageStorageKey('page3'),
    ),
  ];
  • key vlaue== id vlaue
static const String id = "page2";    
////// EQUAL (==)///////
Page2(
      key: PageStorageKey('page2'),
    ),
  • create map<string, icon> for evrey page will be name and icon example
 Map<String,Icon> icons={
    'page1': Icon(Icons.home,color: Colors.black,),
    'page2': Icon(Icons.receipt,color: Colors.black,),
    'page3': Icon(Icons.event,color: Colors.black,),
  };

step 3

main class create

Widget build(BuildContext context) {

    return MaterialApp(
      initialRoute: BottomNavigationBarController.id,
      routes: {

        BottomNavigationBarController.id :(context)=> BottomNavigationBarController(ListPage: this.pages,mainSettPage: this.icons,
            MoreListPage: this.pages2,secondSetPage: this.icons2, styleOpen:1),

      },
    );
  }

class style

create one set pages/ ceate main set page and second set pages

ExtraIcons: true // ExtraIcons: false (defult)

  • if ExtraIcons:false add:
BottomNavigationBarController(ListPage: this.pages,mainSetPage: this.icons);
Map<String,Icon> icons={  ...  };                               
List<Widget> pages = [ ...  ];                                                   
  • if ExtraIcons: true add:
BottomNavigationBarController(ListPage: this.pages,mainSetPage: this.icons, MoreListPage: this.pages2,secondSetPage: this.icons2,ExtraIcons: true,),
Map<String,Icon> icons={  ...  };                               
List<Widget> pages = [ ...  ];                                                   
Map<String,Icon> icons2={  ...  };                               
List<Widget> pages2 = [ ...  ];    

styleOpen:1/ styleOpen:0 (defult)

BottomNavigationBarController(ListPage: this.pages,mainSetPage: this.icons, MoreListPage: this.pages2,secondSetPage: this.icons2,ExtraIcons: true,styleOpen:1)

styleOpen:1 Open1 styleOpen:0 open2

background color

final Color backroundColorOne; \\ main pages
final Color backroundColorTwo;\\ second pages

icon color

final Color AftertapColor;
final Color BeforetapColor;

Libraries

easyfooter