Skip to content

Commit 28f8953

Browse files
reformat the code
1 parent bcc2593 commit 28f8953

File tree

9 files changed

+16
-31
lines changed

9 files changed

+16
-31
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
21
enum LanguagesEnum { english, arabic }

lib/core/helpers/app_bar/app_bar.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import 'package:algorithm_visualizer/core/widgets/adaptive/text/adaptive_text.da
66
import 'package:flutter/material.dart';
77

88
class CustomAppBar {
9-
static AppBar iconAppBar(
10-
{bool isShadowTransparent = true, bool withBackButton = true}) {
9+
static AppBar iconAppBar({bool isShadowTransparent = true, bool withBackButton = true}) {
1110
return GlobalAppBar(
1211
centerTitle: true,
1312
// title: const AppLogo(),
@@ -110,10 +109,8 @@ class AppBarCheckButton extends StatelessWidget {
110109
Widget build(BuildContext context) {
111110
return IconButton(
112111
icon: enableTap
113-
? const Icon(Icons.check_rounded,
114-
size: secondAppBarIconSize, color: ColorManager.blue)
115-
: const Icon(Icons.check_rounded,
116-
size: secondAppBarIconSize, color: ColorManager.lightBlue),
112+
? const Icon(Icons.check_rounded, size: secondAppBarIconSize, color: ColorManager.blue)
113+
: const Icon(Icons.check_rounded, size: secondAppBarIconSize, color: ColorManager.lightBlue),
117114
onPressed: () {
118115
final onTap = this.onTap;
119116
if (onTap != null) onTap();

lib/core/helpers/app_bar/back_button.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class CustomAppBarBackButton extends StatelessWidget {
88
Widget build(BuildContext context) {
99
return IconButton(
1010
icon: const CustomBackButtonIcon(),
11-
1211
onPressed: () {
1312
Navigator.maybePop(context);
1413
},

lib/core/helpers/storage/app_settings/app_settings_cubit.dart

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ part 'app_settings_state.dart';
88

99
// Define your StateNotifierProvider
1010
final appSettingsProvider =
11-
StateNotifierProvider<AppSettingsNotifier, AppSettingsState>(
12-
(ref) => AppSettingsNotifier());
11+
StateNotifierProvider<AppSettingsNotifier, AppSettingsState>((ref) => AppSettingsNotifier());
1312

1413
class AppSettingsNotifier extends StateNotifier<AppSettingsState> {
1514
AppSettingsNotifier() : super(AppSettingsState.initial());
@@ -25,8 +24,7 @@ class AppSettingsNotifier extends StateNotifier<AppSettingsState> {
2524

2625
LanguagesEnum get languageSelected => languageSelectedChar.language;
2726

28-
String get languageSelectedChar =>
29-
_languageSelectedChar ?? _getLanguageSelectedChar;
27+
String get languageSelectedChar => _languageSelectedChar ?? _getLanguageSelectedChar;
3028
String get _getLanguageSelectedChar => _storage.read(_langSveKey) ?? "en";
3129

3230
bool get isLangEnglish => languageSelected == LanguagesEnum.english;
@@ -84,9 +82,7 @@ class AppSettingsNotifier extends StateNotifier<AppSettingsState> {
8482
ThemeMode get modeSelected => _selectedMode ?? _getModeSelected;
8583

8684
ThemeMode get _getModeSelected =>
87-
(_storage.read(_modeSveKey) ?? "light") == "light"
88-
? ThemeMode.light
89-
: ThemeMode.dark;
85+
(_storage.read(_modeSveKey) ?? "light") == "light" ? ThemeMode.light : ThemeMode.dark;
9086

9187
bool get isThemeLight => modeSelected == ThemeMode.light;
9288
}

lib/core/resources/color_manager.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ import 'package:flutter/material.dart';
2525
2626
abstract final class ColorManager {
2727
static const Color transparent = Colors.transparent;
28-
static const Color transparentWhite =
29-
Color.fromRGBO(255, 255, 255, 0.48627450980392156);
28+
static const Color transparentWhite = Color.fromRGBO(255, 255, 255, 0.48627450980392156);
3029
static const Color whiteOp10 = Color.fromRGBO(255, 255, 255, .1);
3130
static const Color whiteOp20 = Color.fromRGBO(255, 255, 255, .2);
3231
static const Color whiteOp30 = Color.fromRGBO(255, 255, 255, .3);
@@ -80,9 +79,9 @@ abstract final class ColorManager {
8079

8180
/// ------------------------------------------>
8281
83-
static const Color finishedSearcherBlue = Color.fromRGBO(64,206,227, 1.0);
84-
static const Color wallBlack = Color.fromRGBO(12,53,71, 1.0);
85-
static const Color dividerBlue = Color.fromRGBO(175,216,248, 1.0);
82+
static const Color finishedSearcherBlue = Color.fromRGBO(64, 206, 227, 1.0);
83+
static const Color wallBlack = Color.fromRGBO(12, 53, 71, 1.0);
84+
static const Color dividerBlue = Color.fromRGBO(175, 216, 248, 1.0);
8685
static const Color blue = Color.fromRGBO(41, 157, 250, 1.0);
8786
static const Color darkBlue1 = Color.fromRGBO(23, 154, 255, 1.0);
8887
static const Color darkBlue = Color.fromRGBO(2, 73, 128, 1.0);
@@ -92,7 +91,7 @@ abstract final class ColorManager {
9291
static const Color lightBlueWhiteD1 = Color.fromRGBO(243, 243, 246, 1.0);
9392
static const Color blackL3Blue = Color.fromRGBO(14, 14, 19, 1.0);
9493
static const Color blackBlue = Color.fromRGBO(0, 0, 5, 1.0);
95-
static const Color darkPurple = Color.fromRGBO(66,8,99, 1.0);
94+
static const Color darkPurple = Color.fromRGBO(66, 8, 99, 1.0);
9695

9796
static const Color green = Color.fromRGBO(25, 189, 98, 1.0);
9897
static const Color purple = Color.fromRGBO(160, 4, 238, 1);

lib/core/widgets/adapt_widget_size.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ class AdaptWidgetSize extends StatelessWidget {
77
Widget build(BuildContext context) {
88
return LayoutBuilder(
99
builder: (context, constraints) {
10-
final size = constraints.maxWidth > constraints.maxHeight
11-
? constraints.maxHeight
12-
: constraints.maxWidth;
10+
final size = constraints.maxWidth > constraints.maxHeight ? constraints.maxHeight : constraints.maxWidth;
1311

1412
final newSize = size * 0.35;
1513
final adapt = newSize > 50 ? 80.0 : newSize;

lib/core/widgets/adaptive/padding/all_padding.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ class AllPadding extends StatelessWidget {
66
final Widget child;
77
@override
88
Widget build(BuildContext context) {
9-
return _RPadding(
10-
padding: REdgeInsetsDirectional.all(padding), child: child);
9+
return _RPadding(padding: REdgeInsetsDirectional.all(padding), child: child);
1110
}
1211
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
part of 'adaptive_padding.dart';
22

3-
43
class BottomPadding extends StatelessWidget {
54
const BottomPadding({required this.padding, required this.child, super.key});
65
final double padding;
76
final Widget child;
87
@override
98
Widget build(BuildContext context) {
10-
return _RPadding(
11-
padding: REdgeInsetsDirectional.only(bottom: padding), child: child);
9+
return _RPadding(padding: REdgeInsetsDirectional.only(bottom: padding), child: child);
1210
}
1311
}

lib/core/widgets/adaptive/text/bold_text.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ class BoldText extends _AdaptiveText {
88
super.fontStyle = FontStyle.normal,
99
super.color = ThemeEnum.focusColor,
1010
super.shadows,
11-
super.fontWeight= FontWeightManager.bold,
11+
super.fontWeight = FontWeightManager.bold,
1212
super.textAlign,
1313
super.maxLines = 2,
1414
super.key,
15-
}) ;
15+
});
1616
}

0 commit comments

Comments
 (0)