pages_navigator_manager 0.1.2
Pages Navigator Manager #
Wraps a navigator and a widget, providing a easy way to separate a navigator from root navigator
Usage #
To use this plugin, add pages_navigator_manager
as a dependency in your pubspec.yaml file.
Example #
import 'package:flutter/material.dart';
import 'package:pages_navigator_manager/pages_navigator_manager.dart';
void main() => runApp(MaterialApp(
home: Demo(),
));
class Demo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Page1(),
);
}
}
class Page1 extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Page1'),),
body: Container(
color: Colors.red,
),
floatingActionButton: FloatingActionButton(onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return PagesNavigatorManager(rootPage: Page2_1());
}));
}),
);
}
}
class Page2_1 extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Page2-1'),),
body: Container(
color: Colors.red,
),
floatingActionButton: FloatingActionButton(onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return Page2_2();
}));
}),
);
}
}
class Page2_2 extends StatelessWidget {
@override
Widget build(BuildContext context) {
PageNavigator pageNavigator = PageNavigator.of(context);
return Scaffold(
appBar: AppBar(title: Text('Page2-2'),),
body: Container(
color: Colors.red,
),
floatingActionButton: FloatingActionButton(onPressed: () {
pageNavigator.dismissPageNavigator(null);
}),
);
}
}
[0.1.2]
- Initial release.
tab_flutter_app #
A new Flutter application.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
pages_navigator_manager: ^0.1.2
2. Install it
You can install packages from the command line:
with Flutter:
$ flutter pub get
Alternatively, your editor might support flutter pub get
.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
import 'package:pages_navigator_manager/pages_navigator_manager.dart';
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
0
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
90
|
Overall:
Weighted score of the above.
[more]
|
48
|
We analyzed this package on Dec 13, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.6
Health suggestions
Format lib/pages_navigator_manager.dart
.
Run flutter format
to format lib/pages_navigator_manager.dart
.
Maintenance issues and suggestions
Support latest dependencies. (-10 points)
The version constraint in pubspec.yaml
does not support the latest published versions for 1 dependency (bloc_pattern
).
Dependencies
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.0.0-dev.68.0 <3.0.0 | ||
bloc_pattern | ^1.5.1 | 1.5.2 | 2.5.1 |
flutter | 0.0.0 | ||
Transitive dependencies | |||
collection | 1.14.11 | 1.14.12 | |
meta | 1.1.7 | 1.1.8 | |
sky_engine | 0.0.99 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 | ||
Dev dependencies | |||
flutter_test |