From a073ae1e1e5e1da472402abac2129f76c567787d Mon Sep 17 00:00:00 2001 From: Gabriel Costa de Oliveira Date: Sat, 7 Dec 2024 11:02:37 -0300 Subject: [PATCH 1/5] =?UTF-8?q?Fix(#59):=20corre=C3=A7=C3=A3o=20de=20tela?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/edit_profile/viewModel/EditProfileViewModel.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ui/edit_profile/viewModel/EditProfileViewModel.dart b/lib/ui/edit_profile/viewModel/EditProfileViewModel.dart index ca2e67d..9b8f33b 100644 --- a/lib/ui/edit_profile/viewModel/EditProfileViewModel.dart +++ b/lib/ui/edit_profile/viewModel/EditProfileViewModel.dart @@ -1,3 +1,4 @@ +import 'package:aranduapp/core/log/Log.dart'; import 'package:flutter/material.dart'; class EditProfileViewModel extends ChangeNotifier { From 6fffd0df6536241996e14d9151a0fceea176f328 Mon Sep 17 00:00:00 2001 From: gabrielm2q Date: Wed, 18 Dec 2024 16:32:21 -0300 Subject: [PATCH 2/5] fix(fga-eps-mds/2024.2-ARANDU-DOC#59): fixing merge conflicts Co-authored-by: zDrNz --- lib/ui/edit_profile/view/EditProfileView.dart | 113 ++++++++++++++---- 1 file changed, 93 insertions(+), 20 deletions(-) diff --git a/lib/ui/edit_profile/view/EditProfileView.dart b/lib/ui/edit_profile/view/EditProfileView.dart index ec55fcb..1c9fd32 100644 --- a/lib/ui/edit_profile/view/EditProfileView.dart +++ b/lib/ui/edit_profile/view/EditProfileView.dart @@ -1,10 +1,9 @@ -import 'package:aranduapp/ui/shared/TextName.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - import 'package:aranduapp/ui/edit_profile/viewModel/EditProfileViewModel.dart'; import 'package:aranduapp/ui/shared/TextEmail.dart'; +import 'package:aranduapp/ui/shared/TextName.dart'; import 'package:aranduapp/ui/shared/TextPassword.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class EditProfile extends StatelessWidget { const EditProfile({super.key}); @@ -26,15 +25,48 @@ class EditProfileScreen extends StatefulWidget { } class _EditProfileScreenState extends State { - @override Widget build(BuildContext context) { final viewModel = Provider.of(context); return Scaffold( appBar: AppBar( - title: const Text('Editar Perfil'), + backgroundColor: Colors.transparent, // Define o fundo transparente + elevation: 0, // Remove a sombra da AppBar + title: Center( + child: Text( + style: TextStyle( + color: Colors.black, // Muda a cor do texto + fontSize: 24, // Ajusta o tamanho (opcional) + ), + 'Editar perfil', + ), + ), + actions: [ + IconButton( + color: Colors.black, + icon: Icon(Icons.notifications), // Ícone de notificação + onPressed: () { + // Ação quando o ícone de notificação for pressionado + }, + ), + ], + leading: IconButton( + color: Colors.black, + icon: Icon(Icons.arrow_back), + onPressed: () {}, + ), ), - body: _buildForm(viewModel) + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, // Centraliza verticalmente + crossAxisAlignment: + CrossAxisAlignment.center, // Centraliza horizontalmente + children: [ + _icon(context), + SizedBox(height: 50), + _buildForm(viewModel), + ], + )), ); } @@ -46,26 +78,27 @@ class _EditProfileScreenState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - TextName( - controller: viewModel.firstNameController, - padding: const EdgeInsets.symmetric(vertical: 16) - ), - + controller: viewModel.firstNameController, + padding: const EdgeInsets.symmetric(vertical: 16)), + SizedBox(height: 20), TextEmail( padding: const EdgeInsets.symmetric(vertical: 16), controller: viewModel.emailController, ), - + SizedBox(height: 20), TextPassWord( padding: const EdgeInsets.symmetric(vertical: 16), controller: viewModel.passwordController, ), - - const SizedBox(height: 32), - _saveButton(viewModel), - const SizedBox(height: 16), - _deleteButton(context), + SizedBox(height: 56), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _saveButton(viewModel), + _deleteButton(context), + ], + ), ], ), ), @@ -87,23 +120,63 @@ class _EditProfileScreenState extends State { ); } }, - + style: ElevatedButton.styleFrom( + minimumSize: Size(150, 50), // Largura: 200, Altura: 50 + ), child: Consumer( builder: (context, value, child) => value.isLoading ? const CircularProgressIndicator(value: null) : const Text('Salvar'), ), - ); } Widget _deleteButton(BuildContext context) { return ElevatedButton( onPressed: () => _showDeleteConfirmationDialog(context), + style: ElevatedButton.styleFrom( + minimumSize: Size(150, 50), // Largura: 200, Altura: 50 + ), child: const Text('Deletar Conta'), ); } + Widget _icon(BuildContext context) { + return Padding( + padding: const EdgeInsets.only( + left: 16.0), // Adiciona espaço da borda esquerda + child: Row( + children: [ + // Ícone circular + CircleAvatar( + radius: 30, // Tamanho do círculo + ), + SizedBox(width: 16), // Espaço entre a imagem e o texto + // Texto com o nome e o cargo + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Stefani", + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ), + Text( + "Estudante", + style: TextStyle( + fontSize: 14, + color: Colors.grey, + ), + ), + ], + ), + ], + ), + ); + } + void _showDeleteConfirmationDialog(BuildContext context) { showDialog( context: context, From dfa2a32b148d8df89124e0b4e1d3023573565cbb Mon Sep 17 00:00:00 2001 From: Leinad Date: Sat, 7 Dec 2024 13:07:33 -0300 Subject: [PATCH 3/5] =?UTF-8?q?(#59):Ajustando=20Interface=20nos=20pa?= =?UTF-8?q?dr=C3=B5es=20Figma?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/edit_profile/view/EditProfileView.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ui/edit_profile/view/EditProfileView.dart b/lib/ui/edit_profile/view/EditProfileView.dart index 1c9fd32..69951f8 100644 --- a/lib/ui/edit_profile/view/EditProfileView.dart +++ b/lib/ui/edit_profile/view/EditProfileView.dart @@ -150,6 +150,7 @@ class _EditProfileScreenState extends State { // Ícone circular CircleAvatar( radius: 30, // Tamanho do círculo + backgroundColor: Colors.grey, ), SizedBox(width: 16), // Espaço entre a imagem e o texto // Texto com o nome e o cargo @@ -157,7 +158,7 @@ class _EditProfileScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "Stefani", + "NOME", style: TextStyle( fontSize: 18, fontWeight: FontWeight.bold, From 3299d9d58cb0f2bd1a22d4d4ef6ea16d09aac64a Mon Sep 17 00:00:00 2001 From: Leinad Date: Wed, 11 Dec 2024 12:44:46 -0300 Subject: [PATCH 4/5] Style(#59): Ajustes visuais na parte do edit profile --- lib/ui/edit_profile/view/EditProfileView.dart | 124 +++++++++--------- 1 file changed, 65 insertions(+), 59 deletions(-) diff --git a/lib/ui/edit_profile/view/EditProfileView.dart b/lib/ui/edit_profile/view/EditProfileView.dart index 69951f8..fc2b162 100644 --- a/lib/ui/edit_profile/view/EditProfileView.dart +++ b/lib/ui/edit_profile/view/EditProfileView.dart @@ -30,24 +30,22 @@ class _EditProfileScreenState extends State { final viewModel = Provider.of(context); return Scaffold( appBar: AppBar( - backgroundColor: Colors.transparent, // Define o fundo transparente - elevation: 0, // Remove a sombra da AppBar + backgroundColor: Colors.transparent, + elevation: 0, title: Center( child: Text( + 'Editar perfil', style: TextStyle( - color: Colors.black, // Muda a cor do texto - fontSize: 24, // Ajusta o tamanho (opcional) + color: Colors.black, + fontSize: 24, ), - 'Editar perfil', ), ), actions: [ IconButton( color: Colors.black, - icon: Icon(Icons.notifications), // Ícone de notificação - onPressed: () { - // Ação quando o ícone de notificação for pressionado - }, + icon: Icon(Icons.notifications), + onPressed: () {}, ), ], leading: IconButton( @@ -56,51 +54,62 @@ class _EditProfileScreenState extends State { onPressed: () {}, ), ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, // Centraliza verticalmente - crossAxisAlignment: - CrossAxisAlignment.center, // Centraliza horizontalmente - children: [ - _icon(context), - SizedBox(height: 50), - _buildForm(viewModel), - ], - )), + body: LayoutBuilder( + builder: (context, constraints) { + final isSmallScreen = constraints.maxWidth < 600; + return Center( + child: SingleChildScrollView( + padding: const EdgeInsets.all(16.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _icon(context), + SizedBox(height: isSmallScreen ? 30 : 50), + _buildForm(viewModel, isSmallScreen), + ], + ), + ), + ); + }, + ), ); } - Widget _buildForm(EditProfileViewModel viewModel) { - return SingleChildScrollView( - padding: const EdgeInsets.all(16.0), - child: Form( - key: viewModel.formKey, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextName( - controller: viewModel.firstNameController, - padding: const EdgeInsets.symmetric(vertical: 16)), - SizedBox(height: 20), - TextEmail( - padding: const EdgeInsets.symmetric(vertical: 16), - controller: viewModel.emailController, - ), - SizedBox(height: 20), - TextPassWord( - padding: const EdgeInsets.symmetric(vertical: 16), - controller: viewModel.passwordController, - ), - SizedBox(height: 56), - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - _saveButton(viewModel), - _deleteButton(context), - ], - ), - ], - ), + Widget _buildForm(EditProfileViewModel viewModel, bool isSmallScreen) { + return Form( + key: viewModel.formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + TextName( + controller: viewModel.firstNameController, + padding: const EdgeInsets.symmetric(vertical: 16), + ), + SizedBox(height: 20), + TextEmail( + padding: const EdgeInsets.symmetric(vertical: 16), + controller: viewModel.emailController, + ), + SizedBox(height: 20), + TextPassWord( + padding: const EdgeInsets.symmetric(vertical: 16), + controller: viewModel.passwordController, + ), + SizedBox(height: isSmallScreen ? 40 : 56), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Expanded( + child: _saveButton(viewModel), + ), + SizedBox(width: isSmallScreen ? 10 : 20), + Expanded( + child: _deleteButton(context), + ), + ], + ), + ], ), ); } @@ -121,7 +130,7 @@ class _EditProfileScreenState extends State { } }, style: ElevatedButton.styleFrom( - minimumSize: Size(150, 50), // Largura: 200, Altura: 50 + minimumSize: Size(0, 50), ), child: Consumer( builder: (context, value, child) => value.isLoading @@ -135,7 +144,7 @@ class _EditProfileScreenState extends State { return ElevatedButton( onPressed: () => _showDeleteConfirmationDialog(context), style: ElevatedButton.styleFrom( - minimumSize: Size(150, 50), // Largura: 200, Altura: 50 + minimumSize: Size(0, 50), ), child: const Text('Deletar Conta'), ); @@ -143,17 +152,14 @@ class _EditProfileScreenState extends State { Widget _icon(BuildContext context) { return Padding( - padding: const EdgeInsets.only( - left: 16.0), // Adiciona espaço da borda esquerda + padding: const EdgeInsets.only(left: 16.0), child: Row( children: [ - // Ícone circular CircleAvatar( - radius: 30, // Tamanho do círculo + radius: 30, backgroundColor: Colors.grey, ), - SizedBox(width: 16), // Espaço entre a imagem e o texto - // Texto com o nome e o cargo + SizedBox(width: 16), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ From f8fd8660aa2cdee59f42f945d2d97246435b0bfd Mon Sep 17 00:00:00 2001 From: Leinad Date: Wed, 18 Dec 2024 22:16:03 -0300 Subject: [PATCH 5/5] (fga-eps-mds/2024.2-ARANDU-DOC#59):Ajuste de cores --- lib/ui/edit_profile/view/EditProfileView.dart | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/ui/edit_profile/view/EditProfileView.dart b/lib/ui/edit_profile/view/EditProfileView.dart index fc2b162..65bb522 100644 --- a/lib/ui/edit_profile/view/EditProfileView.dart +++ b/lib/ui/edit_profile/view/EditProfileView.dart @@ -30,26 +30,26 @@ class _EditProfileScreenState extends State { final viewModel = Provider.of(context); return Scaffold( appBar: AppBar( - backgroundColor: Colors.transparent, + backgroundColor: Theme.of(context).colorScheme.surface, elevation: 0, title: Center( child: Text( 'Editar perfil', style: TextStyle( - color: Colors.black, + color: Theme.of(context).colorScheme.onSurface, fontSize: 24, ), ), ), actions: [ IconButton( - color: Colors.black, + color: Theme.of(context).colorScheme.primary, icon: Icon(Icons.notifications), onPressed: () {}, ), ], leading: IconButton( - color: Colors.black, + color: Theme.of(context).colorScheme.primary, icon: Icon(Icons.arrow_back), onPressed: () {}, ), @@ -64,7 +64,10 @@ class _EditProfileScreenState extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - _icon(context), + Padding( + padding: const EdgeInsets.only(top: 6.0), // Move para cima + child: _icon(context), + ), SizedBox(height: isSmallScreen ? 30 : 50), _buildForm(viewModel, isSmallScreen), ], @@ -96,7 +99,7 @@ class _EditProfileScreenState extends State { padding: const EdgeInsets.symmetric(vertical: 16), controller: viewModel.passwordController, ), - SizedBox(height: isSmallScreen ? 40 : 56), + SizedBox(height: isSmallScreen ? 100 : 56), Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ @@ -157,7 +160,7 @@ class _EditProfileScreenState extends State { children: [ CircleAvatar( radius: 30, - backgroundColor: Colors.grey, + backgroundColor: Theme.of(context).colorScheme.onSurface, ), SizedBox(width: 16), Column( @@ -174,7 +177,7 @@ class _EditProfileScreenState extends State { "Estudante", style: TextStyle( fontSize: 14, - color: Colors.grey, + color: Theme.of(context).colorScheme.onSurface, ), ), ],