From a02024c01b26ad6f8f92f864bf86a3945d3189e0 Mon Sep 17 00:00:00 2001 From: Rafael <1024481@stud.hs-mannheim.de> Date: Tue, 30 Apr 2024 22:33:01 +0200 Subject: [PATCH] Visual adjustments --- lib/components/chat_bubble.dart | 5 +- lib/components/my_button.dart | 4 +- lib/components/my_textfield.dart | 2 +- lib/pages/chat_page.dart | 4 +- lib/pages/login_page.dart | 8 +- lib/pages/register_page.dart | 155 ++++++++++++++++--------------- 6 files changed, 92 insertions(+), 86 deletions(-) diff --git a/lib/components/chat_bubble.dart b/lib/components/chat_bubble.dart index 38f737e..b2d5fdb 100644 --- a/lib/components/chat_bubble.dart +++ b/lib/components/chat_bubble.dart @@ -20,10 +20,9 @@ class ChatBubble extends StatelessWidget { return Container( decoration: BoxDecoration( - // TODO check colors for bubbles and text below color: isCurrentUser - ? (isDarkMode ? Colors.green.shade600 : Colors.green.shade500) - : (isDarkMode ? Colors.grey.shade300 : Colors.grey.shade700), + ? (isDarkMode ? Colors.blue.shade700 : Colors.lightBlue.shade200) + : (isDarkMode ? Colors.grey.shade800 : Colors.grey.shade400), borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.all(16.0), diff --git a/lib/components/my_button.dart b/lib/components/my_button.dart index 06a4e21..bbd946f 100644 --- a/lib/components/my_button.dart +++ b/lib/components/my_button.dart @@ -19,10 +19,10 @@ class MyButton extends StatelessWidget { color: Theme.of(context).colorScheme.secondary, borderRadius: BorderRadius.circular(8), ), - padding: const EdgeInsets.all(25), + padding: const EdgeInsets.all(16), margin: const EdgeInsets.symmetric(horizontal: 25), child: Center( - child: Text(text), + child: Text(text, style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),), ), ), ); diff --git a/lib/components/my_textfield.dart b/lib/components/my_textfield.dart index ced49ac..0378ccd 100644 --- a/lib/components/my_textfield.dart +++ b/lib/components/my_textfield.dart @@ -17,7 +17,7 @@ class MyTextField extends StatelessWidget { @override Widget build(BuildContext context) { return Padding( - padding: const EdgeInsets.all(25.0), + padding: const EdgeInsets.symmetric(horizontal: 25.0, vertical: 15), child: TextField( obscureText: obscureText, controller: controller, diff --git a/lib/pages/chat_page.dart b/lib/pages/chat_page.dart index 5cd2c97..509642a 100644 --- a/lib/pages/chat_page.dart +++ b/lib/pages/chat_page.dart @@ -152,7 +152,7 @@ class _ChatPageState extends State { Widget _buildUserInput() { return Padding( - padding: const EdgeInsets.only(bottom: 50.0), + padding: const EdgeInsets.only(bottom: 10.0), child: Row( children: [ // text should take up most of space @@ -175,7 +175,7 @@ class _ChatPageState extends State { child: IconButton( onPressed: sendMessage, icon: const Icon(Icons.send), - color: Colors.white, // TODO check colors + color: Colors.white, ), ) ], diff --git a/lib/pages/login_page.dart b/lib/pages/login_page.dart index 83eb96a..d6a3115 100644 --- a/lib/pages/login_page.dart +++ b/lib/pages/login_page.dart @@ -1,5 +1,5 @@ -import 'package:cofounderella/services/auth/auth_service.dart'; import 'package:flutter/material.dart'; +import 'package:cofounderella/services/auth/auth_service.dart'; import 'package:cofounderella/components/my_button.dart'; import 'package:cofounderella/components/my_textfield.dart'; @@ -40,7 +40,7 @@ class LoginPage extends StatelessWidget { backgroundColor: Theme.of(context).colorScheme.background, body: Center( child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [ - //logo + // logo Icon( Icons.people_alt, size: 60, @@ -76,7 +76,9 @@ class LoginPage extends StatelessWidget { controller: _passwordController, ), - //login button + const SizedBox(height: 25), + + // login button MyButton( text: "Login", onTap: () => login(context), diff --git a/lib/pages/register_page.dart b/lib/pages/register_page.dart index 8d7cf14..6476357 100644 --- a/lib/pages/register_page.dart +++ b/lib/pages/register_page.dart @@ -52,88 +52,93 @@ class RegisterPage extends StatelessWidget { return Scaffold( backgroundColor: Theme.of(context).colorScheme.background, body: Center( - child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [ - //logo - Icon( - Icons.people_alt, - size: 60, - color: Theme.of(context).colorScheme.primary, - ), - - const SizedBox(height: 50), - - //welcome back message - Text( - "Let's create an account for you", - style: TextStyle( + child: ListView(children: [ + Column(mainAxisAlignment: MainAxisAlignment.center, children: [ + //logo + Icon( + Icons.people_alt, + size: 60, color: Theme.of(context).colorScheme.primary, - fontSize: 16, ), - ), - const SizedBox(height: 25), + const SizedBox(height: 50), - // name text field - MyTextField( - hintText: "First Name", - obscureText: false, - controller: _nameController, - ), - MyTextField( - hintText: "Last Name", - obscureText: false, - controller: _lastnameController, - ), - - // email text field - MyTextField( - hintText: "E-Mail", - obscureText: false, - controller: _emailController, - ), - - const SizedBox(height: 10), - - // password text field - MyTextField( - hintText: "Password", - obscureText: true, - controller: _passwordController, - ), - - MyTextField( - hintText: "Confirm Password", - obscureText: true, - controller: _confirmPassController, - ), - - //login button - MyButton( - text: "Register", - onTap: () => register(context), - ), - - const SizedBox(height: 25), - - // register now - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "Already have an account? ", - style: TextStyle(color: Theme.of(context).colorScheme.primary), + // register message + Text( + "Let's create an account for you", + style: TextStyle( + color: Theme.of(context).colorScheme.primary, + fontSize: 16, ), - GestureDetector( - onTap: onTap, - child: const Text( - "Login now", - style: TextStyle( - fontWeight: FontWeight.bold, + ), + + const SizedBox(height: 25), + + // name text field + MyTextField( + hintText: "First Name", + obscureText: false, + controller: _nameController, + ), + MyTextField( + hintText: "Last Name", + obscureText: false, + controller: _lastnameController, + ), + + // email text field + MyTextField( + hintText: "E-Mail", + obscureText: false, + controller: _emailController, + ), + + const SizedBox(height: 10), + + // password text field + MyTextField( + hintText: "Password", + obscureText: true, + controller: _passwordController, + ), + + MyTextField( + hintText: "Confirm Password", + obscureText: true, + controller: _confirmPassController, + ), + + const SizedBox(height: 25), + + //login button + MyButton( + text: "Register", + onTap: () => register(context), + ), + + const SizedBox(height: 25), + + // register now + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Already have an account? ", + style: + TextStyle(color: Theme.of(context).colorScheme.primary), + ), + GestureDetector( + onTap: onTap, + child: const Text( + "Login now", + style: TextStyle( + fontWeight: FontWeight.bold, + ), ), ), - ), - ], - ) + ], + ) + ]), ]), ), );