Created
August 24, 2018 18:09
-
-
Save aleguerra05/13be1f59a61dfad3e076711a8a67ae97 to your computer and use it in GitHub Desktop.
decode image base64 in flutter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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), | |
), | |
); | |
} |
Thanks
Thanks, It worked for me!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uint8List bytes = base64.decode(text);