Skip to content

Commit

Permalink
fix:The Signup page getting refreshed continiously
Browse files Browse the repository at this point in the history
  • Loading branch information
angrezichatterbox committed Jul 25, 2024
1 parent e650973 commit f8b936a
Show file tree
Hide file tree
Showing 8 changed files with 402 additions and 336 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"lexend"
]
}
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application

android:label="bunk_mate"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
Expand Down
40 changes: 20 additions & 20 deletions ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>12.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>com.example.bunkMate</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>12.0</string>
</dict>
</plist>
3 changes: 1 addition & 2 deletions lib/controllers/homepage/course_summary_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ class CourseSummaryController extends GetxController {
} else {
var errorResponse = jsonDecode(response.body);
print(response.statusCode);
throw errorResponse['detail'] ?? 'Unknown error occurred';
}
} catch (error) {
Get.snackbar('Error', error.toString());
print(error);
}
}
}
27 changes: 18 additions & 9 deletions lib/screens/Status/status_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class StatusView extends StatelessWidget {
final screenHeight = MediaQuery.of(context).size.height;

return Scaffold(
backgroundColor: Color.fromARGB(255, 7, 9, 15),
backgroundColor: const Color.fromARGB(255, 7, 9, 15),
appBar: PreferredSize(
preferredSize: Size.fromHeight(screenHeight / 14),
child: Container(
Expand All @@ -42,6 +42,7 @@ class StatusView extends StatelessWidget {
toolbarHeight: screenHeight / 16,
actions: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Expand All @@ -68,7 +69,7 @@ class StatusView extends StatelessWidget {
child: ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(
Color.fromARGB(255, 211, 255, 153),
const Color.fromARGB(255, 211, 255, 153),
),
),
onPressed: () => controller.selectDate(context),
Expand Down Expand Up @@ -111,7 +112,8 @@ class StatusView extends StatelessWidget {
}

return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
padding: EdgeInsets.symmetric(
horizontal: screenWidth * 0.02, vertical: 8.0),
child: GestureDetector(
onTap: () {
controller.courses[index]["status"] = "bunked";
Expand All @@ -130,7 +132,7 @@ class StatusView extends StatelessWidget {
);
},
onLongPress: () {
controller.courses[index]["status"] = "Present";
controller.courses[index]["status"] = "present";
controller.updateStatus(
controller.courses[index]["session_url"],
"present",
Expand All @@ -141,7 +143,7 @@ class StatusView extends StatelessWidget {
margin: EdgeInsets.symmetric(vertical: 8.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Color.fromARGB(255, 13, 15, 21),
color: const Color.fromARGB(255, 13, 15, 21),
),
child: ListTile(
leading: Icon(
Expand Down Expand Up @@ -177,7 +179,8 @@ class StatusView extends StatelessWidget {
),
),
);
})
},
)
: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
Expand All @@ -200,14 +203,20 @@ class StatusView extends StatelessWidget {
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(20),
),
fillColor: Color.fromARGB(255, 211, 255, 153),
fillColor: const Color.fromARGB(255, 211, 255, 153),
filled: true,
),
hint: Text("Copy Schedule"),
hint: Text(
"Copy Schedule",
style: TextStyle(fontSize: screenWidth / 28),
),
items: controller.days.entries.map((days) {
return DropdownMenuItem<int>(
value: days.key,
child: Text(days.value),
child: Text(
days.value,
style: TextStyle(fontSize: screenWidth / 28),
),
);
}).toList(),
onChanged: (days) {
Expand Down
Loading

0 comments on commit f8b936a

Please sign in to comment.