blockies_ethereum 0.0.2 blockies_ethereum: ^0.0.2 copied to clipboard
Generate metamask kind of blockies with ethereum address.
import 'package:blockies_ethereum/blockies_ethereum.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
final userAddress = '0x6Acf5505DF3Eada0BF0547FAb88a85b1A2e03F15';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Blockies'),
),
body: Blockies(
data: userAddress.toLowerCase(),
size: .8,
shape: BlockiesShape.circle,
),
);
}
}