flutter_channel_platform_interface.dart
1013 Bytes
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'flutter_channel_method_channel.dart';
abstract class FlutterChannelPlatform extends PlatformInterface {
/// Constructs a FlutterChannelPlatform.
FlutterChannelPlatform() : super(token: _token);
static final Object _token = Object();
static FlutterChannelPlatform _instance = MethodChannelFlutterChannel();
/// The default instance of [FlutterChannelPlatform] to use.
///
/// Defaults to [MethodChannelFlutterChannel].
static FlutterChannelPlatform get instance => _instance;
/// Platform-specific implementations should set this with their own
/// platform-specific class that extends [FlutterChannelPlatform] when
/// they register themselves.
static set instance(FlutterChannelPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
_instance = instance;
}
Future<String?> getChannel() {
throw UnimplementedError('platformVersion() has not been implemented.');
}
}