face_pile 0.0.2 face_pile: ^0.0.2 copied to clipboard
Displays a stacked list of users. Each circle represents a person and contains their image. This widget is usually used when sharing who has access to a specific view or file, or when assigning tasks [...]
import 'package:face_pile/face_pile.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: "Face Pile Example",
theme: ThemeData(primarySwatch: Colors.blue),
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Face Pile Example")),
body: Padding(
padding: const EdgeInsets.all(16),
child: Column(
children: [
FacePile(
radius: 32,
space: 40,
images: const [
NetworkImage("https://i.pravatar.cc/300?img=1"),
NetworkImage("https://i.pravatar.cc/300?img=2"),
NetworkImage("https://i.pravatar.cc/300?img=3"),
NetworkImage("https://i.pravatar.cc/300?img=4"),
],
backgroundColor: Colors.red,
childBackgroundColor: Colors.blue,
border: Border.all(color: Colors.white70, width: 3),
child: const Text("3+"),
),
],
),
),
);
}
}