Skip to content

Instantly share code, notes, and snippets.

@aleguerra05
Created August 24, 2018 18:09
Show Gist options
  • Save aleguerra05/13be1f59a61dfad3e076711a8a67ae97 to your computer and use it in GitHub Desktop.
Save aleguerra05/13be1f59a61dfad3e076711a8a67ae97 to your computer and use it in GitHub Desktop.
decode image base64 in flutter
@override
Widget build(BuildContext context) {
if (_base64 == null)
return new Container();
Uint8List bytes = BASE64.decode(_base64);
return new Scaffold(
appBar: new AppBar(title: new Text('Example App')),
body: new ListTile(
leading: new Image.memory(bytes),
title: new Text(_base64),
),
);
}
@mohamedashraf8850
Copy link

Uint8List bytes = base64.decode(text);

@aleguerra05
Copy link
Author

Thanks

@Dev-MohsinKhan
Copy link

Thanks, It worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment