Skip to content

Commit

Permalink
Remove dependency on dart:io
Browse files Browse the repository at this point in the history
Signed-off-by: Shengqi Chen <[email protected]>
  • Loading branch information
Harry-Chen committed Dec 20, 2024
1 parent 07ded1f commit b8d7d56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
This is a release candidate for 3.6.0. Please test it and report any issues.

* Remove annoying dependency on `js` library, replace with `dart:js_interop`
* Remove dependency on `dart:io`
* Contributions on Android plugin from @knthm:
* Dedicated handler thread for IO operations (#167)
* More elegant exception handling (#169)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ class FlutterNfcKitPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
}
}

// do nothing, just for compatibility
"setIosAlertMessage" -> { result.success("") }
}
}

Expand Down
3 changes: 1 addition & 2 deletions lib/flutter_nfc_kit.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io' show Platform;

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

0 comments on commit b8d7d56

Please sign in to comment.