flutter_channel.dart
431 Bytes
import 'dart:io';
import 'flutter_channel_platform_interface.dart';
class FlutterChannel {
Future<String?> getChannel() {
if (Platform.isAndroid) {
return FlutterChannelPlatform.instance.getChannel();
} else if (Platform.isIOS) {
return Future.value("ios");
} else if (Platform.operatingSystem == "ohos") {
return Future.value("ohos");
} else {
return Future.value("other");
}
}
}