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

Deterministic hand-drawn kawaii avatars for Flutter. One seed in, one avatar out, rendered natively with CustomPainter. iOS, Android, web, and desktop.

example/lib/main.dart

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

void main() => runApp(const ExampleApp());

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              // A seed always renders the same avatar.
              const HumationAvatar(seed: 'felix', size: 160),
              const SizedBox(height: 24),
              // Or pick parts and colours. Slots are constants; colours take a
              // Flutter Color or a hex string.
              const HumationAvatar(
                selections: {
                  HumationSlot.head: 'wavy-medium',
                  HumationSlot.body: 'hoodie',
                },
                colors: {HumationColorSlot.hair: Color(0xFF4A3728)},
                size: 96,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
34
downloads

Documentation

API reference

Publisher

verified publisher0xharkirat.com

Weekly Downloads

Deterministic hand-drawn kawaii avatars for Flutter. One seed in, one avatar out, rendered natively with CustomPainter. iOS, Android, web, and desktop.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#avatar #svg #identicon #custompainter

License

MIT (license)

Dependencies

flutter, humation, humation_assets_humation_1, xml

More

Packages that depend on humation_flutter