How to native convert string -> base64 and base64 -> string

后端 未结 4 1364
执笔经年
执笔经年 2020-11-28 15:46

How to native convert string -> base64 and base64 -> string

I\'m find only this bytes to base64string

would like this:

4条回答
  •  没有蜡笔的小新
    2020-11-28 16:26

    I took a class dart.io -> base64.dart, modified it a bit, and there you are

    how to use:

    var somestring = 'Hello dart!';
    
    var base64string = Base64String.encode( somestring );
    var mystring = Base64String.decode( base64string );
    

    source on pastbin.com

    source on gist.github.com

提交回复
热议问题