card-management

This commit is contained in:
2025-05-19 16:30:27 +05:30
parent 2b2605cecc
commit 98f2270614
8 changed files with 375 additions and 20 deletions

View File

@@ -33,13 +33,20 @@ class _BlockCardScreen extends State<BlockCardScreen>{
if (_formKey.currentState?.validate() ?? false) {
// Call your backend logic here
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Card has been blocked'),
duration: Duration(seconds: 3),
behavior: SnackBarBehavior.floating,
final snackBar = SnackBar(
content: const Text('Card has been blocked'),
action: SnackBarAction(
label: 'X',
onPressed: () {
// Just close the SnackBar
},
textColor: Colors.white,
),
backgroundColor: Colors.black,
behavior: SnackBarBehavior.floating,
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);
}
}
@@ -166,16 +173,22 @@ class _BlockCardScreen extends State<BlockCardScreen>{
validator: (value) =>
value != null && value.length >= 10 ? null : 'Enter valid phone number',
),
const SizedBox(height: 35),
ElevatedButton(
onPressed: _blockCard,
style: ElevatedButton.styleFrom(
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(vertical: 16),
backgroundColor: Colors.blue[900],
foregroundColor: Colors.white,
const SizedBox(height: 45),
Align(
alignment: Alignment.center,
child: SizedBox(
width: 250,
child: ElevatedButton(
onPressed: _blockCard,
style: ElevatedButton.styleFrom(
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(vertical: 16),
backgroundColor: Colors.blue[900],
foregroundColor: Colors.white,
),
child: const Text('Block'),
),
),
child: const Text('Block'),
),
],
),