Skip to content

Instantly share code, notes, and snippets.

@jtmuller5
Created March 25, 2021 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtmuller5/c77c3b76d81caf88ec966aaa0f906b8f to your computer and use it in GitHub Desktop.
Save jtmuller5/c77c3b76d81caf88ec966aaa0f906b8f to your computer and use it in GitHub Desktop.
Future<void> sendImage() async {
AtKey atKey = AtKey();
atKey.key = 'pic';
/// Share with the other sign
if (shareWith) {
atKey.sharedWith = AtConstants().atMap[atProtocolService.currentAtSign];
}
String encodedImage = Base2e15.encode(
image.readAsBytesSync(),
);
await atProtocolService.atClientImpl.put(atKey, encodedImage);
notifyListeners();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment