Migrate to ADFilledButton & ADTextButton

This commit is contained in:
Ashita Prasad
2024-12-16 03:24:57 +05:30
parent 1452668280
commit fe558a066a
10 changed files with 158 additions and 77 deletions

View File

@ -16,34 +16,31 @@ class SendButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return FilledButton(
return ADFilledButton(
onPressed: isWorking ? onCancel : onTap,
child: Row(
mainAxisSize: MainAxisSize.min,
children: isWorking
? const [
Text(
kLabelCancel,
style: kTextStyleButton,
),
kHSpacer10,
Icon(
size: 16,
Icons.cancel,
)
]
: const [
Text(
kLabelSend,
style: kTextStyleButton,
),
kHSpacer10,
Icon(
size: 16,
Icons.send,
),
],
),
items: isWorking
? const [
Text(
kLabelCancel,
style: kTextStyleButton,
),
kHSpacer10,
Icon(
size: 16,
Icons.cancel,
)
]
: const [
Text(
kLabelSend,
style: kTextStyleButton,
),
kHSpacer10,
Icon(
size: 16,
Icons.send,
),
],
);
}
}