flutter_channel_method_channel.dart
585 Bytes
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'flutter_channel_platform_interface.dart';
/// An implementation of [FlutterChannelPlatform] that uses method channels.
class MethodChannelFlutterChannel extends FlutterChannelPlatform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('flutter_channel');
@override
Future<String?> getChannel() async {
final version = await methodChannel.invokeMethod<String>('getChannel');
return version;
}
}