go_router_extension 0.0.4
go_router_extension: ^0.0.4 copied to clipboard
This is an extension package that makes it easier to use the go_router package
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:go_router_extension/go_router_extension.dart';
@ClassNameAnnotation(className: HomeScreen)
const String home = '/home';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('go router exntension'),
),
body: const HomeScreen(),
),
);
}
}
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return const Center(
child: Text('home screen'),
);
}
}