root_navigator 1.0.5

Flutter Android iOS web

A flutter package that creates a sub-navigator with routes (independent view stack)

root_navigator #

A flutter package that creates a sub-navigator with routes

Watch on GitHub Star on GitHub

Getting Started #

So you want for example a bottom bar with independent navigator view stack.

import 'package:root_navigator/root_navigator.dart';

return MaterialApp(
        theme: config.forceDarkMode ? JTheme.darkTheme : JTheme.lightTheme,
        darkTheme: config.forceLightMode ? JTheme.lightTheme : JTheme.darkTheme,
        localizationsDelegates: [
          // ... app-specific localization delegate[s] here
          GlobalMaterialLocalizations.delegate,
          GlobalWidgetsLocalizations.delegate,
          GlobalCupertinoLocalizations.delegate,
          Localizable.delegate,
        ],
        supportedLocales: Localizable.supportedLocales,
        routes: Screens.routes,
        home: Scaffold(
                  resizeToAvoidBottomPadding: true,
                  body: IndexedStack(
                    index: activeTab,
                    children: [
                        RootNavigator(root: MyPageWidget1(), routes: Screens.routes),
                        RootNavigator(root: MyPageWidget2(), routes: Screens.routes),
                        RootNavigator(root: MyPageWidget3(), routes: Screens.routes),
                    ],
                  ),
                  bottomNavigationBar: TabSelector(
                    activeTab: activeTab,
                    onTabSelected: (tab) =>
                        _changeToTab(tab),
                  ),
));

A working example project is available in the repository.

License #

This project is licensed under the MIT License - see the license file for details.

0
likes
100
pub points
32%
popularity

A flutter package that creates a sub-navigator with routes (independent view stack)

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

gerrel.developer@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on root_navigator