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,7 +52,8 @@ 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: [
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
//logo //logo
Icon( Icon(
Icons.people_alt, Icons.people_alt,
@ -62,7 +63,7 @@ class RegisterPage extends StatelessWidget {
const SizedBox(height: 50), const SizedBox(height: 50),
//welcome back message // register message
Text( Text(
"Let's create an account for you", "Let's create an account for you",
style: TextStyle( style: TextStyle(
@ -107,6 +108,8 @@ class RegisterPage extends StatelessWidget {
controller: _confirmPassController, controller: _confirmPassController,
), ),
const SizedBox(height: 25),
//login button //login button
MyButton( MyButton(
text: "Register", text: "Register",
@ -121,7 +124,8 @@ class RegisterPage extends StatelessWidget {
children: [ children: [
Text( Text(
"Already have an account? ", "Already have an account? ",
style: TextStyle(color: Theme.of(context).colorScheme.primary), style:
TextStyle(color: Theme.of(context).colorScheme.primary),
), ),
GestureDetector( GestureDetector(
onTap: onTap, onTap: onTap,
@ -135,6 +139,7 @@ class RegisterPage extends StatelessWidget {
], ],
) )
]), ]),
]),
), ),
); );
} }