Skip to content

Commit 887546b

Browse files
Merge branch 'development' into issue1377
2 parents e041125 + 854bf07 commit 887546b

File tree

1 file changed

+39
-52
lines changed

1 file changed

+39
-52
lines changed

lib/view/widgets/badge_delete_dialog.dart

Lines changed: 39 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,80 +2,67 @@ import 'package:flutter/material.dart';
22
import 'package:flutter_screenutil/flutter_screenutil.dart';
33

44
class DeleteBadgeDialog extends StatelessWidget {
5-
const DeleteBadgeDialog({
6-
super.key,
7-
});
5+
const DeleteBadgeDialog({super.key});
86

97
@override
108
Widget build(BuildContext context) {
119
return Dialog(
10+
insetPadding: EdgeInsets.symmetric(horizontal: 24.w),
1211
shape: RoundedRectangleBorder(
13-
borderRadius: BorderRadius.circular(5.r),
12+
borderRadius: BorderRadius.circular(12.r),
1413
),
15-
child: Container(
16-
height: 110.h,
17-
width: 300.w,
18-
decoration: BoxDecoration(
19-
color: Colors.white,
20-
borderRadius: BorderRadius.circular(5.r),
21-
),
14+
child: Padding(
15+
padding: EdgeInsets.all(20.w),
2216
child: Column(
17+
mainAxisSize: MainAxisSize.min,
18+
crossAxisAlignment: CrossAxisAlignment.start,
2319
children: [
24-
SizedBox(
25-
height: 10.h,
26-
),
2720
Row(
2821
children: [
29-
SizedBox(
30-
width: 20,
31-
),
32-
Icon(Icons.delete, color: Colors.black),
33-
SizedBox(
34-
width: 10,
35-
),
36-
Text(
37-
'Delete',
38-
style: TextStyle(
39-
fontSize: 16.sp,
40-
fontWeight: FontWeight.w500,
22+
Icon(Icons.delete_outline, color: Colors.red),
23+
SizedBox(width: 10.w),
24+
Expanded(
25+
child: Text(
26+
'Delete Badge',
27+
style: TextStyle(
28+
fontSize: 18.sp,
29+
fontWeight: FontWeight.w600,
30+
),
4131
),
4232
),
4333
],
4434
),
45-
SizedBox(
46-
height: 7.h,
47-
),
48-
Row(
49-
children: [
50-
SizedBox(
51-
width: 20,
52-
),
53-
Text('Are you sure want to delete this badge?',
54-
style: TextStyle(fontSize: 14.sp)),
55-
],
56-
),
57-
SizedBox(
58-
height: 10.h,
35+
SizedBox(height: 16.h),
36+
Text(
37+
'Are you sure you want to delete this badge? This action cannot be undone.',
38+
style: TextStyle(fontSize: 15.sp),
5939
),
40+
SizedBox(height: 24.h),
6041
Row(
6142
mainAxisAlignment: MainAxisAlignment.end,
6243
children: [
6344
TextButton(
64-
onPressed: () {
65-
Navigator.of(context).pop(false);
66-
},
67-
child: const Text(
45+
onPressed: () => Navigator.of(context).pop(false),
46+
child: Text(
6847
'Cancel',
69-
style: TextStyle(color: Colors.red),
48+
style: TextStyle(
49+
color: Theme.of(context).colorScheme.secondary,
50+
fontSize: 14.sp,
51+
),
7052
),
7153
),
72-
TextButton(
73-
onPressed: () {
74-
Navigator.of(context).pop(true);
75-
},
76-
child: const Text(
77-
'OK',
78-
style: TextStyle(color: Colors.red),
54+
SizedBox(width: 8.w),
55+
ElevatedButton(
56+
style: ElevatedButton.styleFrom(
57+
backgroundColor: Colors.red,
58+
padding:
59+
EdgeInsets.symmetric(horizontal: 20.w, vertical: 10.h),
60+
minimumSize: Size(64.w, 36.h),
61+
),
62+
onPressed: () => Navigator.of(context).pop(true),
63+
child: Text(
64+
'Delete',
65+
style: TextStyle(fontSize: 14.sp, color: Colors.white),
7966
),
8067
),
8168
],

0 commit comments

Comments
 (0)