Help with material design badges implementation.
First, you need to import the package:
import 'package:dynamic_badges/dynamic_badges.dart';
class Example extends StatelessWidget {
const Example({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return DynamicBadge(
count: 1000,
child: IconButton(
onPressed: () {},
icon: const Icon(
Icons.groups_2_outlined,
),
),
);
}
}
class Example extends StatelessWidget {
const Example({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const DynamicBadge.small(
child: Icon(
Icons.email,
size: 48,
),
);
}
}