Skip to content

Commit 526f705

Browse files
author
Ibrahim Mohamed
committed
Replace existsSync() with exists() to improve performance
1 parent 7319dbe commit 526f705

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/flutter_paytabs_bridge.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class FlutterPaytabsBridge {
248248

249249
static Future<String> handleImagePath(String path) async {
250250
var bytes;
251-
if (File(path).existsSync()) {
251+
if (await File(path).exists()) {
252252
bytes = File(path).readAsBytesSync().buffer.asByteData();
253253
} else {
254254
bytes = await rootBundle.load(path);

0 commit comments

Comments
 (0)