FlutterPermissionKitChannel class

Platform channel communication handler for Flutter Permission Kit

This class serves as the bridge between the Flutter Dart code and the native iOS implementation. It handles all communication through Flutter's MethodChannel system, allowing the Flutter app to invoke native iOS permission handling code using iOS frameworks.

The class follows the singleton pattern with static methods, ensuring a single point of communication with the iOS platform. This design prevents multiple channel instances and potential conflicts.

Key responsibilities:

  • Establishing communication channel with native iOS code
  • Serializing configuration data for iOS platform transmission
  • Invoking native iOS permission handling methods
  • Managing the lifecycle of iOS permission requests
  • Handling iOS-specific permission responses and status updates

Example usage:

final config = FlutterPermissionKitConfig(
  permissions: [Permission(type: PermissionType.camera)],
);
await FlutterPermissionKitChannel.init(config);

Properties

hashCode int
The hash code for this object.
no setterinherited
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
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

init(FlutterPermissionKitConfig config) Future<bool>
Initializes the permission kit with the provided configuration for iOS
request(PermissionType permission) Future<AuthorizationStatus>
Request a permission without any UI.