Skip to content

Commit b8d7d56

Browse files
committed
Remove dependency on dart:io
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
1 parent 07ded1f commit b8d7d56

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@
182182
This is a release candidate for 3.6.0. Please test it and report any issues.
183183

184184
* Remove annoying dependency on `js` library, replace with `dart:js_interop`
185+
* Remove dependency on `dart:io`
185186
* Contributions on Android plugin from @knthm:
186187
* Dedicated handler thread for IO operations (#167)
187188
* More elegant exception handling (#169)

android/src/main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt

+2
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ class FlutterNfcKitPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
380380
}
381381
}
382382

383+
// do nothing, just for compatibility
384+
"setIosAlertMessage" -> { result.success("") }
383385
}
384386
}
385387

lib/flutter_nfc_kit.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'dart:async';
22
import 'dart:convert';
3-
import 'dart:io' show Platform;
43

54
import 'package:flutter/foundation.dart';
65
import 'package:flutter/services.dart';
@@ -433,7 +432,7 @@ class FlutterNfcKit {
433432
/// There must be a valid session when invoking.
434433
/// On Android, call to this function does nothing.
435434
static Future<void> setIosAlertMessage(String message) async {
436-
if (!kIsWeb && Platform.isIOS) {
435+
if (!kIsWeb) {
437436
return await _channel.invokeMethod('setIosAlertMessage', message);
438437
}
439438
}

0 commit comments

Comments
 (0)