fma_go_router 0.2.0 copy "fma_go_router: ^0.2.0" to clipboard
fma_go_router: ^0.2.0 copied to clipboard

Plugin for Flutter Micro App package with Go Router integration

example/main.dart

// Using Go Router (Advanced and flexible)
import 'package:flutter/widgets.dart';
import 'package:flutter_micro_app/flutter_micro_app.dart';
import 'package:fma_go_router/fma_go_router.dart';
import 'package:go_router/go_router.dart';

final FmaGoRouter fmaGoRouter = FmaGoRouter(
  name: 'GoRouter Example',
  description: 'This is an example of GoRouter',
  goRouter: GoRouter(
    navigatorKey: NavigatorInstance.navigatorKey,
    routes: <RouteBase>[
      FmaGoRoute(
        description: 'This is the boot page',
        path: '/',
        builder: (BuildContext context, GoRouterState state) {
          return Container();
        },
        routes: <RouteBase>[
          FmaGoRoute(
            description: 'This page has path parameter',
            path: 'page_with_id/:id',
            builder: (context, state) {
              return Container();
            },
          ),
          FmaGoRoute(
            description: 'This is the first page',
            path: 'page1',
            builder: (context, state) {
              return Container();
            },
          ),
        ],
      ),
    ],
  ),
);
0
likes
140
points
39
downloads

Publisher

unverified uploader

Weekly Downloads

Plugin for Flutter Micro App package with Go Router integration

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_micro_app, go_router

More

Packages that depend on fma_go_router