appBarActionButtonCircle method
Widget
appBarActionButtonCircle(
- BuildContext context,
- IconData icon, {
- Function? onTap,
- bool loading = false,
Implementation
Widget appBarActionButtonCircle(BuildContext context, IconData icon,
{Function? onTap, bool loading = false}) {
return Container(
margin: EdgeInsets.only(right: DUI.spacing.lateralPaddingValue),
child: Ink(
decoration: ShapeDecoration(
color: Theme.of(context).colorScheme.background,
shape: const CircleBorder(),
),
child: IconButton(
icon: loading
? DUI.misc.loadingAnimation(context, size: 16)
: Icon(icon),
onPressed: () async {
if (onTap != null) {
onTap();
}
},
),
),
);
}