diff --git a/lib/Controller/AtividadeController.dart b/lib/Controller/AtividadeController.dart index eb458fc..4881818 100644 --- a/lib/Controller/AtividadeController.dart +++ b/lib/Controller/AtividadeController.dart @@ -66,7 +66,7 @@ class AtividadeController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -113,7 +113,7 @@ class AtividadeController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -151,7 +151,7 @@ class AtividadeController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; diff --git a/lib/Controller/HabitoController.dart b/lib/Controller/HabitoController.dart index a369811..a85505c 100644 --- a/lib/Controller/HabitoController.dart +++ b/lib/Controller/HabitoController.dart @@ -62,7 +62,7 @@ class HabitoController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -93,7 +93,7 @@ class HabitoController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -138,7 +138,7 @@ class HabitoController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -176,7 +176,7 @@ class HabitoController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; diff --git a/lib/Controller/ItemController.dart b/lib/Controller/ItemController.dart index 1d18a4d..6dec04b 100644 --- a/lib/Controller/ItemController.dart +++ b/lib/Controller/ItemController.dart @@ -48,7 +48,7 @@ class ItemController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -86,7 +86,7 @@ class ItemController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; diff --git a/lib/Controller/LembreteController.dart b/lib/Controller/LembreteController.dart index f8fc8d9..e872cfb 100644 --- a/lib/Controller/LembreteController.dart +++ b/lib/Controller/LembreteController.dart @@ -57,7 +57,7 @@ class LembreteController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -88,7 +88,7 @@ class LembreteController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -137,7 +137,7 @@ class LembreteController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -175,7 +175,7 @@ class LembreteController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; diff --git a/lib/Controller/ListaController.dart b/lib/Controller/ListaController.dart index 2bad72b..6f02244 100644 --- a/lib/Controller/ListaController.dart +++ b/lib/Controller/ListaController.dart @@ -56,7 +56,7 @@ class ListaController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -87,7 +87,7 @@ class ListaController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -130,7 +130,7 @@ class ListaController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; diff --git a/lib/Controller/ProjetoController.dart b/lib/Controller/ProjetoController.dart index be3fb72..dd0a943 100644 --- a/lib/Controller/ProjetoController.dart +++ b/lib/Controller/ProjetoController.dart @@ -63,7 +63,7 @@ class ProjetoController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -94,7 +94,7 @@ class ProjetoController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -139,7 +139,7 @@ class ProjetoController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; @@ -177,7 +177,7 @@ class ProjetoController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { return value.valido!; diff --git a/lib/Controller/TarefaController.dart b/lib/Controller/TarefaController.dart index 1bc4f35..3775c27 100644 --- a/lib/Controller/TarefaController.dart +++ b/lib/Controller/TarefaController.dart @@ -63,7 +63,7 @@ class TarefaController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { await NotificationApi.showScheduledNotification( @@ -99,7 +99,7 @@ class TarefaController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { await NotificationApi.showScheduledNotification( @@ -153,7 +153,7 @@ class TarefaController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { NotificationApi.cancelScheduleNotification(model.id ?? 0); @@ -192,7 +192,7 @@ class TarefaController extends Base { ), ); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(seconds: 1)); if (value.valido!) { NotificationApi.cancelScheduleNotification(model.id ?? 0); diff --git a/lib/Model/API/APIModel.dart b/lib/Model/API/APIModel.dart index fe5582e..6355a33 100644 --- a/lib/Model/API/APIModel.dart +++ b/lib/Model/API/APIModel.dart @@ -2,7 +2,8 @@ import 'package:shared_preferences/shared_preferences.dart'; class ApiModel { //String ApiUrl = "http://192.168.100.74:4444"; - String ApiUrl = "http://10.0.0.91:4444"; + //String ApiUrl = "http://10.0.0.91:4444"; + String ApiUrl = "http://192.168.100.82:4444"; Future> getHeaders() async { SharedPreferences prefs = await SharedPreferences.getInstance(); diff --git a/lib/components/card_item.dart b/lib/components/card_item.dart index 0370528..8ec67ef 100644 --- a/lib/components/card_item.dart +++ b/lib/components/card_item.dart @@ -8,6 +8,7 @@ class cardItem extends StatelessWidget { final String? nome; final String? dash; final Function? abrirDialog; + final String? prioridade; const cardItem( {Key? key, @@ -15,7 +16,8 @@ class cardItem extends StatelessWidget { this.horario, this.nome, this.abrirDialog, - this.dash}) + this.dash, + this.prioridade}) : super(key: key); String formatarNome() { @@ -61,6 +63,13 @@ class cardItem extends StatelessWidget { //borderRadius: BorderRadius.all(Radius.circular(16)), color: cor, ), + child: Center( + child: Text( + prioridade ?? "", + style: TextStyle( + color: Colors.white, + ), + )), ) : Container( width: 90, diff --git a/lib/components/dialogs/atividades/atividadeCadastroDialog.dart b/lib/components/dialogs/atividades/atividadeCadastroDialog.dart index a7a81f6..8687234 100644 --- a/lib/components/dialogs/atividades/atividadeCadastroDialog.dart +++ b/lib/components/dialogs/atividades/atividadeCadastroDialog.dart @@ -51,6 +51,7 @@ Future criarAtividade(BuildContext context, child: DialogPersonalizado( nome: 'Atividade', child: [ + const Text('*Todos os campos são obrigatórios'), Padding( padding: const EdgeInsets.only(bottom: 16), child: input( diff --git a/lib/components/dialogs/habitos/habitoCadastroDialog.dart b/lib/components/dialogs/habitos/habitoCadastroDialog.dart index 908ff9d..233d372 100644 --- a/lib/components/dialogs/habitos/habitoCadastroDialog.dart +++ b/lib/components/dialogs/habitos/habitoCadastroDialog.dart @@ -48,6 +48,7 @@ Future criarHabito(BuildContext context, child: DialogPersonalizado( nome: 'Hábito', child: [ + const Text('*Todos os campos são obrigatórios'), Padding( padding: const EdgeInsets.only(bottom: 16), child: input( diff --git a/lib/components/dialogs/lembretes/lembreteCadastroDialog.dart b/lib/components/dialogs/lembretes/lembreteCadastroDialog.dart index 23c36bb..43b498f 100644 --- a/lib/components/dialogs/lembretes/lembreteCadastroDialog.dart +++ b/lib/components/dialogs/lembretes/lembreteCadastroDialog.dart @@ -49,6 +49,7 @@ Future criarLembrete(BuildContext context, child: DialogPersonalizado( nome: 'Lembrete', child: [ + const Text('*Todos os campos são obrigatórios'), Padding( padding: const EdgeInsets.only(bottom: 16), child: input( diff --git a/lib/components/dialogs/listas/listaCadastroDialog.dart b/lib/components/dialogs/listas/listaCadastroDialog.dart index aafd6ad..d98c4bb 100644 --- a/lib/components/dialogs/listas/listaCadastroDialog.dart +++ b/lib/components/dialogs/listas/listaCadastroDialog.dart @@ -63,6 +63,7 @@ Future criarLista(BuildContext context, child: DialogPersonalizado( nome: 'Lista', child: [ + const Text('*Todos os campos são obrigatórios'), Padding( padding: const EdgeInsets.only(bottom: 16), child: input( diff --git a/lib/components/dialogs/login/usuarioCadastroDialog.dart b/lib/components/dialogs/login/usuarioCadastroDialog.dart index 293615d..88fe73f 100644 --- a/lib/components/dialogs/login/usuarioCadastroDialog.dart +++ b/lib/components/dialogs/login/usuarioCadastroDialog.dart @@ -57,6 +57,7 @@ Future cadastrarUsuario(BuildContext context, nome: 'Cadastro', //minHeight: MediaQuery.of(context).size.height * 0.8, child: [ + const Text('*Todos os campos são obrigatórios'), Padding( padding: const EdgeInsets.only(bottom: 16), child: input( diff --git a/lib/components/dialogs/projetos/projetoCadastroDialog.dart b/lib/components/dialogs/projetos/projetoCadastroDialog.dart index 6d185e4..f0f6ba0 100644 --- a/lib/components/dialogs/projetos/projetoCadastroDialog.dart +++ b/lib/components/dialogs/projetos/projetoCadastroDialog.dart @@ -59,6 +59,7 @@ Future criarProjeto( child: DialogPersonalizado( nome: 'Projeto', child: [ + const Text('*Todos os campos são obrigatórios'), Padding( padding: const EdgeInsets.only(bottom: 16), child: input( diff --git a/lib/components/dialogs/tarefas/tarefaCadastroDialog.dart b/lib/components/dialogs/tarefas/tarefaCadastroDialog.dart index 17bfa62..ab4c289 100644 --- a/lib/components/dialogs/tarefas/tarefaCadastroDialog.dart +++ b/lib/components/dialogs/tarefas/tarefaCadastroDialog.dart @@ -47,6 +47,7 @@ Future criarTarefa(BuildContext context, child: DialogPersonalizado( nome: 'Tarefa', child: [ + const Text('*Todos os campos são obrigatórios'), Padding( padding: const EdgeInsets.only(bottom: 16), child: input( diff --git a/lib/home_page.dart b/lib/home_page.dart index 140d4c9..e704db8 100644 --- a/lib/home_page.dart +++ b/lib/home_page.dart @@ -233,6 +233,9 @@ class _HomePageState extends State { item.cor ?? '0xFF6385C3') ?? 0), nome: item.nome, + prioridade: snapshot.data['tarefas'] + [index]['prioridade'] ?? + "", horario: snapshot.data['tarefas'] [index]['dataFormatada'], abrirDialog: () { diff --git a/lib/listas_page.dart b/lib/listas_page.dart index 5a89ae3..4176a96 100644 --- a/lib/listas_page.dart +++ b/lib/listas_page.dart @@ -39,8 +39,7 @@ class _HomePageState extends State { Column( children: [ Padding( - padding: - const EdgeInsets.fromLTRB(24.0, 80.0, 24.0, 110), + padding: const EdgeInsets.fromLTRB(24.0, 80.0, 24.0, 0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [