mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-14 02:18:59 +03:30
fix bugs and set progress and toast for my items server events
This commit is contained in:
@@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user