Skip to content

Commit

Permalink
ui updates to login screen
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelSena19 committed Jan 21, 2024
1 parent 03c9904 commit 4f11cf3
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 24 deletions.
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class MyApp extends StatelessWidget {
title: 'Health Watch',
theme: ThemeData(
primarySwatch: Colors.lightBlue,
primaryColor: Colors.lightBlue,
),
routes: {
loginRoute: (context) => const LoginScreen(),
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class _HomeScreenState extends State<HomeScreen> {
showErrorDialog(context, 'Error: ${snapshot.error}');
} else if (snapshot.connectionState ==
ConnectionState.waiting) {
return const LoadingScreen();
return const SizedBox();
} else {
final UserModel user = userProvider.user;
return ListTile(
Expand Down
41 changes: 24 additions & 17 deletions lib/screens/login_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ class _LoginScreenState extends State<LoginScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.lightBlue,
elevation: 0,
),
body: Padding(
padding: const EdgeInsets.all(10),
child: ListView(
Expand Down Expand Up @@ -80,10 +76,11 @@ class _LoginScreenState extends State<LoginScreen> {
keyboardType: TextInputType.emailAddress,
controller: emailController,
decoration: const InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10))),
labelText: 'E-mail',
prefixIcon: Icon(Icons.email)),
border: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10))),
labelText: 'E-mail',
prefixIcon: Icon(Icons.email),
),
),
),
),
Expand Down Expand Up @@ -147,7 +144,10 @@ class _LoginScreenState extends State<LoginScreen> {
child: Text(
"Sign In",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 20),
style: TextStyle(
fontSize: 20,
color: Colors.lightBlue,
),
),
),
),
Expand All @@ -163,7 +163,10 @@ class _LoginScreenState extends State<LoginScreen> {
TextButton(
child: const Text(
'Sign Up',
style: TextStyle(fontSize: 15),
style: TextStyle(
fontSize: 15,
color: Colors.lightBlue,
),
),
onPressed: () {
pushReplacementRoute(registerRoute);
Expand All @@ -172,13 +175,17 @@ class _LoginScreenState extends State<LoginScreen> {
],
),
TextButton(
onPressed: () {
pushRoute(resetPasswordRoute);
},
child: const Text(
'Forgot Password?',
style: TextStyle(fontSize: 15),
)),
onPressed: () {
pushRoute(resetPasswordRoute);
},
child: const Text(
'Forgot Password?',
style: TextStyle(
fontSize: 15,
color: Colors.lightBlue,
),
),
),
],
),
),
Expand Down
14 changes: 8 additions & 6 deletions lib/screens/register_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ class _RegisterScreenState extends State<RegisterScreen> {
Widget build(BuildContext context) {
final userProvider = Provider.of<UserProvider>(context, listen: false);
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.lightBlue,
elevation: 0,
),
body: Padding(
padding: const EdgeInsets.all(10),
child: FutureBuilder(
Expand Down Expand Up @@ -538,7 +534,10 @@ class _RegisterScreenState extends State<RegisterScreen> {
child: Text(
"Register",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 20),
style: TextStyle(
fontSize: 20,
color: Colors.lightBlue,
),
),
),
),
Expand All @@ -554,7 +553,10 @@ class _RegisterScreenState extends State<RegisterScreen> {
TextButton(
child: const Text(
'Sign In',
style: TextStyle(fontSize: 15),
style: TextStyle(
fontSize: 15,
color: Colors.lightBlue,
),
),
onPressed: () {
pushReplacementRoute(loginRoute);
Expand Down

0 comments on commit 4f11cf3

Please sign in to comment.