Skip to content

Commit

Permalink
Make the API async
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitarPetrov committed Oct 27, 2019
1 parent 0034de2 commit 9416815
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ explicitly in the `resultFileName` argument.
in the `resultFileName` argument.

## 0.0.3
Fix gradle setup.
Fix gradle setup.

## 0.0.4

Make the API async.
8 changes: 4 additions & 4 deletions lib/flutter_stegify.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ class Stegify {
static const MethodChannel _channel = const MethodChannel('flutter_stegify');

/// encode performs steganography encoding of data file in carrier file and saves the steganography encoded product in new file.
static void encode(String carrier, String data, String result) async {
await _channel.invokeMethod("encode", [carrier, data, result]);
static Future<void> encode(String carrier, String data, String result) async {
return _channel.invokeMethod("encode", [carrier, data, result]);
}

/// decode performs steganography decoding of data previously encoded by the Encode function.
/// The data is decoded from file carrier and it is saved in separate new file
static void decode(String carrier, String result) async {
await _channel.invokeMethod("decode", [carrier, result]);
static Future<void> decode(String carrier, String result) async {
return _channel.invokeMethod("decode", [carrier, result]);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_stegify
description: Flutter plugin for steganography encoding and decoding files within an image using stegify API.
version: 0.0.3
version: 0.0.4
author: Dimitar Petrov <[email protected]>
homepage: https://github.com/DimitarPetrov/stegify-flutter-plugin

Expand Down

0 comments on commit 9416815

Please sign in to comment.