Skip to content

Commit

Permalink
Merge pull request #53 from IamMuuo/dev
Browse files Browse the repository at this point in the history
Settings page fix
  • Loading branch information
IamMuuo authored Jan 31, 2024
2 parents 150685c + c126b0a commit 2ce8dcf
Show file tree
Hide file tree
Showing 12 changed files with 485 additions and 765 deletions.
4 changes: 2 additions & 2 deletions lib/controllers/notifications_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class NotificationsController extends GetxController {
0,
"Happy Birthday",
"We wish you a happy birthday and prosperous new year",
DateTime.now().add(Duration(seconds: 10)));
DateTime.now().add(const Duration(seconds: 10)));

debugPrint("Notifications Done!");
}
Expand Down Expand Up @@ -47,7 +47,7 @@ class NotificationsController extends GetxController {

// If the scheduled date is in the past, add a week to it
if (now.isAfter(scheduledDate)) {
scheduledDate = scheduledDate.add(Duration(days: 7));
scheduledDate = scheduledDate.add(const Duration(days: 7));
}

// Schedule the notification
Expand Down
17 changes: 0 additions & 17 deletions lib/controllers/profile_page_controller.dart

This file was deleted.

1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ void main() async {
GetMaterialApp(
home: isLoggedIn ? const HomePage() : const IntroPage(),
theme: lightModeTheme,
debugShowCheckedModeBanner: false,
),
);
}
4 changes: 1 addition & 3 deletions lib/pages/exams_timetable_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ class _ExamTimeTablePageState extends State<ExamTimeTablePage> {
itemBuilder: (context, index) => Padding(
padding: const EdgeInsets.only(bottom: 8),
child: ExamCourseCard(
ontap: () {
print("Hi");
},
ontap: () {},
code: snapshot.data![index]["course_code"]
.toString(),
date: DateFormat('EEE dd/MM/yy').format(
Expand Down
10 changes: 5 additions & 5 deletions lib/pages/home_page.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:academia/controllers/settings_controller.dart';
import 'package:academia/pages/courses_page.dart';
import 'package:academia/pages/dashboard.dart';
import 'package:academia/pages/profile_page.dart';
import 'package:academia/pages/settings_page.dart';
import 'package:academia/pages/tool_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
Expand All @@ -20,7 +20,7 @@ class _HomePageState extends State<HomePage> {
DashBoard(),
ToolsPage(),
CoursesPage(),
ProfilePage(),
SettingsPage(),
];
@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -56,9 +56,9 @@ class _HomePageState extends State<HomePage> {
label: 'Courses',
),
BottomNavigationBarItem(
icon: Icon(Icons.person_outline),
activeIcon: Icon(Icons.person),
label: 'Profile',
icon: Icon(Icons.settings_outlined),
activeIcon: Icon(Icons.settings),
label: 'Settings',
),
],
),
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class LoginPage extends StatelessWidget {
Obx(
() => !loginController.isloading.value
? ElevatedButton(
onPressed: () {
loginController.login();
onPressed: () async {
await loginController.login();
},
child: const Text(
'Get started',
Expand Down
3 changes: 1 addition & 2 deletions lib/pages/pdf_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class PdfViewer extends StatefulWidget {
}

class _PdfViewerState extends State<PdfViewer> {
late PDFViewController _pdfViewerController;
int currentPage = 0, totalPages = 0;
bool isReady = false;
String errorMessage = '';
Expand Down Expand Up @@ -93,7 +92,7 @@ class _PdfViewerState extends State<PdfViewer> {
currentPage = page!;
});
},
onRender: (_pages) {
onRender: (pages) {
setState(() {});
},
onError: (error) {
Expand Down
Loading

0 comments on commit 2ce8dcf

Please sign in to comment.