route_map 0.0.11 copy "route_map: ^0.0.11" to clipboard
route_map: ^0.0.11 copied to clipboard

Route Map is a convenient code generator for Navigator 2.0. Inspired by injectable.

example/lib/main.dart

import 'package:example/route_map.dart';
import 'package:example/route_map.routes.dart';
import 'package:flutter/material.dart';
import 'package:flutter_web_plugins/url_strategy.dart';

void main() {
  usePathUrlStrategy();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(useMaterial3: true),
      onGenerateRoute: onGenerateRoute,
      initialRoute: RouteMaps.homePage,
      onUnknownRoute: (settings) {
        return MaterialPageRoute(
            builder: (_) => Scaffold(
                  appBar: AppBar(title: const Text("unknown")),
                ));
      },
    );
  }
}
16
likes
0
pub points
63%
popularity

Publisher

verified publisheremintolgahanpolat.com

Route Map is a convenient code generator for Navigator 2.0. Inspired by injectable.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on route_map