fix bugs and set progress and toast for my items server events

This commit is contained in:
fhkhd
2024-01-28 17:41:17 +03:30
parent fd93bf894f
commit d02cb43a7a
4 changed files with 132 additions and 63 deletions
@@ -9,6 +9,7 @@ class TransferDestroyButton extends StatelessWidget {
required this.onTap,
required this.text,
this.fontSize = 5.0,
this.isLoadingButton = false,
}) : _deviceBlockSize = deviceBlockSize,
super(key: key);
final double _deviceBlockSize;
@@ -17,6 +18,7 @@ class TransferDestroyButton extends StatelessWidget {
final String text;
final VoidCallback onTap;
final double fontSize;
final bool isLoadingButton;
@override
Widget build(BuildContext context) {
@@ -33,16 +35,22 @@ class TransferDestroyButton extends StatelessWidget {
),
borderRadius: BorderRadius.circular(7),
),
child: Align(
alignment: Alignment.center,
child: Text(
text,
style: TextStyle(
color: Colors.white,
fontSize: fontSize * _deviceBlockSize,
),
),
),
child: isLoadingButton
? Center(
child: CircularProgressIndicator(
color: Colors.white,
),
)
: Align(
alignment: Alignment.center,
child: Text(
text,
style: TextStyle(
color: Colors.white,
fontSize: fontSize * _deviceBlockSize,
),
),
),
),
);
}