Visual adjustments

master
Rafael 2024-04-30 22:33:01 +02:00
parent 6a37ce858e
commit a02024c01b
6 changed files with 92 additions and 86 deletions

View File

@ -20,10 +20,9 @@ class ChatBubble extends StatelessWidget {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
// TODO check colors for bubbles and text below
color: isCurrentUser color: isCurrentUser
? (isDarkMode ? Colors.green.shade600 : Colors.green.shade500) ? (isDarkMode ? Colors.blue.shade700 : Colors.lightBlue.shade200)
: (isDarkMode ? Colors.grey.shade300 : Colors.grey.shade700), : (isDarkMode ? Colors.grey.shade800 : Colors.grey.shade400),
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
), ),
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),

View File

@ -19,10 +19,10 @@ class MyButton extends StatelessWidget {
color: Theme.of(context).colorScheme.secondary, color: Theme.of(context).colorScheme.secondary,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
padding: const EdgeInsets.all(25), padding: const EdgeInsets.all(16),
margin: const EdgeInsets.symmetric(horizontal: 25), margin: const EdgeInsets.symmetric(horizontal: 25),
child: Center( child: Center(
child: Text(text), child: Text(text, style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),),
), ),
), ),
); );

View File

@ -17,7 +17,7 @@ class MyTextField extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Padding( return Padding(
padding: const EdgeInsets.all(25.0), padding: const EdgeInsets.symmetric(horizontal: 25.0, vertical: 15),
child: TextField( child: TextField(
obscureText: obscureText, obscureText: obscureText,
controller: controller, controller: controller,

View File

@ -152,7 +152,7 @@ class _ChatPageState extends State<ChatPage> {
Widget _buildUserInput() { Widget _buildUserInput() {
return Padding( return Padding(
padding: const EdgeInsets.only(bottom: 50.0), padding: const EdgeInsets.only(bottom: 10.0),
child: Row( child: Row(
children: [ children: [
// text should take up most of space // text should take up most of space
@ -175,7 +175,7 @@ class _ChatPageState extends State<ChatPage> {
child: IconButton( child: IconButton(
onPressed: sendMessage, onPressed: sendMessage,
icon: const Icon(Icons.send), icon: const Icon(Icons.send),
color: Colors.white, // TODO check colors color: Colors.white,
), ),
) )
], ],

View File

@ -1,5 +1,5 @@
import 'package:cofounderella/services/auth/auth_service.dart';
import 'package:flutter/material.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_button.dart';
import 'package:cofounderella/components/my_textfield.dart'; import 'package:cofounderella/components/my_textfield.dart';
@ -40,7 +40,7 @@ class LoginPage extends StatelessWidget {
backgroundColor: Theme.of(context).colorScheme.background, backgroundColor: Theme.of(context).colorScheme.background,
body: Center( body: Center(
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [ child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
//logo // logo
Icon( Icon(
Icons.people_alt, Icons.people_alt,
size: 60, size: 60,
@ -76,7 +76,9 @@ class LoginPage extends StatelessWidget {
controller: _passwordController, controller: _passwordController,
), ),
//login button const SizedBox(height: 25),
// login button
MyButton( MyButton(
text: "Login", text: "Login",
onTap: () => login(context), onTap: () => login(context),

View File

@ -52,88 +52,93 @@ class RegisterPage extends StatelessWidget {
return Scaffold( return Scaffold(
backgroundColor: Theme.of(context).colorScheme.background, backgroundColor: Theme.of(context).colorScheme.background,
body: Center( body: Center(
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [ child: ListView(children: [
//logo Column(mainAxisAlignment: MainAxisAlignment.center, children: [
Icon( //logo
Icons.people_alt, Icon(
size: 60, Icons.people_alt,
color: Theme.of(context).colorScheme.primary, size: 60,
),
const SizedBox(height: 50),
//welcome back message
Text(
"Let's create an account for you",
style: TextStyle(
color: Theme.of(context).colorScheme.primary, color: Theme.of(context).colorScheme.primary,
fontSize: 16,
), ),
),
const SizedBox(height: 25), const SizedBox(height: 50),
// name text field // register message
MyTextField( Text(
hintText: "First Name", "Let's create an account for you",
obscureText: false, style: TextStyle(
controller: _nameController, color: Theme.of(context).colorScheme.primary,
), fontSize: 16,
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),
), ),
GestureDetector( ),
onTap: onTap,
child: const Text( const SizedBox(height: 25),
"Login now",
style: TextStyle( // name text field
fontWeight: FontWeight.bold, 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,
),
), ),
), ),
), ],
], )
) ]),
]), ]),
), ),
); );