unrouter 0.7.1 copy "unrouter: ^0.7.1" to clipboard
unrouter: ^0.7.1 copied to clipboard

A Flutter router that gives you routing flexibility: define routes centrally, scope them to widgets, or mix both - with browser-style history navigation.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:unrouter/unrouter.dart';

import 'routes.dart';

void main() {
  runApp(const App());
}

final router = Unrouter(
  strategy: .browser,
  enableNavigator1: true,
  routes: routes,
);

class App extends StatelessWidget {
  const App({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      title: 'Unrouter Example',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      routerConfig: router,
    );
  }
}
5
likes
160
points
206
downloads

Publisher

verified publishermedz.dev

Weekly Downloads

A Flutter router that gives you routing flexibility: define routes centrally, scope them to widgets, or mix both - with browser-style history navigation.

Repository (GitHub)
View/report issues

Topics

#router #routing #navigation

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

analyzer, coal, flutter, meta, path, web

More

Packages that depend on unrouter