Skip to content

Commit af34d49

Browse files
reformat the code
1 parent f804c51 commit af34d49

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

lib/core/helpers/custom_alert_dialog.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ class CustomAlertDialog {
3232
final BuildContext context;
3333
CustomAlertDialog(this.context);
3434

35-
Future<bool?> openDialog(DialogParameters parameters,
36-
{bool barrierDismissible = true}) {
35+
Future<bool?> openDialog(DialogParameters parameters, {bool barrierDismissible = true}) {
3736
return showDialog<bool>(
3837
context: context,
3938
barrierDismissible: barrierDismissible,
@@ -90,8 +89,7 @@ class _Content extends StatelessWidget {
9089
children: [
9190
Padding(
9291
padding: REdgeInsets.symmetric(vertical: 10),
93-
child: BoldText(parameters.actionText,
94-
color: ThemeEnum.redColor),
92+
child: BoldText(parameters.actionText, color: ThemeEnum.redColor),
9593
),
9694
],
9795
),
@@ -100,8 +98,7 @@ class _Content extends StatelessWidget {
10098
const CustomDivider(withHeight: false),
10199
InkWell(
102100
borderRadius: BorderRadius.only(
103-
bottomLeft: Radius.circular(_borderRadius.r),
104-
bottomRight: Radius.circular(_borderRadius.r)),
101+
bottomLeft: Radius.circular(_borderRadius.r), bottomRight: Radius.circular(_borderRadius.r)),
105102
onTap: () {
106103
final onTapCancel = parameters.onTapCancel;
107104
if (onTapCancel != null) onTapCancel();
@@ -117,8 +114,7 @@ class _Content extends StatelessWidget {
117114
children: [
118115
Padding(
119116
padding: REdgeInsets.symmetric(vertical: 10),
120-
child: RegularText(parameters.cancelText,
121-
color: ThemeEnum.focusColor),
117+
child: RegularText(parameters.cancelText, color: ThemeEnum.focusColor),
122118
),
123119
],
124120
),

lib/core/widgets/custom_widgets/custom_icon.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ class CustomIcon extends StatelessWidget {
66
const CustomIcon(
77
this.icon, {
88
this.size = 22,
9-
this.color ,
9+
this.color,
1010
this.shadows,
1111
super.key,
1212
});
1313
final IconData icon;
14-
final Color ?color;
14+
final Color? color;
1515
final double size;
1616
final List<Shadow>? shadows;
1717
@override
1818
Widget build(BuildContext context) {
1919
return Icon(
2020
icon,
21-
color: color??ColorManager.black,
21+
color: color ?? ColorManager.black,
2222
size: size.r,
2323
shadows: shadows,
2424
);

lib/core/widgets/custom_widgets/custom_rounded_elevated_button.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ class CustomRoundedElevatedButton extends StatelessWidget {
2626
Widget build(BuildContext context) {
2727
final backgroundColor = this.backgroundColor;
2828
final shadowColor = this.shadowColor;
29-
final background =
30-
backgroundColor == null ? null : context.getColor(backgroundColor);
29+
final background = backgroundColor == null ? null : context.getColor(backgroundColor);
3130
final shadow = shadowColor == null ? null : context.getColor(shadowColor);
3231

3332
return ElevatedButton(
@@ -36,8 +35,7 @@ class CustomRoundedElevatedButton extends StatelessWidget {
3635
shadowColor: shadow ?? ColorManager.transparent,
3736
fixedSize: fitToContent ? Size.fromHeight(fixedSize.r) : Size.fromWidth(fixedSize.r),
3837
padding: EdgeInsets.symmetric(horizontal: 15.r),
39-
shape: RoundedRectangleBorder(
40-
borderRadius: BorderRadius.circular(roundedRadius).r),
38+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(roundedRadius).r),
4139
surfaceTintColor: background,
4240
foregroundColor: context.getColor(ThemeEnum.hintColor),
4341
),

lib/core/widgets/custom_widgets/custom_switch.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,16 @@ class CustomSwitch extends ConsumerWidget {
2222
value: value,
2323
onChanged: onChanged,
2424
activeTrackColor: context.getColor(ThemeEnum.focusColor),
25-
activeColor: context.getColor(ThemeEnum.whiteD1Color),
25+
activeThumbColor: context.getColor(ThemeEnum.whiteD1Color),
2626
inactiveThumbColor: context.getColor(ThemeEnum.whiteColor),
2727
thumbIcon: WidgetStatePropertyAll(
2828
Icon(
2929
Icons.add,
3030
color: context.getColor(ThemeEnum.transparentColor),
3131
),
3232
),
33-
inactiveTrackColor:
34-
isLight ? ColorManager.whiteD5 : ColorManager.blackL3,
35-
trackOutlineColor:
36-
const WidgetStatePropertyAll(ColorManager.transparent),
33+
inactiveTrackColor: isLight ? ColorManager.whiteD5 : ColorManager.blackL3,
34+
trackOutlineColor: const WidgetStatePropertyAll(ColorManager.transparent),
3735
),
3836
);
3937
}

0 commit comments

Comments
 (0)