Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/flutter_paytabs_bridge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,12 @@ class FlutterPaytabsBridge {
}

static Future<String> handleImagePath(String path) async {
var bytes = await rootBundle.load(path);
var bytes;
if (File(path).existsSync()) {
bytes = File(path).readAsBytesSync().buffer.asByteData();
} else {
bytes = await rootBundle.load(path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause the same exception to be thrown.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should try the first commit as it is working as expected.

}
String dir = (await getApplicationDocumentsDirectory()).path;
var imageName = path.split("/").last;
String logoPath = '$dir/$imageName';
Expand Down