tp_router 0.6.2 copy "tp_router: ^0.6.2" to clipboard
tp_router: ^0.6.2 copied to clipboard

discontinuedreplaced by: teleport_router

A simplified Flutter router based on go_router with annotation support.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:tp_router/tp_router.dart';
import 'routes/route.gr.dart';

void main() {
  // Use generated routes
  final router = TpRouter(
    defaultPageType: TpPageType.swipeBack,
    routes: tpRoutes,
    routerNeglect: true, // Demo new parameter
  );

  runApp(MyApp(router: router));
}

class MyApp extends StatelessWidget {
  final TpRouter router;

  const MyApp({required this.router, super.key});

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

Publisher

verified publisherpub.lwjlol.com

Weekly Downloads

A simplified Flutter router based on go_router with annotation support.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, go_router, tp_router_annotation

More

Packages that depend on tp_router