Skip to content

Commit

Permalink
Add missing await
Browse files Browse the repository at this point in the history
Close #96
  • Loading branch information
natsuk4ze committed Aug 17, 2023
1 parent 057c42a commit da0c22c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/src/gal_platform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ final class GalPlatform {
}
}

static Future<void> putVideo(String path, {String? album}) =>
_invokeMethod<void>('putVideo', {'path': path, 'album': album});
static Future<void> putVideo(String path, {String? album}) async {
await _invokeMethod<void>('putVideo', {'path': path, 'album': album});
}

static Future<void> putImage(String path, {String? album}) =>
_invokeMethod<void>('putImage', {'path': path, 'album': album});
static Future<void> putImage(String path, {String? album}) async {
await _invokeMethod<void>('putImage', {'path': path, 'album': album});
}

static Future<void> putImageBytes(Uint8List bytes, {String? album}) =>
_invokeMethod<void>('putImageBytes', {'bytes': bytes, 'album': album});
static Future<void> putImageBytes(Uint8List bytes, {String? album}) async {
await _invokeMethod<void>(
'putImageBytes', {'bytes': bytes, 'album': album});
}

static Future<void> open() async => _invokeMethod<void>('open', {});

Expand Down

0 comments on commit da0c22c

Please sign in to comment.