diff --git a/lib/assets/images/02.jpeg b/lib/assets/images/02.jpeg new file mode 100644 index 0000000..bbdc16e Binary files /dev/null and b/lib/assets/images/02.jpeg differ diff --git a/lib/assets/images/03.jpeg b/lib/assets/images/03.jpeg new file mode 100644 index 0000000..fc6837e Binary files /dev/null and b/lib/assets/images/03.jpeg differ diff --git a/lib/assets/images/04.jpeg b/lib/assets/images/04.jpeg new file mode 100644 index 0000000..d485bdc Binary files /dev/null and b/lib/assets/images/04.jpeg differ diff --git a/lib/assets/images/05.jpeg b/lib/assets/images/05.jpeg new file mode 100644 index 0000000..db9000b Binary files /dev/null and b/lib/assets/images/05.jpeg differ diff --git a/lib/assets/images/image_05.jpeg b/lib/assets/images/image_05.jpeg new file mode 100644 index 0000000..80731cb Binary files /dev/null and b/lib/assets/images/image_05.jpeg differ diff --git a/lib/assets/images/masculino.png b/lib/assets/images/masculino.png new file mode 100644 index 0000000..00e195a Binary files /dev/null and b/lib/assets/images/masculino.png differ diff --git a/lib/src/app/home/screens/categoria_screen.dart b/lib/src/app/home/screens/categoria_screen.dart new file mode 100644 index 0000000..b9bdee6 --- /dev/null +++ b/lib/src/app/home/screens/categoria_screen.dart @@ -0,0 +1,358 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:recomendagro/assets/theme/colors.dart'; +import 'package:recomendagro/src/app/home/screens/formulario_screen.dart'; +import 'package:recomendagro/src/app/home/widgets/card_info_detail.dart'; +import 'package:recomendagro/src/shared/widgets/back_button.dart'; +import 'package:recomendagro/src/shared/widgets/buttons/simple_button.dart'; + +class CategoriaScreen extends StatefulWidget { + static String path = '/categoriascreen'; + final String title; + const CategoriaScreen({super.key, required this.title}); + + @override + State createState() => _CategoriaScreenState(); +} + +class _CategoriaScreenState extends State with TickerProviderStateMixin { + final GlobalKey _scaffoldKey = GlobalKey(); + final GlobalKey _formKey = GlobalKey(); + TabController? _tabMenuController; + + @override + void initState() { + _tabMenuController = TabController(initialIndex: 0, length: 3, vsync: this); + _tabMenuController!.addListener(() { + if (_tabMenuController!.indexIsChanging) { + setState(() { + }); + } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + Radius radius = const Radius.circular(30); + return Scaffold( + key: _scaffoldKey, + extendBodyBehindAppBar: true, + appBar: const PreferredSize( + preferredSize: Size.fromHeight(0), + child: SizedBox(), + ), + body: Container( + decoration: BoxDecoration( + // color: Theme.of(context).primaryColor, + image: const DecorationImage( + image: AssetImage('lib/assets/images/bg_header.png'), + fit: BoxFit.cover, + ) + ), + child: DefaultTabController( + length: 2, + child: Column( + children: [ + const SizedBox(height: 40), + SafeArea( + bottom: false, + child: SizedBox( + child: Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 20, bottom: 20), + child: Row( + children: [ + const BackButtonWidget(), + const SizedBox(width: 10), + Expanded( + child: SizedBox( + width: double.infinity, + child: Text( + widget.title, + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + color: AppColorLight.primaryColor, + fontSize: 20 + ) + ) + ) + ) + ] + ) + ) + ) + ), + ClipRRect( + borderRadius: BorderRadius.only( + topLeft: radius, + topRight: radius + ), + child: Center( + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 20), + decoration: BoxDecoration( + color: Theme.of(context).scaffoldBackgroundColor + ), + child: Form( + key: _formKey, + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + const SizedBox(height: 20), + Container( + height: 70, + decoration: BoxDecoration( + color: Theme.of(context).scaffoldBackgroundColor, + borderRadius: BorderRadius.circular(25.0) + ), + child: TabBar( + controller: _tabMenuController, + indicatorSize: TabBarIndicatorSize.tab, + labelStyle: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + color: AppColorLight.primaryColor, + fontSize: 17 + ), + indicator: BoxDecoration( + color: AppColorLight.secondaryColor, + borderRadius: BorderRadius.circular(20.0) + ), + labelColor: Colors.white, + unselectedLabelColor: AppColorLight.primaryColor, + overlayColor: const MaterialStatePropertyAll(Colors.white), + tabs: const [ + Tab( + text: 'Soja', + ), + Tab( + text: 'Trigo', + ), + Tab( + text: 'Milho', + ), + ], + ), + ), + const SizedBox(height: 20), + ] + ) + ) + ), + ) + ), + Expanded( + child: TabBarView( + controller: _tabMenuController, + children: [ + Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: SingleChildScrollView( + child: Column( + children: [ + Row( + children: [ + CardInfoDetailWidget( + svg: 'lib/assets/images/02.jpeg', + title: 'Apaga foto', + subTitle: 'Alternatera tenella', + onTap: (){ + print('dsdsd'); + }, + ), + SizedBox(width: 20), + CardInfoDetailWidget( + svg: 'lib/assets/images/03.jpeg', + title: 'Azevén', + subTitle: 'Lolium Mutiforum', + onTap: (){ + print('dsdsd'); + }, + ), + ], + ), + const SizedBox(height: 20), + Row( + children: [ + CardInfoDetailWidget( + svg: 'lib/assets/images/04.jpeg', + title: 'Buva', + subTitle: 'Caonyza bonariensis', + onTap: (){ + print('dsdsd'); + }, + ), + SizedBox(width: 20), + CardInfoDetailWidget( + svg: 'lib/assets/images/05.jpeg', + title: 'Capim amargoso', + subTitle: 'Digitaria insularis', + onTap: (){ + print('dsdsd'); + }, + ) + ] + ), + ], + ), + ), + ), + ), + Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: SingleChildScrollView( + child: Column( + children: [ + Row( + children: [ + CardInfoDetailWidget( + svg: 'lib/assets/images/02.jpeg', + title: 'Apaga foto', + subTitle: 'Alternatera tenella', + onTap: (){ + print('dsdsd'); + }, + ), + SizedBox(width: 20), + CardInfoDetailWidget( + svg: 'lib/assets/images/02.jpeg', + title: 'Azevén', + subTitle: 'Lolium Mutiforum', + onTap: (){ + print('dsdsd'); + }, + ), + ], + ), + const SizedBox(height: 20), + Row( + children: [ + CardInfoDetailWidget( + svg: 'lib/assets/images/03.jpeg', + title: 'Buva', + subTitle: 'Caonyza bonariensis', + onTap: (){ + print('dsdsd'); + }, + ), + SizedBox(width: 20), + CardInfoDetailWidget( + svg: 'lib/assets/images/03.jpeg', + title: 'Capim amargoso', + subTitle: 'Digitaria insularis', + onTap: (){ + print('dsdsd'); + }, + ) + ], + ), + const SizedBox(height: 20), + Row( + children: [ + CardInfoDetailWidget( + svg: 'lib/assets/images/02.jpeg', + title: 'Capim branqiária', + subTitle: 'Digitaria insularis', + onTap: (){ + print('dsdsd'); + }, + ), + SizedBox(width: 20), + CardInfoDetailWidget( + svg: 'lib/assets/images/02.jpeg', + title: 'Capim carrapicho', + subTitle: 'Digitaria insularis', + onTap: (){ + print('dsdsd'); + }, + ), + ], + ), + ], + ), + ), + ), + ), + Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: SingleChildScrollView( + child: Column( + children: [ + Row( + children: [ + CardInfoDetailWidget( + svg: 'lib/assets/images/02.jpeg', + title: 'Apaga foto', + subTitle: 'Alternatera tenella', + onTap: (){ + print('dsdsd'); + }, + ), + SizedBox(width: 20), + CardInfoDetailWidget( + svg: 'lib/assets/images/02.jpeg', + title: 'Azevén', + subTitle: 'Lolium Mutiforum', + onTap: (){ + print('dsdsd'); + }, + ), + ], + ), + const SizedBox(height: 20), + Row( + children: [ + CardInfoDetailWidget( + svg: 'lib/assets/images/03.jpeg', + title: 'Buva', + subTitle: 'Caonyza bonariensis', + onTap: (){ + print('dsdsd'); + }, + ), + SizedBox(width: 20), + CardInfoDetailWidget( + svg: 'lib/assets/images/03.jpeg', + title: 'Capim amargoso', + subTitle: 'Digitaria insularis', + onTap: (){ + print('dsdsd'); + }, + ) + ], + ), + const SizedBox(height: 20), + ], + ), + ), + ), + ) + ] + ) + ), + const SizedBox(height: 20), + SafeArea( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 20), + child: ButtonWidget( + label: 'Não identifiquei o alvo', + isloading: false, + onTap: (){ + context.push(FormularioScreen.path); + } + ) + ) + ) + ] + ) + ) + ) + ); + } +} \ No newline at end of file diff --git a/lib/src/app/home/screens/formulario_screen.dart b/lib/src/app/home/screens/formulario_screen.dart new file mode 100644 index 0000000..e81db53 --- /dev/null +++ b/lib/src/app/home/screens/formulario_screen.dart @@ -0,0 +1,172 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_font_icons/flutter_font_icons.dart'; +import 'package:recomendagro/assets/theme/colors.dart'; +import 'package:recomendagro/src/app/home/widgets/card_info_detail.dart'; +import 'package:recomendagro/src/shared/widgets/back_button.dart'; +import 'package:recomendagro/src/shared/widgets/buttons/simple_button.dart'; +import 'package:recomendagro/src/shared/widgets/inputs/simple_input.dart'; + +class FormularioScreen extends StatefulWidget { + static String path = '/formularioscreen'; + const FormularioScreen({super.key}); + + @override + State createState() => _FormularioScreenState(); +} + +class _FormularioScreenState extends State with TickerProviderStateMixin { + final GlobalKey _scaffoldKey = GlobalKey(); + final GlobalKey _formKey = GlobalKey(); + TabController? _tabMenuController; + + @override + void initState() { + _tabMenuController = TabController(initialIndex: 0, length: 3, vsync: this); + _tabMenuController!.addListener(() { + if (_tabMenuController!.indexIsChanging) { + setState(() { + }); + } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + Radius radius = const Radius.circular(30); + return Scaffold( + key: _scaffoldKey, + extendBodyBehindAppBar: true, + appBar: const PreferredSize( + preferredSize: Size.fromHeight(0), + child: SizedBox(), + ), + body: Container( + decoration: BoxDecoration( + // color: Theme.of(context).primaryColor, + image: const DecorationImage( + image: AssetImage('lib/assets/images/bg_header.png'), + fit: BoxFit.cover, + ) + ), + child: DefaultTabController( + length: 2, + child: Column( + children: [ + const SizedBox(height: 40), + SafeArea( + bottom: false, + child: SizedBox( + child: Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 20, bottom: 20), + child: Row( + children: [ + const BackButtonWidget(), + const SizedBox(width: 10), + Expanded( + child: SizedBox( + width: double.infinity, + child: Text( + "Identificamos seu alvo", + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + color: AppColorLight.primaryColor, + fontSize: 20 + ) + ) + ) + ) + ] + ) + ) + ) + ), + ClipRRect( + borderRadius: BorderRadius.only( + topLeft: radius, + topRight: radius + ), + child: Center( + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 20), + decoration: BoxDecoration( + color: Theme.of(context).scaffoldBackgroundColor + ), + child: Form( + key: _formKey, + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + const SizedBox(height: 5), + Container( + height: 20, + ), + ] + ) + ) + ), + ) + ), + Expanded( + child: Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 150, + height: 150, + decoration: BoxDecoration( + border: Border.all(width: 1, color: AppColorLight.primaryColor), + borderRadius: BorderRadius.circular(10) + ), + child: Icon(Feather.image, size: 50, color: AppColorLight.secondaryColor), + ), + const SizedBox(height: 20), + SimpleInput( + hintText: '', + title: 'Nome completo', + controller: null, + validator: true, + ), + const SizedBox(height: 20), + SimpleInput( + title: 'Email', + hintText: 'Informe seu email', + typeInput: TypInputText.EMAIL, + controller: null, + validator: true, + ), + const SizedBox(height: 20), + SimpleInput( + title: 'Telefone', + hintText: 'Informe seu telefone', + typeInput: TypInputText.EMAIL, + controller: null, + validator: true, + ), + const SizedBox(height: 20), + ButtonWidget( + label: 'Enviar mensagem', + isloading: false, + onTap: (){ + } + ) + ], + ), + ), + ), + ) + ) + ], + ), + ), + ) + ); + } +} \ No newline at end of file diff --git a/lib/src/app/home/screens/home_screen.dart b/lib/src/app/home/screens/home_screen.dart index 161826e..fd736b3 100644 --- a/lib/src/app/home/screens/home_screen.dart +++ b/lib/src/app/home/screens/home_screen.dart @@ -1,7 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_font_icons/flutter_font_icons.dart'; +import 'package:go_router/go_router.dart'; import 'package:recomendagro/assets/theme/colors.dart'; +import 'package:recomendagro/src/app/home/screens/categoria_screen.dart'; import 'package:recomendagro/src/app/home/widgets/card_info_card.dart'; +import 'package:recomendagro/src/app/home/widgets/card_info_card_v2.dart'; import 'package:recomendagro/src/shared/utils/responsive/responsive_metrics.dart'; import 'package:recomendagro/src/shared/widgets/inputs/search_controller.dart'; @@ -111,19 +114,19 @@ class _HomeScreenState extends State { child: SingleChildScrollView( child: Column( children: [ - // const SizedBox(height: 15), - // SizedBox( - // width: double.infinity, - // child: Text( - // "Selecione as informacoes", - // textAlign: TextAlign.start, - // style: Theme.of(context).textTheme.bodyMedium?.copyWith( - // fontWeight: FontWeight.w600, - // color: AppColorLight.text01Color, - // fontSize: 20 - // ) - // ) - // ), + const SizedBox(height: 15), + SizedBox( + width: double.infinity, + child: Text( + "Escolha o segmento desejado", + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + fontWeight: FontWeight.w600, + color: AppColorLight.text02Color, + fontSize: 20 + ) + ) + ), // SizedBox( // width: double.infinity, // child: Text( @@ -136,59 +139,78 @@ class _HomeScreenState extends State { // ) // ) // ), - const SizedBox(height: 20), - SearchInput( - hintText: 'Pesquisar', - showIcon: true, - prefixIcon: Feather.search, - textInputType: TextInputType.text, - textInputAction: TextInputAction.search, - onFieldSubmitted: (value) async { - } - ), + // const SizedBox(height: 20), + // SearchInput( + // hintText: 'Pesquisar', + // showIcon: true, + // prefixIcon: Feather.search, + // textInputType: TextInputType.text, + // textInputAction: TextInputAction.search, + // onFieldSubmitted: (value) async { + // } + // ), const SizedBox(height: 20), Row( children: [ - CardInfoCardWidget( - svg: 'lib/assets/images/algodao.png', - title: 'Algodão', + CardInfoCardV2Widget( + svg: 'lib/assets/images/image_05.jpeg', + title: 'Inseticida', + onTap: (){ + context.push(CategoriaScreen.path, extra: 'Algodão'); + }, ), SizedBox(width: 20), CardInfoCardWidget( - svg: 'lib/assets/images/cafe.png', - title: 'Café', - ), - ], - ), - const SizedBox(height: 20), - Row( - children: [ - CardInfoCardWidget( - svg: 'lib/assets/images/cana.png', - title: 'Cana', - ), - SizedBox(width: 20), - CardInfoCardWidget( - svg: 'lib/assets/images/milho.png', - title: 'Milho', + svg: 'lib/assets/images/masculino.png', + title: 'Herbicida', + onTap: (){ + context.push(CategoriaScreen.path, extra: 'Café'); + } ) - ], + ] ), const SizedBox(height: 20), Row( children: [ CardInfoCardWidget( - svg: 'lib/assets/images/soja.png', - title: 'Soja', + svg: 'lib/assets/images/masculino.png', + title: 'Fungicida', + onTap: (){ + context.push(CategoriaScreen.path, extra: 'Cana'); + }, ), SizedBox(width: 20), CardInfoCardWidget( - svg: 'lib/assets/images/trigo.png', - title: 'Trigo', - ), - ], + svg: 'lib/assets/images/masculino.png', + title: 'Nutrição foliar', + onTap: (){ + context.push(CategoriaScreen.path, extra: 'Milho'); + } + ) + ] ), const SizedBox(height: 20), + Row( + children: [ + CardInfoCardWidget( + svg: 'lib/assets/images/masculino.png', + title: 'Tecnologia de Aplicação', + onTap: (){ + context.push(CategoriaScreen.path, extra: 'Soja'); + }, + ), + // SizedBox(width: 20), + // CardInfoCardWidget( + // svg: 'lib/assets/images/trigo.png', + // title: 'Trigo', + // onTap: (){ + // context.push(CategoriaScreen.path, extra: 'Trijo'); + // } + // ) + ] + ), + const SizedBox(height: 20), + const SizedBox(height: 20), ] ), ) diff --git a/lib/src/app/home/screens/relatorio_screen.dart b/lib/src/app/home/screens/relatorio_screen.dart new file mode 100644 index 0000000..438e00b --- /dev/null +++ b/lib/src/app/home/screens/relatorio_screen.dart @@ -0,0 +1,174 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_font_icons/flutter_font_icons.dart'; +import 'package:recomendagro/assets/theme/colors.dart'; +import 'package:recomendagro/src/shared/widgets/back_button.dart'; +import 'package:recomendagro/src/shared/widgets/buttons/simple_button.dart'; +import 'package:recomendagro/src/shared/widgets/inputs/simple_input.dart'; + +class RelatorioScreen extends StatefulWidget { + static String path = '/relatorioscreen'; + const RelatorioScreen({super.key}); + + @override + State createState() => _RelatorioScreenState(); +} + +class _RelatorioScreenState extends State with TickerProviderStateMixin { + final GlobalKey _scaffoldKey = GlobalKey(); + final GlobalKey _formKey = GlobalKey(); + TabController? _tabMenuController; + + @override + void initState() { + _tabMenuController = TabController(initialIndex: 0, length: 3, vsync: this); + _tabMenuController!.addListener(() { + if (_tabMenuController!.indexIsChanging) { + setState(() { + }); + } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + Radius radius = const Radius.circular(30); + return Scaffold( + key: _scaffoldKey, + extendBodyBehindAppBar: true, + appBar: const PreferredSize( + preferredSize: Size.fromHeight(0), + child: SizedBox(), + ), + body: Container( + decoration: BoxDecoration( + // color: Theme.of(context).primaryColor, + image: const DecorationImage( + image: AssetImage('lib/assets/images/bg_header.png'), + fit: BoxFit.cover, + ) + ), + child: DefaultTabController( + length: 2, + child: Column( + children: [ + const SizedBox(height: 40), + SafeArea( + bottom: false, + child: SizedBox( + child: Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 20, bottom: 20), + child: Row( + children: [ + const BackButtonWidget(), + const SizedBox(width: 10), + Expanded( + child: SizedBox( + width: double.infinity, + child: Text( + "Relatório final", + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + color: AppColorLight.primaryColor, + fontSize: 20 + ) + ) + ) + ) + ] + ) + ) + ) + ), + ClipRRect( + borderRadius: BorderRadius.only( + topLeft: radius, + topRight: radius + ), + child: Center( + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 20), + decoration: BoxDecoration( + color: Theme.of(context).scaffoldBackgroundColor + ), + child: Form( + key: _formKey, + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + const SizedBox(height: 5), + Container( + height: 20, + ), + ] + ) + ) + ), + ) + ), + Expanded( + child: Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Center( + child: Text('Aqui vai o relatório final') + ), + // child: SingleChildScrollView( + // child: Column( + // mainAxisAlignment: MainAxisAlignment.start, + // // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Container( + // width: 150, + // height: 150, + // decoration: BoxDecoration( + // border: Border.all(width: 1, color: AppColorLight.primaryColor), + // borderRadius: BorderRadius.circular(10) + // ), + // child: Icon(Feather.image, size: 50, color: AppColorLight.secondaryColor), + // ), + // const SizedBox(height: 20), + // SimpleInput( + // hintText: '', + // title: 'Nome completo', + // controller: null, + // validator: true, + // ), + // const SizedBox(height: 20), + // SimpleInput( + // title: 'Email', + // hintText: 'Informe seu email', + // typeInput: TypInputText.EMAIL, + // controller: null, + // validator: true, + // ), + // const SizedBox(height: 20), + // SimpleInput( + // title: 'Telefone', + // hintText: 'Informe seu telefone', + // typeInput: TypInputText.EMAIL, + // controller: null, + // validator: true, + // ), + // const SizedBox(height: 20), + // ButtonWidget( + // label: 'Enviar mensagem', + // isloading: false, + // onTap: (){ + // } + // ) + // ], + // ), + // ), + ), + ) + ) + ], + ), + ), + ) + ); + } +} \ No newline at end of file diff --git a/lib/src/app/home/widgets/card_info_card.dart b/lib/src/app/home/widgets/card_info_card.dart index d6a7af8..d83545c 100644 --- a/lib/src/app/home/widgets/card_info_card.dart +++ b/lib/src/app/home/widgets/card_info_card.dart @@ -4,43 +4,55 @@ import 'package:recomendagro/assets/theme/colors.dart'; class CardInfoCardWidget extends StatelessWidget { final String svg; final String title; - const CardInfoCardWidget({super.key, required this.svg, required this.title}); + final GestureTapCallback? onTap; + const CardInfoCardWidget({super.key, required this.onTap, required this.svg, required this.title}); @override Widget build(BuildContext context) { return Expanded( - child: Container( - height: 200, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(18), - boxShadow: [ - BoxShadow( - color: AppColorLight.primaryColor, - spreadRadius: 0, - blurRadius: 1, - blurStyle: BlurStyle.outer - ) - ] - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - child: Image.asset( - svg, - fit: BoxFit.fill - ) - ), - const SizedBox(height: 10), - Text(title, - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontWeight: FontWeight.bold, + child: InkWell( + onTap: onTap, + radius: 0, + child: Container( + height: 200, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(18), + boxShadow: [ + BoxShadow( color: AppColorLight.primaryColor, - fontSize: 15 + spreadRadius: 0, + blurRadius: 1, + blurStyle: BlurStyle.outer + ) + ] + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + child: Image.asset( + svg, + fit: BoxFit.fill + ) ), - ) - ], + const SizedBox(height: 10), + Text(title, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + color: AppColorLight.primaryColor, + fontSize: 15 + ), + ), + const SizedBox(height: 5), + Text('Maurício P. Batistella Pasini', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.w200, + fontSize: 11 + ), + ) + ], + ), ), ) ); diff --git a/lib/src/app/home/widgets/card_info_card_v2.dart b/lib/src/app/home/widgets/card_info_card_v2.dart new file mode 100644 index 0000000..29545e3 --- /dev/null +++ b/lib/src/app/home/widgets/card_info_card_v2.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; +import 'package:recomendagro/assets/theme/colors.dart'; + +class CardInfoCardV2Widget extends StatelessWidget { + final String svg; + final String title; + final GestureTapCallback? onTap; + const CardInfoCardV2Widget({super.key, required this.onTap, required this.svg, required this.title}); + + @override + Widget build(BuildContext context) { + Radius radius = const Radius.circular(50); + return Expanded( + child: InkWell( + onTap: onTap, + radius: 0, + child: Container( + height: 200, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(18), + boxShadow: [ + BoxShadow( + color: AppColorLight.primaryColor, + spreadRadius: 0, + blurRadius: 1, + blurStyle: BlurStyle.outer + ) + ] + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ClipRRect( + borderRadius: BorderRadius.only( + topLeft: radius, + bottomLeft: radius, + bottomRight: radius, + topRight: radius + ), + child: Image.asset( + svg, + width: 100, + fit: BoxFit.fill + ) + ), + const SizedBox(height: 10), + Text(title, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + color: AppColorLight.primaryColor, + fontSize: 15 + ), + ), + const SizedBox(height: 5), + Text('Maurício P. Batistella Pasini', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + fontSize: 11 + ), + ) + ], + ), + ), + ) + ); + } +} \ No newline at end of file diff --git a/lib/src/app/home/widgets/card_info_detail.dart b/lib/src/app/home/widgets/card_info_detail.dart new file mode 100644 index 0000000..62247dd --- /dev/null +++ b/lib/src/app/home/widgets/card_info_detail.dart @@ -0,0 +1,86 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:recomendagro/assets/theme/colors.dart'; +import 'package:recomendagro/src/app/home/screens/relatorio_screen.dart'; + +class CardInfoDetailWidget extends StatelessWidget { + final String svg; + final String title; + final String subTitle; + final GestureTapCallback? onTap; + const CardInfoDetailWidget({super.key, required this.subTitle, required this.onTap, required this.svg, required this.title}); + + @override + Widget build(BuildContext context) { + Radius radius = const Radius.circular(15); + return Expanded( + child: InkWell( + onTap: (){ + context.push(RelatorioScreen.path); + }, + radius: 0, + child: Container( + height: 200, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(18), + boxShadow: [ + BoxShadow( + color: AppColorLight.primaryColor, + spreadRadius: 0, + blurRadius: 1, + blurStyle: BlurStyle.outer + ) + ] + ), + child: Column( + // mainAxisAlignment: MainAxisAlignment.center, + children: [ + ClipRRect( + borderRadius: BorderRadius.only( + topLeft: radius, + topRight: radius + ), + child: SizedBox( + height: 140, + child: Image.asset( + svg, + fit: BoxFit.fill + ) + ), + ), + const SizedBox(height: 10), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Row( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text(title, + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + color: AppColorLight.primaryColor, + fontSize: 15 + ), + ), + Text(subTitle, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.w100, + fontSize: 12 + ), + ), + ], + ), + ], + ), + ) + ], + ), + ), + ) + ); + } +} \ No newline at end of file diff --git a/lib/src/router.dart b/lib/src/router.dart index 1c31926..ad0b2e3 100644 --- a/lib/src/router.dart +++ b/lib/src/router.dart @@ -6,7 +6,10 @@ import 'package:recomendagro/src/app/base/screens/splash.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; +import 'package:recomendagro/src/app/home/screens/categoria_screen.dart'; +import 'package:recomendagro/src/app/home/screens/formulario_screen.dart'; import 'package:recomendagro/src/app/home/screens/home_screen.dart'; +import 'package:recomendagro/src/app/home/screens/relatorio_screen.dart'; final GlobalKey _rootNavigatorKey = GlobalKey(debugLabel: 'root'); final GlobalKey _shellNavigatorKey = GlobalKey(debugLabel: 'shell'); @@ -51,75 +54,25 @@ final routerProvider = Provider((ref) { ) ] ), - // GoRoute( - // path: RecuperarContaScreen.path, - // parentNavigatorKey: _rootNavigatorKey, - // builder: (_, state) => const RecuperarContaScreen() - // ), - // GoRoute( - // path: ComponentScreen.path, - // parentNavigatorKey: _rootNavigatorKey, - // builder: (_, state) => const ComponentScreen() - // ), - // GoRoute( - // parentNavigatorKey: _rootNavigatorKey, - // path: '${HomeSignScreen.pathDoc}/:id', - // pageBuilder: (_, state) => transitionScreen( - // state.pageKey, - // child: HomeSignScreen(urlState: state) - // ) - // ), - // ShellRoute( - // navigatorKey: _shellNavigatorKey, - // builder: (context, state, child) { - // return BaseHomeDash( - // child: child - // ); - // }, - // routes: [ - // GoRoute( - // path: ListDocumentosScreen.path, - // pageBuilder: (_, state) => transitionScreen( - // state.pageKey, - // child: const ListDocumentosScreen() - // ) - // ), - // GoRoute( - // path: DocumentosSolicitadosScreen.path, - // pageBuilder: (_, state) => transitionScreen( - // state.pageKey, - // child: const DocumentosSolicitadosScreen(), - // ) - // ), - // GoRoute( - // path: DocumentosArquivadoScreen.path, - // pageBuilder: (_, state) => transitionScreen( - // state.pageKey, - // child: const DocumentosArquivadoScreen(), - // ) - // ), - // GoRoute( - // path: DocumentosLixeiraScreen.path, - // pageBuilder: (_, state) => transitionScreen( - // state.pageKey, - // child: const DocumentosLixeiraScreen(), - // ) - // ), - // GoRoute( - // path: DocumentosVencidosScreen.path, - // pageBuilder: (_, state) => transitionScreen( - // state.pageKey, - // child: const DocumentosVencidosScreen(), - // ) - // ), - // GoRoute( - // path: BaseProfileScreen.path, - // pageBuilder: (_, state) => transitionScreen( - // state.pageKey, - // child: const BaseProfileScreen(), - // ) - // ) - ] + GoRoute( + path: CategoriaScreen.path, + parentNavigatorKey: _rootNavigatorKey, + builder: (_, state) { + String title = state.extra as String; + return CategoriaScreen(title: title); + } + ), + GoRoute( + path: FormularioScreen.path, + parentNavigatorKey: _rootNavigatorKey, + builder: (_, state) => const FormularioScreen() + ), + GoRoute( + path: RelatorioScreen.path, + parentNavigatorKey: _rootNavigatorKey, + builder: (_, state) => const RelatorioScreen() + ), + ] ); }); diff --git a/lib/src/shared/widgets/back_button.dart b/lib/src/shared/widgets/back_button.dart index 2d2291c..57e95c0 100644 --- a/lib/src/shared/widgets/back_button.dart +++ b/lib/src/shared/widgets/back_button.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; import 'package:recomendagro/assets/theme/colors.dart'; class BackButtonWidget extends StatelessWidget { @@ -9,7 +8,7 @@ class BackButtonWidget extends StatelessWidget { Widget build(BuildContext context) { return GestureDetector( onTap: (){ - context.pop(); + Navigator.pop(context); }, child: Container( padding: const EdgeInsets.all(5), @@ -17,7 +16,7 @@ class BackButtonWidget extends StatelessWidget { border: Border.all(width: 1, color: AppColorLight.text04Color), borderRadius: BorderRadius.circular(10) ), - child: const Icon(Icons.chevron_left) + child: Icon(Icons.chevron_left) ), ); }