flutter_thumbhash 0.1.0 copy "flutter_thumbhash: ^0.1.0" to clipboard
flutter_thumbhash: ^0.1.0 copied to clipboard

Flutter implementation of ThumbHash algorithm.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_thumbhash/flutter_thumbhash.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final hash = ThumbHash.fromBase64('3OcRJYB4d3h/iIeHeEh3eIhw+j3A');
    return Scaffold(
      backgroundColor: hash.toAverageColor(),
      body: Image(
        image: hash.toImage(),
        height: double.infinity,
        width: double.infinity,
        fit: BoxFit.contain,
      ),
    );
  }
}
4
likes
140
points
178
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter implementation of ThumbHash algorithm.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, thumbhash

More

Packages that depend on flutter_thumbhash