Skip to content

Commit fc558b4

Browse files
Merge pull request #54 from hrideshmg/main
fix the status updates
2 parents 2485c60 + 68d2151 commit fc558b4

File tree

5 files changed

+11
-21
lines changed

5 files changed

+11
-21
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Flutter
33

44
on:
55
# Runs this action when you push on master
6+
workflow_dispatch:
67
push:
78
branches: [ "main" ]
89
tags:

android/app/build.gradle

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,9 @@ android {
6161
versionName flutterVersionName
6262
}
6363

64-
signingConfigs {
65-
release {
66-
storeFile file(keystoreProperties["storeFile"])
67-
storePassword keystoreProperties["storePassword"]
68-
keyAlias keystoreProperties["keyAlias"]
69-
keyPassword keystoreProperties["keyPassword"]
70-
}
71-
}
72-
7364
buildTypes {
7465
release {
75-
signingConfig signingConfigs.release
66+
signingConfig signingConfigs.debug
7667
minifyEnabled true
7768
shrinkResources true
7869
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

lib/controllers/status/status_controller.dart

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,12 @@ class StatusController extends GetxController {
7373
},
7474
);
7575

76-
if (response.statusCode == 200) {
76+
if (response.statusCode != 200) {
7777
await getStatus(date: date);
78-
// Get.snackbar(
79-
// 'Status Updated',a
80-
// 'Status updated successfully!',
81-
// snackPosition: SnackPosition.BOTTOM,
82-
// );
83-
} else {
84-
throw Exception('Failed to update status');
78+
throw Exception();
8579
}
8680
} catch (e) {
87-
print('Error: $e');
88-
throw Exception('Failed to update status');
81+
throw Exception('Failed to update status: $e');
8982
}
9083
}
9184

lib/screens/Status/status_page.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ class StatusViewState extends State<StatusView> {
2828
DateTime now = DateTime.now();
2929

3030
@override
31-
Widget build(BuildContext context) {
31+
void initState() {
32+
super.initState();
3233
controller.getStatus();
34+
}
35+
36+
@override
37+
Widget build(BuildContext context) {
3338

3439
return Scaffold(
3540
backgroundColor: bgColor,
File renamed without changes.

0 commit comments

Comments
 (0)