destination_lock 0.0.2+3
destination_lock: ^0.0.2+3 copied to clipboard

Lock/unlock destinations that your application can reach

example/destination_lock_example.dart

import 'package:destination_lock/destination_lock.dart';
import 'package:destination_lock/tree/models/regular_route.dart';
import 'package:destination_lock/tree/models/root_route.dart';

List<String> _blockedRoutes = [];
DestinationLock routeTree = DestinationLock(
  rootRoute: RootRoute(
    widget: null,
  ),
  regularRoutes: [
    RegularRoute(
      path: '/c',
      widget: null,
      children: [
        RegularRoute(
          path: '/c/a',
          widget: null,
        ),
        RegularRoute(
          path: '/c/b',
          widget: null,
        ),
      ],
    ),
    RegularRoute(
      path: '/d',
      widget: null,
    ),
  ],
  blockedRoutes: _blockedRoutes,
);

final map = routeTree.convertToTreeStructure();
0
likes
100
pub points
0%
popularity

Lock/unlock destinations that your application can reach

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on destination_lock