Skip to content

Commit

Permalink
Remove MethodChannelPermissionHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenWeener committed Oct 13, 2023
1 parent 758ebe8 commit 26fd5a8
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 415 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ library permission_handler_platform_interface;
import 'dart:async';
import 'package:meta/meta.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'src/method_channel/method_channel_permission_handler.dart';

part 'src/permission_handler_platform_interface.dart';
part 'src/permission_status.dart';
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ abstract class PermissionHandlerPlatform extends PlatformInterface {

/// The instance of [PermissionHandlerPlatform] to use.
///
/// Returns:
/// - The instance, if it has been created, or
/// - A newly created instance through the builder provided in
/// [setInstanceBuilder], or
/// - A default, platform-specific implementation of
/// [PermissionHandlerPlatform], as [MethodChannelPermissionHandler].
/// Returns the instance, if it has been created, or a newly created instance
/// through the builder provided in [setInstanceBuilder]. Throws an
/// [Exception] if there is no instance, and [setInstanceBuilder] has not been
/// called.
static PermissionHandlerPlatform get instance {
if (_instance == null) {
if (_instanceBuilder != null) {
_instance = _instanceBuilder!();
PlatformInterface.verifyToken(_instance!, _token);
} else {
_instance = MethodChannelPermissionHandler();
if (_instanceBuilder == null) {
throw Exception(
'No instance builder was provided. Did you call `setInstanceBuilder`?');
}

_instance = _instanceBuilder!();
PlatformInterface.verifyToken(_instance!, _token);
}

return _instance!;
}

Expand Down

This file was deleted.

Loading

0 comments on commit 26fd5a8

Please sign in to comment.