root_navigator 1.1.0 copy "root_navigator: ^1.1.0" to clipboard
root_navigator: ^1.1.0 copied to clipboard

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
120
pub points
0%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on root_navigator