flutter_staggered_grid_view
flutter_staggered_grid_view copied to clipboard
What is the Tile widget in the example?
I cannot locate the widget Title?
@wyxcoder
https://github.com/letsar/flutter_staggered_grid_view/blob/0bfd05f285a6ecf390a8927e6ad4e67f7a39979b/examples/lib/common.dart#L31C1-L75C2
class Tile extends StatelessWidget {
const Tile({
Key? key,
required this.index,
this.extent,
this.backgroundColor,
this.bottomSpace,
}) : super(key: key);
final int index;
final double? extent;
final double? bottomSpace;
final Color? backgroundColor;
@override
Widget build(BuildContext context) {
final child = Container(
color: backgroundColor,
height: extent,
child: Center(
child: CircleAvatar(
minRadius: 20,
maxRadius: 20,
backgroundColor: Colors.white,
foregroundColor: Colors.black,
child: Text('$index', style: const TextStyle(fontSize: 20)),
),
),
);
if (bottomSpace == null) {
return child;
}
return Column(
children: [
Expanded(child: child),
Container(
height: bottomSpace,
color: Colors.green,
)
],
);
}
}