Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat.] Added Reminder Screen (CRUD) #24

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions lib/ui/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ class _HomeScreenState extends State<HomeScreen> {
Widget build(BuildContext context) {
AuthCubit authCubit = context.read<AuthCubit>();
return Scaffold(
appBar: const CustomAppBar(
title: "CSOC Flutter",
backgroundColor: AppColors.primaryColor,
actions: [],
),
appBar: const CustomAppBar(title: "iBeThere",),
body: SingleChildScrollView(
child: Column(
children: [
Expand Down
24 changes: 12 additions & 12 deletions lib/ui/widgets/app_bar.dart
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import 'package:flutter/material.dart';

import '../../utils/colors.dart';

class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
final String title;
final Color backgroundColor;
final List<Widget> actions;

const CustomAppBar({
super.key,
required this.title,
required this.backgroundColor,
required this.actions,
});
const CustomAppBar({super.key, required this.title});
@override
Widget build(BuildContext context) {
return AppBar(
title: Text(title),
backgroundColor: backgroundColor,
actions: actions,
title: Text(
title,
style: TextStyle(
fontWeight: FontWeight.w900,
letterSpacing: 1.5,
color: Colors.indigo.shade900),
),
centerTitle: true,
backgroundColor: AppColors.primaryColor,
);
}

Expand Down
81 changes: 81 additions & 0 deletions lib/ui/widgets/side_navigation_bar.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import 'package:csoc_flutter/utils/colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

import '../../cubit/auth_cubit.dart';

class SideNavigationBar extends StatelessWidget {
final String? accountName;
final String? accountEmail;
const SideNavigationBar(
{super.key, required this.accountName, required this.accountEmail});

@override
Widget build(BuildContext context) {
final String username =
"${accountName!.split(" ")[0]} ${accountName!.split(" ")[1]}";

AuthCubit authCubit = context.read<AuthCubit>();
return Drawer(
backgroundColor: AppColors.backgroundColor,
child: ListView(
padding: EdgeInsets.zero,
children: [
UserAccountsDrawerHeader(
decoration: const BoxDecoration(color: AppColors.secondaryColor),
accountName: Text(username,
style: TextStyle(
color: Colors.indigo.shade900,
fontWeight: FontWeight.bold)),
accountEmail: Text(accountEmail!,
style: TextStyle(color: Colors.indigo.shade900)),
currentAccountPicture: CircleAvatar(
child: ClipOval(
child: Image.network(
"https://i.pinimg.com/564x/fd/14/a4/fd14a484f8e558209f0c2a94bc36b855.jpg",
fit: BoxFit.fill,
width: 90,
height: 90,
)))),
ListTile(
leading: const Icon(Icons.my_library_books_outlined),
title: const Text('Subjects'),
onTap: () {},
),
ListTile(
leading: const Icon(Icons.star_purple500_outlined),
title: const Text('Grades'),
onTap: () {},
),
ListTile(
leading: const Icon(Icons.my_library_books_outlined),
title: const Text('Subjects'),
onTap: () {},
),
ListTile(
leading: const Icon(Icons.share),
title: const Text('Share Time Table'),
onTap: () {},
),
Divider(
indent: 100,
endIndent: 100,
color: Colors.grey.shade500,
),
ListTile(
leading: const Icon(Icons.settings),
title: const Text('Settings'),
onTap: () {},
),
ListTile(
leading: const Icon(Icons.logout),
title: const Text('Logout'),
onTap: () {
authCubit.signOut();
},
)
],
),
);
}
}
6 changes: 3 additions & 3 deletions lib/utils/colors.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

class AppColors {
static const Color backgroundColor = Color(0xffffffff);
static const Color primaryColor = Color(0xff0000ff);
static const Color secondaryColor = Color(0xff00f0f0);
static const Color backgroundColor = Color.fromRGBO(202, 244, 255, 1);
static const Color primaryColor = Color.fromRGBO(90, 178, 255, 1);
static const Color secondaryColor = Color.fromRGBO(160, 222, 255, 1);
}