Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laurensk/platform_navigation
Platform navigation for Flutter.
https://github.com/laurensk/platform_navigation
dart dart-library flutter flutter-library flutter-package
Last synced: about 1 month ago
JSON representation
Platform navigation for Flutter.
- Host: GitHub
- URL: https://github.com/laurensk/platform_navigation
- Owner: laurensk
- License: mit
- Created: 2021-01-30T19:41:30.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-30T23:28:48.000Z (almost 4 years ago)
- Last Synced: 2023-11-10T11:53:39.410Z (about 1 year ago)
- Topics: dart, dart-library, flutter, flutter-library, flutter-package
- Language: Dart
- Homepage:
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter Platform Navigation
This library allows you to implement navigation for iOS, Android and Web with ease! It is easy to use and intended to get started quickly. Please have a look at the example below.
## Example
```dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (kIsWeb) return getMaterialApp();
if (Platform.isIOS)
return getCupertinoApp();
else
return getMaterialApp();
}getMaterialApp() {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Platform Navigation',
theme: ThemeData(brightness: Brightness.light, backgroundColor: Colors.white, accentColor: Colors.black),
darkTheme: ThemeData(brightness: Brightness.dark, backgroundColor: Colors.black, accentColor: Colors.white),
home: getNavigation(),
);
}getCupertinoApp() {
return CupertinoApp(
debugShowCheckedModeBanner: false,
home: getNavigation(),
theme: CupertinoThemeData(),
title: 'Platform Navigation',
);
}getNavigation() {
return PlatformNavigation(title: "My App", screens: [
PlatformScreen(
title: "Home",
child: Container(color: Colors.white, child: Center(child: Text("Welcome at Home!"))),
materialIcon: Icons.home,
cupertinoIcon: CupertinoIcons.home),
PlatformScreen(
title: "Settings",
child: Center(child: Text("This is the settings screen.")),
materialIcon: Icons.settings,
cupertinoIcon: CupertinoIcons.settings),
PlatformScreen(
title: "About",
child: Center(child: Text("About this app!")),
materialIcon: Icons.info,
cupertinoIcon: CupertinoIcons.info)
]);
}
}
```## Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/laurensk/platform_navigation/issues).## Show your support
Give a ⭐️ on [GitHub](https://github.com/laurensk/platform_navigation) if this project helped you!
## License
Copyright © [Laurens Kropf](https://github.com/laurensk).
This project is [MIT](https://github.com/laurensk/platform_navigation/blob/master/LICENSE) licensed.