extended_type 2.1.0 copy "extended_type: ^2.1.0" to clipboard
extended_type: ^2.1.0 copied to clipboard

Collection of platform agnostic types that can be converted from/to JSON and used in databases and UI.

example/extended_type_example.dart

import 'dart:io';

import 'package:extended_type/extended_type.dart';
import 'package:swiss_knife/swiss_knife_vm.dart';

void main() {
  var dataURLBase64 =
      'data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7';

  var etData = ETDataBase64URL.parse(dataURLBase64)!;

  if (etData.isImage) {
    var fileName = etData.isImageJPEG ? 'image.jpeg' : 'image.png';
    saveFileBytes(File(fileName), etData.data);
  }
}
1
likes
150
pub points
75%
popularity

Publisher

unverified uploader

Collection of platform agnostic types that can be converted from/to JSON and used in databases and UI.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

swiss_knife

More

Packages that depend on extended_type