teleport_router_generator 0.8.1 copy "teleport_router_generator: ^0.8.1" to clipboard
teleport_router_generator: ^0.8.1 copied to clipboard

A build_runner code generator that processes teleport_router annotations to generate type-safe routing code for Flutter applications.

example/lib/main.dart

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

// This is a minimal example showing annotation usage.
// Run: flutter pub run build_runner build
// to generate lib/teleport_router.gr.dart

/// Simple page demonstrating @TeleportRoute annotation.
@TeleportRoute()
class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Home')),
      body: const Center(
        child: Text('teleport_router_generator example'),
      ),
    );
  }
}

// After running build_runner, you'll get a generated HomeRoute class
// that can be used like: HomeRoute().teleport()
//
// For a complete working example, see:
// https://github.com/lwj1994/teleport_router/tree/main/teleport_router/example
0
likes
50
points
44
downloads

Publisher

unverified uploader

Weekly Downloads

A build_runner code generator that processes teleport_router annotations to generate type-safe routing code for Flutter applications.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, build, glob, source_gen, teleport_router_annotation

More

Packages that depend on teleport_router_generator