Support the platform iOS for Flutter (#1079)
This commit is contained in:
@@ -19,11 +19,9 @@ String? _path;
|
||||
|
||||
// see also
|
||||
// https://github.com/flutter/codelabs/blob/main/ffigen_codelab/step_05/lib/ffigen_app.dart
|
||||
// https://api.flutter.dev/flutter/dart-io/Platform-class.html
|
||||
final DynamicLibrary _dylib = () {
|
||||
if (Platform.isIOS) {
|
||||
throw UnsupportedError('Unknown platform: ${Platform.operatingSystem}');
|
||||
}
|
||||
if (Platform.isMacOS) {
|
||||
if (Platform.isMacOS || Platform.isIOS) {
|
||||
if (_path == null) {
|
||||
return DynamicLibrary.open('libsherpa-onnx-c-api.dylib');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user