init
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
import 'package:tencent_cloud_chat_uikit/import_proxy/import_proxy.dart';
|
||||
|
||||
ImportProxy getImportProxy() =>
|
||||
throw UnsupportedError('Cannot create a ImportProxy.');
|
||||
@@ -0,0 +1,11 @@
|
||||
import 'package:tencent_cloud_chat_uikit/import_proxy/general.dart'
|
||||
// ignore: uri_does_not_exist
|
||||
if (dart.library.html) 'platform/web_import.dart'
|
||||
// ignore: uri_does_not_exist
|
||||
if (dart.library.io) 'platform/native_import.dart';
|
||||
|
||||
abstract class ImportProxy {
|
||||
getFlutterPluginRecord();
|
||||
|
||||
factory ImportProxy() => getImportProxy();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import 'package:flutter_plugin_record_plus/flutter_plugin_record.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/import_proxy/import_proxy.dart';
|
||||
|
||||
class NativeImport implements ImportProxy {
|
||||
@override
|
||||
FlutterPluginRecord? getFlutterPluginRecord() {
|
||||
return FlutterPluginRecord();
|
||||
}
|
||||
}
|
||||
|
||||
ImportProxy getImportProxy() => NativeImport();
|
||||
@@ -0,0 +1,10 @@
|
||||
import 'package:tencent_cloud_chat_uikit/import_proxy/import_proxy.dart';
|
||||
|
||||
class WebImport implements ImportProxy {
|
||||
@override
|
||||
void getFlutterPluginRecord() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ImportProxy getImportProxy() => WebImport();
|
||||
Reference in New Issue
Block a user