access_warrant 0.0.1 copy "access_warrant: ^0.0.1" to clipboard
access_warrant: ^0.0.1 copied to clipboard

discontinued
outdated

A package responsible for granting access rights to a specific part in the widget tree.

Access Warrant #

A package responsible for controlling access to a specific part in the widget tree.

Usage #

To use this plugin, add access_warrant as a dependency in your pubspec.yaml file.

Example #

Import the library.

import 'package:access_warrant/access_warrant.dart';

Then wrap the code you want to controll access to in validBuilder like so:

AccessWarrant(
  validBuilder: (context) => Text('A widget you do not want to show until access rights confirmed.'),
  check: () => {
    // Any code that checks "access warrant" and returns boolean to claim whether access is allowed or not.
  },
  wrongBuilder: (context) => Text('Show this if access is restricted.'),
),

Then on wrongBuilder page you can perform user authorization or do any other things necessary and notify the closest AccessWarrant to show the restricted content:

AccessWarrant.grantAccess(context);
3
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A package responsible for granting access rights to a specific part in the widget tree.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on access_warrant