route_pilot 0.0.1
route_pilot: ^0.0.1 copied to clipboard
A Flutter package that simplifies navigation and routing with custom transitions, easy argument passing, and a clean API for managing routes in your Flutter applications.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:route_pilot/route_pilot.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
navigatorKey: routePilot.navigatorKey,
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('EasyRoute Example')),
body: Center(
child: ElevatedButton(
child: Text('Go to Second Page'),
onPressed: () => routePilot.to(SecondPage()),
),
),
);
}
}
class SecondPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Second Page')),
body: Center(
child: ElevatedButton(
child: Text('Go Back'),
onPressed: () => routePilot.back(),
),
),
);
}
}