routefly 0.0.1 routefly: ^0.0.1 copied to clipboard
Gerenciador de rotas baseadas em pastas inspirado no NextJS
import 'package:example/routes.dart';
import 'package:flutter/material.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'package:routefly/routefly.dart';
void main() {
usePathUrlStrategy();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp.router(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
routerConfig: Routefly.routerConfig(
initialPath: '/home',
routes: routes,
),
);
}
}