permissionix 0.1.0+1 copy "permissionix: ^0.1.0+1" to clipboard
permissionix: ^0.1.0+1 copied to clipboard

A simple package to handle user permissions for accessing a feature

Permissionix #

style: very good analysis Powered by Mason License: BSD 3-Clause

A lightweight and flexible package for managing user permissions in Flutter applications.

Features ✨ #

  • Define and manage permissions dynamically.
  • Check user permissions before displaying UI components.
  • Easily integrate with backend-driven permission systems.

Installation 💻 #

❗ Ensure that you have the Flutter SDK installed before using Permissionix.

Add Permissionix to your project using:

dart pub add permissionix

Or add it manually to your pubspec.yaml:

dependencies:
  permissionix: latest_version

Then, run:

flutter pub get

Usage 🚀 #

Import the package:

import 'package:permissionix/permissionix.dart';

Checking Permissions #

final permissionManager = PermissionixManager<String>();
permissionManager.userPermissions = ['view_dashboard'];

if (permissionManager.hasPermission('view_dashboard')) {
  print('User has access to the dashboard');
} else {
  print('Access denied');
}

Using Permissionix Widget #

Permissionix<String>(
  permission: 'view_dashboard',
  child: Text('Dashboard Content'),
  replacement: Text('Access Denied'),
)

Continuous Integration 🤖 #

Permissionix includes a GitHub Actions workflow powered by Very Good Workflows. The CI setup ensures that code is consistently formatted, linted, and tested before merging changes.

By default, every push and pull request triggers:

  • Code formatting checks
  • Linting (using Very Good Analysis)
  • Unit tests with coverage enforcement

License 📄 #

Permissionix is released under the MIT License.


2
likes
150
points
0
downloads

Publisher

verified publishermustafaix.live

Weekly Downloads

A simple package to handle user permissions for accessing a feature

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on permissionix