FlutterPermissionKitConfig class
Configuration class for Flutter Permission Kit
This class contains all the configuration options for customizing the appearance and behavior of permission request dialogs. It allows you to specify which permissions to request, how they should be displayed, and various UI customization options.
Example usage:
// Using custom permission names and descriptions
final config = FlutterPermissionKitConfig(
permissions: [
Permission(
name: 'Camera',
description: 'Take photos and videos',
type: PermissionType.camera,
),
],
displayType: DisplayType.modal,
displayTitle: 'App Permissions',
);
// Using convenient static methods (name and description will be null)
final quickConfig = FlutterPermissionKitConfig(
permissions: [
Permission.camera,
Permission.photos,
Permission.microphone,
],
displayType: DisplayType.alert,
displayTitle: 'Required Permissions',
);
Constructors
-
FlutterPermissionKitConfig({required List<
Permission> permissions, DisplayType displayType = DisplayType.alert, String displayTitle = 'Permission Request', String displayHeaderDescription = 'To provide key features and a seamless experience, we require access to certain permissions.', String displayBottomDescription = 'Permissions can be managed later in Settings if you change your mind.'}) - Creates a new FlutterPermissionKitConfig instance
Properties
- displayBottomDescription → String
-
Description text shown at the bottom of the permission list
final
- displayHeaderDescription → String
-
Description text shown in the header section
final
- displayTitle → String
-
The main title displayed at the top of the permission request
final
- displayType → DisplayType
-
How the permission request should be displayed to the user
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
permissions
→ List<
Permission> -
List of permissions to request from the user
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this FlutterPermissionKitConfig instance to a JSON-serializable Map
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited