fdr 0.0.5 fdr: ^0.0.5 copied to clipboard
Fully declarative routing for Flutter applications, as easy as `Widget.build`.
import 'package:fdr/fdr.dart';
import 'package:fdr_example/src/examples/example_selection_navigator.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'FDR Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blueAccent),
useMaterial3: true,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({
super.key,
});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return DeclarativeNavigator(
navigator: ExampleSelectionNavigator(),
);
}
}