Skip to content

Commit fda6c2e

Browse files
committed
chore: misc changes to logging and set system ui mode to edge to edge
1 parent 107c015 commit fda6c2e

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

lib/api/data_api.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'dart:developer';
2+
13
import 'package:dartz/dartz.dart';
24
import 'package:dio/dio.dart';
35
import 'package:flutter/material.dart';
@@ -13,6 +15,7 @@ import 'endpoints.dart';
1315
@lazySingleton
1416
class DataApi {
1517
final Dio dio;
18+
final String TAG = 'DataApi';
1619

1720
DataApi(this.dio);
1821

@@ -31,7 +34,7 @@ class DataApi {
3134

3235
final user = User.fromJson(response.data);
3336

34-
debugPrint('USER - ${user.firstName}');
37+
log(user.toString(), name: TAG);
3538
return left(user);
3639
} catch (e, trace) {
3740
debugPrint('ERROR - $e\nTRACE - $trace');
@@ -61,9 +64,7 @@ class DataApi {
6164

6265
final attendanceData = Attendance.fromJson(response.data);
6366

64-
debugPrint(
65-
'ATTENDANCE - ${attendanceData.stdSubAtdDetails.overallPercentage}',
66-
);
67+
log(attendanceData.toString(), name: TAG);
6768
return left(attendanceData);
6869
} catch (e, trace) {
6970
debugPrint('ERROR - $e\nTRACE - $trace');
@@ -93,7 +94,7 @@ class DataApi {
9394

9495
final batchDetails = UserBatch.fromJson(response.data[0]);
9596

96-
debugPrint('BATCH - ${batchDetails.batchName}');
97+
log(batchDetails.toString(), name: TAG);
9798
return left(batchDetails);
9899
} catch (e, trace) {
99100
debugPrint('ERROR - $e\nTRACE - $trace');
@@ -120,7 +121,7 @@ class DataApi {
120121
response.data[0]['subject'].map((sub) => SubjectDetails.fromJson(sub)),
121122
);
122123

123-
debugPrint(mainSubjectDetails.first.name);
124+
log(mainSubjectDetails.toString(), name: TAG);
124125
return left(mainSubjectDetails);
125126
} catch (e, trace) {
126127
debugPrint('ERROR - $e\nTRACE - $trace');

lib/app.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@ class AttendanceApp extends StatefulWidget {
2121
class _AttendanceAppState extends State<AttendanceApp> {
2222
@override
2323
void initState() {
24+
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
2425
SystemChrome.setSystemUIOverlayStyle(
25-
SystemUiOverlayStyle.dark.copyWith(statusBarColor: Colors.transparent),
26+
SystemUiOverlayStyle.dark.copyWith(
27+
statusBarColor: Colors.transparent,
28+
systemNavigationBarColor: Colors.transparent,
29+
),
2630
);
2731
SystemChrome.setPreferredOrientations([
2832
DeviceOrientation.portraitUp,
29-
DeviceOrientation.portraitUp,
33+
DeviceOrientation.portraitDown,
3034
]);
3135
SchedulerBinding.instance.addPostFrameCallback((_) {
3236
getIt<ConfigCubit>().started();

lib/ui/home/home_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class _HomePageState extends State<HomePage> {
4444
),
4545
);
4646
}
47-
if (state.user != null && !state.loading) {
47+
if (!state.hasError && !state.loading) {
4848
return RefreshIndicator(
4949
onRefresh: () async => await _homeCubit.refresh(),
5050
color: AppTheme.accentBlue,

lib/ui/splash/splash_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class _SplashScreenState extends State<SplashScreen> {
4343
children: [
4444
Center(child: AppLogo()),
4545
Positioned(
46-
bottom: Platform.isIOS ? 30.0 : 15.0,
46+
bottom: Platform.isIOS ? 30.0 : 20.0,
4747
child: Column(
4848
children: [
4949
Text(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Edumarshal client for AKGEC
33

44
publish_to: "none"
55

6-
version: 1.4.0+11
6+
version: 1.4.1+12
77

88
environment:
99
sdk: ">=2.17.0 <3.0.0"

0 commit comments

Comments
 (0)