Skip to content

Commit 9d2181f

Browse files
authored
Merge pull request #55 from opxdelwin/dev
v2.0.0
2 parents 60a49c4 + 5ebf8c0 commit 9d2181f

33 files changed

+166
-171
lines changed

.github/workflows/analyze.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [ push ]
44

55

66
jobs:
7-
setup:
7+
analysis:
88
runs-on: ubuntu-latest
99
steps:
1010
- run: pwd
@@ -15,10 +15,13 @@ jobs:
1515
uses: subosito/flutter-action@v2
1616
with:
1717
channel: 'stable'
18+
cache: true
1819
- run: flutter --version
1920

2021
- name: Code Analysis
21-
run: |
22-
cd client-app
23-
flutter pub get
24-
flutter analyze
22+
working-directory: client-app
23+
run: flutter analyze
24+
25+
- name: Unit Testing
26+
working-directory: client-app
27+
run: flutter test

client-app/lib/controllers/app_tour_controller.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ class AppTourController extends GetxController {
4141

4242
TutorialCoachMark tutorial = TutorialCoachMark(
4343
targets: targets,
44-
colorShadow: colorScheme.onBackground,
44+
colorShadow: colorScheme.onSurface,
4545
textSkip: "SKIP",
46-
textStyleSkip: TextStyle(color: colorScheme.background),
46+
textStyleSkip: TextStyle(color: colorScheme.surface),
4747
paddingFocus: 0,
4848
focusAnimationDuration: const Duration(milliseconds: 500),
4949
unFocusAnimationDuration: const Duration(milliseconds: 500),

client-app/lib/controllers/filter_controller.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class FilterController extends GetxController {
234234
Logger.i("primary year: $primaryYear");
235235

236236
if (service.years?.contains(primaryYear) != false && primaryYear != null) {
237-
service.selectedYear = int.parse(primaryYear);
237+
service.selectedYear = primaryYear;
238238
}
239239
}
240240

client-app/lib/controllers/git_service.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class GitService extends GetxController {
1717

1818
// normal schedule years
1919
List<String>? years;
20-
RxInt? _selectedYear;
21-
int? get selectedYear => _selectedYear?.value;
22-
set selectedYear(int? newYear) {
20+
RxString? _selectedYear;
21+
String? get selectedYear => _selectedYear?.value;
22+
set selectedYear(String? newYear) {
2323
if (newYear == null || selectedYear == newYear) {
2424
return;
2525
}

client-app/lib/controllers/theme_controller.dart

+4-8
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ class AppThemeController extends GetxController {
66
useMaterial3: true,
77
colorScheme: const ColorScheme(
88
brightness: Brightness.light,
9-
background: Color(0xffEAF9E9),
10-
onBackground: Color(0xff061906),
119
primary: Color(0x668ADC89),
1210
onPrimary: Color(0xff061906),
1311
secondary: Color(0xff2FC02C),
1412
onSecondary: Color(0xffffffff),
1513
error: Color(0xF5FF0000),
1614
onError: Color(0xffFFFFFF),
17-
surface: Color(0xffDCDCDC),
18-
onSurface: Color(0xff000000),
15+
surface: Color(0xffEAF9E9),
16+
onSurface: Color(0xff061906),
1917
tertiary: Color(0xff4048FF),
2018
),
2119
);
@@ -24,16 +22,14 @@ class AppThemeController extends GetxController {
2422
useMaterial3: true,
2523
colorScheme: const ColorScheme(
2624
brightness: Brightness.dark,
27-
background: Color(0xff061906),
28-
onBackground: Color(0xffEAF9E9),
2925
primary: Color(0x4d8ADC89),
3026
onPrimary: Color(0xffD8E7D7),
3127
secondary: Color(0xcc2FC02C),
3228
onSecondary: Color(0xffEAF9E9),
3329
error: Color(0xF5FF0000),
3430
onError: Color(0xffFFFFFF),
35-
surface: Color(0xff9ABE99),
36-
onSurface: Color(0xff000000),
31+
surface: Color(0xff061906),
32+
onSurface: Color(0xffEAF9E9),
3733
tertiary: Color(0xffEAF9E9),
3834
),
3935
);

client-app/lib/views/electives_screen.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class _ElectiveScreenState extends State<ElectiveScreen> {
2929
return Scaffold(
3030
extendBody: true,
3131
appBar: AppBar(
32-
backgroundColor: colorScheme.background,
32+
backgroundColor: colorScheme.surface,
3333
elevation: 0.0,
3434
toolbarHeight: 80,
3535
shape: const RoundedRectangleBorder(
@@ -39,7 +39,7 @@ class _ElectiveScreenState extends State<ElectiveScreen> {
3939
title: Text(
4040
"Elective Classes",
4141
style: TextStyle(
42-
color: colorScheme.onBackground,
42+
color: colorScheme.onSurface,
4343
fontWeight: FontWeight.bold,
4444
letterSpacing: 0.2,
4545
),
@@ -110,7 +110,7 @@ class _ElectiveScreenState extends State<ElectiveScreen> {
110110
Text(
111111
"No Data Available",
112112
style: TextStyle(
113-
color: colorScheme.onBackground,
113+
color: colorScheme.onSurface,
114114
),
115115
)
116116
],
@@ -175,7 +175,7 @@ class _ElectiveScreenState extends State<ElectiveScreen> {
175175
"Effective from ${snapshot.data!["meta"]["effective-date"]}",
176176
style: TextStyle(
177177
fontWeight: FontWeight.bold,
178-
color: colorScheme.onBackground,
178+
color: colorScheme.onSurface,
179179
),
180180
),
181181
],

client-app/lib/views/home_screen.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class _HomeScreenState extends State<HomeScreen> {
4040
return Scaffold(
4141
extendBodyBehindAppBar: true,
4242
appBar: AppBar(
43-
backgroundColor: colorScheme.background,
43+
backgroundColor: colorScheme.surface,
4444
elevation: 0.0,
4545
toolbarHeight: 80,
4646
shape: const RoundedRectangleBorder(
@@ -50,7 +50,7 @@ class _HomeScreenState extends State<HomeScreen> {
5050
title: Text(
5151
"Plan Sync",
5252
style: TextStyle(
53-
color: colorScheme.onBackground,
53+
color: colorScheme.onSurface,
5454
fontWeight: FontWeight.bold,
5555
letterSpacing: 0.2,
5656
),

client-app/lib/views/login_screen.dart

+8-8
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class _LoginScreenState extends State<LoginScreen> {
3333
final colorScheme = Theme.of(context).colorScheme;
3434
final size = MediaQuery.of(context).size;
3535
return Scaffold(
36-
backgroundColor: colorScheme.background,
36+
backgroundColor: colorScheme.surface,
3737
body: Center(
3838
child: Stack(
3939
children: [
@@ -63,7 +63,7 @@ class _LoginScreenState extends State<LoginScreen> {
6363
fontWeight: FontWeight.bold,
6464
fontSize: 32,
6565
letterSpacing: 0.2,
66-
color: colorScheme.onBackground,
66+
color: colorScheme.onSurface,
6767
),
6868
),
6969
),
@@ -77,16 +77,16 @@ class _LoginScreenState extends State<LoginScreen> {
7777
Expanded(
7878
child: ElevatedButton.icon(
7979
style: ButtonStyle(
80-
elevation: const MaterialStatePropertyAll(0),
81-
padding: const MaterialStatePropertyAll(
80+
elevation: const WidgetStatePropertyAll(0),
81+
padding: const WidgetStatePropertyAll(
8282
EdgeInsets.symmetric(
8383
vertical: 16,
8484
horizontal: 24,
8585
),
8686
),
8787
enableFeedback: true,
88-
backgroundColor: MaterialStatePropertyAll(
89-
colorScheme.secondary),
88+
backgroundColor:
89+
WidgetStatePropertyAll(colorScheme.secondary),
9090
),
9191
onPressed: loginProcedure,
9292
icon: Icon(
@@ -126,7 +126,7 @@ class _LoginScreenState extends State<LoginScreen> {
126126
style: TextStyle(
127127
fontWeight: FontWeight.bold,
128128
fontSize: 16,
129-
color: colorScheme.onBackground,
129+
color: colorScheme.onSurface,
130130
),
131131
),
132132
const SizedBox(height: 16),
@@ -153,7 +153,7 @@ class _LoginScreenState extends State<LoginScreen> {
153153
fontWeight: FontWeight.w300,
154154
color: Theme.of(context)
155155
.colorScheme
156-
.onBackground
156+
.onSurface
157157
.withOpacity(0.6),
158158
),
159159
textAlign: TextAlign.center,

client-app/lib/views/settings_screen.dart

+7-7
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class SettingsPage extends StatelessWidget {
4444
return Scaffold(
4545
appBar: AppBar(
4646
centerTitle: true,
47-
backgroundColor: colorScheme.background,
47+
backgroundColor: colorScheme.surface,
4848
elevation: 0.0,
4949
toolbarHeight: 80,
5050
shape: const RoundedRectangleBorder(
@@ -54,7 +54,7 @@ class SettingsPage extends StatelessWidget {
5454
title: Text(
5555
"Account",
5656
style: TextStyle(
57-
color: colorScheme.onBackground,
57+
color: colorScheme.onSurface,
5858
fontWeight: FontWeight.bold,
5959
letterSpacing: 0.2,
6060
),
@@ -77,15 +77,15 @@ class SettingsPage extends StatelessWidget {
7777
Text(
7878
auth.activeUser!.displayName ?? "username",
7979
style: TextStyle(
80-
color: colorScheme.onBackground,
80+
color: colorScheme.onSurface,
8181
fontSize: 18,
8282
fontWeight: FontWeight.bold,
8383
),
8484
),
8585
Text(
8686
auth.activeUser!.email ?? "[email protected]",
8787
style: TextStyle(
88-
color: colorScheme.onBackground.withOpacity(0.6),
88+
color: colorScheme.onSurface.withOpacity(0.6),
8989
),
9090
),
9191
Row(
@@ -94,13 +94,13 @@ class SettingsPage extends StatelessWidget {
9494
Text(
9595
'Plan Sync ${versionController.appVersion}+${versionController.appBuild} | ',
9696
style: TextStyle(
97-
color: colorScheme.onBackground.withOpacity(0.6),
97+
color: colorScheme.onSurface.withOpacity(0.6),
9898
),
9999
),
100100
Text(
101101
'Copy UID',
102102
style: TextStyle(
103-
color: colorScheme.onBackground.withOpacity(0.6),
103+
color: colorScheme.onSurface.withOpacity(0.6),
104104
),
105105
),
106106
const SizedBox(width: 8),
@@ -110,7 +110,7 @@ class SettingsPage extends StatelessWidget {
110110
child: Icon(
111111
Icons.copy,
112112
size: 18,
113-
color: colorScheme.onBackground,
113+
color: colorScheme.onSurface,
114114
semanticLabel: 'Copy',
115115
),
116116
)

client-app/lib/widgets/bottom-sheets/bottom_sheets_wrapper.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class BottomSheets {
1313
showModalBottomSheet(
1414
context: context,
1515
useRootNavigator: true,
16-
backgroundColor: colorScheme.background,
16+
backgroundColor: colorScheme.surface,
1717
builder: (context) => SchedulePreferenceBottomSheet(
1818
save: save,
1919
),
@@ -27,7 +27,7 @@ class BottomSheets {
2727
showModalBottomSheet(
2828
context: context,
2929
useRootNavigator: true,
30-
backgroundColor: colorScheme.background,
30+
backgroundColor: colorScheme.surface,
3131
builder: (context) => const ReportErrorBottomSheet(),
3232
);
3333
}
@@ -39,7 +39,7 @@ class BottomSheets {
3939
showModalBottomSheet(
4040
context: context,
4141
useRootNavigator: true,
42-
backgroundColor: colorScheme.background,
42+
backgroundColor: colorScheme.surface,
4343
builder: (context) => const ContributeScheduleBottomSheet(),
4444
);
4545
}
@@ -52,7 +52,7 @@ class BottomSheets {
5252
showModalBottomSheet(
5353
context: context,
5454
useRootNavigator: true,
55-
backgroundColor: colorScheme.background,
55+
backgroundColor: colorScheme.surface,
5656
builder: (context) => ElectivePreferenceBottomSheet(
5757
save: save,
5858
),

client-app/lib/widgets/bottom-sheets/contribute_schedule.dart

+8-8
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ class ContributeScheduleBottomSheet extends StatelessWidget {
3434
Text(
3535
"Contribute via mail",
3636
style: TextStyle(
37-
color: colorScheme.onBackground,
37+
color: colorScheme.onSurface,
3838
),
3939
),
4040
ElevatedButton(
4141
style: ButtonStyle(
4242
backgroundColor:
43-
MaterialStatePropertyAll(colorScheme.onBackground),
43+
WidgetStatePropertyAll(colorScheme.onSurface),
4444
),
4545
onPressed: () => launchMail(),
4646
child: Row(
4747
children: [
4848
Text(
4949
'Launch Mail',
5050
style: TextStyle(
51-
color: colorScheme.background,
51+
color: colorScheme.surface,
5252
),
5353
),
5454
const SizedBox(width: 8),
5555
Icon(
5656
Icons.mail_outline_rounded,
57-
color: colorScheme.background,
57+
color: colorScheme.surface,
5858
)
5959
],
6060
))
@@ -69,27 +69,27 @@ class ContributeScheduleBottomSheet extends StatelessWidget {
6969
Text(
7070
"Contribute via GitHub",
7171
style: TextStyle(
72-
color: colorScheme.onBackground,
72+
color: colorScheme.onSurface,
7373
),
7474
),
7575
ElevatedButton(
7676
style: ButtonStyle(
7777
backgroundColor:
78-
MaterialStatePropertyAll(colorScheme.onBackground),
78+
WidgetStatePropertyAll(colorScheme.onSurface),
7979
),
8080
onPressed: () => launchGithub(),
8181
child: Row(
8282
children: [
8383
Text(
8484
'Launch GitHub',
8585
style: TextStyle(
86-
color: colorScheme.background,
86+
color: colorScheme.surface,
8787
),
8888
),
8989
const SizedBox(width: 8),
9090
Icon(
9191
FontAwesomeIcons.github,
92-
color: colorScheme.background,
92+
color: colorScheme.surface,
9393
)
9494
],
9595
))

0 commit comments

Comments
 (0)