teleport_router 0.8.0 copy "teleport_router: ^0.8.0" to clipboard
teleport_router: ^0.8.0 copied to clipboard

A simplified Flutter router based on go_router with annotation support.

example/lib/main.dart

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

void main() {
  // Use generated routes
  final router = TeleportRouter(
    defaultPageType: TeleportPageType.swipeBack,
    routes: teleportRoutes,
    enableLogging: true,
    routerNeglect: true, // Demo new parameter
  );

  runApp(MyApp(router: router));
}

class MyApp extends StatelessWidget {
  final TeleportRouter router;

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

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

Publisher

unverified uploader

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, teleport_router_annotation

More

Packages that depend on teleport_router