Skip to content

Commit b0fdc25

Browse files
Merge pull request #4 from AhmedAbdoElhawary/feature/initial-branch
Feature/initial branch
2 parents 0688bbd + 790ed81 commit b0fdc25

File tree

14 files changed

+668
-204
lines changed

14 files changed

+668
-204
lines changed

lib/core/helpers/app_bar/app_bar.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import 'package:algorithm_visualizer/core/extensions/navigators.dart';
22
import 'package:algorithm_visualizer/core/helpers/app_bar/back_button.dart';
3-
import 'package:algorithm_visualizer/core/helpers/svg_picture.dart';
4-
import 'package:algorithm_visualizer/core/resources/assets_manager.dart';
53
import 'package:algorithm_visualizer/core/resources/color_manager.dart';
64
import 'package:algorithm_visualizer/core/resources/theme_manager.dart';
75
import 'package:algorithm_visualizer/core/widgets/adaptive/text/adaptive_text.dart';
@@ -93,8 +91,7 @@ class AppBarCloseButton extends StatelessWidget {
9391
Navigator.maybePop(context); // will be helpful for PopScope
9492
}
9593
},
96-
icon: const CustomAssetsSvg(IconsAssets.closeIcon,
97-
size: secondAppBarIconSize),
94+
icon: const CloseButtonIcon(),
9895
);
9996
}
10097
}
Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import 'package:algorithm_visualizer/core/enums/app_settings_enum.dart';
2-
import 'package:algorithm_visualizer/core/helpers/storage/app_settings/app_settings_cubit.dart';
3-
import 'package:algorithm_visualizer/core/helpers/svg_picture.dart';
4-
import 'package:algorithm_visualizer/core/resources/assets_manager.dart';
51
import 'package:flutter/material.dart';
62
import 'package:flutter_riverpod/flutter_riverpod.dart';
73

@@ -25,23 +21,6 @@ class CustomBackButtonIcon extends ConsumerWidget {
2521

2622
@override
2723
Widget build(BuildContext context, ref) {
28-
final isLangEnglish =
29-
ref.watch(appSettingsProvider).language == LanguagesEnum.english;
30-
31-
final String icon;
32-
switch (Theme.of(context).platform) {
33-
case TargetPlatform.android:
34-
case TargetPlatform.fuchsia:
35-
case TargetPlatform.linux:
36-
case TargetPlatform.windows:
37-
icon =
38-
isLangEnglish ? IconsAssets.backButton : IconsAssets.backButtonRTL;
39-
case TargetPlatform.iOS:
40-
case TargetPlatform.macOS:
41-
icon = isLangEnglish
42-
? IconsAssets.iosBackButton
43-
: IconsAssets.iosBackButtonRTL;
44-
}
45-
return CustomAssetsSvg(icon, size: 30);
24+
return const BackButtonIcon();
4625
}
4726
}

lib/core/resources/color_manager.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,20 @@ abstract final class ColorManager {
8080

8181
/// ------------------------------------------>
8282
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);
8386
static const Color blue = Color.fromRGBO(41, 157, 250, 1.0);
8487
static const Color darkBlue1 = Color.fromRGBO(23, 154, 255, 1.0);
85-
static const Color darkBlue = Color.fromRGBO(7, 114, 199, 1.0);
88+
static const Color darkBlue = Color.fromRGBO(2, 73, 128, 1.0);
89+
static const Color mediumBlue = Color.fromRGBO(0, 166, 152, 1.0);
8690
static const Color lightBlue = Color.fromRGBO(177, 221, 255, 1.0);
8791
static const Color lightBlueM2 = Color.fromRGBO(209, 234, 255, 1.0);
8892
static const Color lightBlueWhiteD1 = Color.fromRGBO(243, 243, 246, 1.0);
8993
static const Color blackL3Blue = Color.fromRGBO(14, 14, 19, 1.0);
9094
static const Color blackBlue = Color.fromRGBO(0, 0, 5, 1.0);
95+
static const Color darkPurple = Color.fromRGBO(66,8,99, 1.0);
96+
9197
static const Color green = Color.fromRGBO(25, 189, 98, 1.0);
9298
static const Color purple = Color.fromRGBO(160, 4, 238, 1);
9399
static const Color purple2 = Color.fromRGBO(198, 0, 229, 1.0);

lib/core/resources/strings_manager.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,11 @@ class StringsManager {
1919
2020
static const String appName = "Algorithm Visualizer";
2121
static const String welcomeToApp = "Welcome to $appName";
22+
static const String sorryForInconvenience = "Sorry for inconvenience";
23+
static const String cancel = "Cancel";
24+
static const String unknownPage = "Unknown page";
25+
static const String notInitializeGridYet = "Not initialize grid yet.";
26+
static const String clear = "Clear";
27+
static const String generateMaze = "Generate maze";
2228

2329
}

lib/core/widgets/custom_widgets/check_box.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class CustomCheckBox extends StatelessWidget {
4242
shape: isCircle ? BoxShape.circle : BoxShape.rectangle,
4343
),
4444
child: isSelected && withCheckIcon
45-
? const CustomIcon(Icons.check_rounded,
46-
color: ThemeEnum.whiteColor, size: 18)
45+
? const CustomIcon(Icons.check_rounded,
46+
color: ColorManager.white, size: 18)
4747
: null,
4848
),
4949
),

lib/core/widgets/custom_widgets/custom_icon.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
import 'package:algorithm_visualizer/core/resources/theme_manager.dart';
1+
import 'package:algorithm_visualizer/core/resources/color_manager.dart';
22
import 'package:flutter/cupertino.dart';
33
import 'package:flutter_screenutil/flutter_screenutil.dart';
44

55
class CustomIcon extends StatelessWidget {
66
const CustomIcon(
77
this.icon, {
88
this.size = 22,
9-
this.color = ThemeEnum.focusColor,
9+
this.color ,
1010
this.shadows,
1111
super.key,
1212
});
1313
final IconData icon;
14-
final ThemeEnum 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: context.getColor(color),
21+
color: color??ColorManager.black,
2222
size: size.r,
2323
shadows: shadows,
2424
);

0 commit comments

Comments
 (0)