Changes to be committed:
new file: lib/assets/images/02.jpeg new file: lib/assets/images/03.jpeg new file: lib/assets/images/04.jpeg new file: lib/assets/images/05.jpeg new file: lib/assets/images/image_05.jpeg new file: lib/assets/images/masculino.png new file: lib/src/app/home/screens/categoria_screen.dart new file: lib/src/app/home/screens/formulario_screen.dart modified: lib/src/app/home/screens/home_screen.dart new file: lib/src/app/home/screens/relatorio_screen.dart modified: lib/src/app/home/widgets/card_info_card.dart new file: lib/src/app/home/widgets/card_info_card_v2.dart new file: lib/src/app/home/widgets/card_info_detail.dart modified: lib/src/router.dart modified: lib/src/shared/widgets/back_button.dart
This commit is contained in:
parent
ddfb60b970
commit
859b0cb50c
BIN
lib/assets/images/02.jpeg
Normal file
BIN
lib/assets/images/02.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
BIN
lib/assets/images/03.jpeg
Normal file
BIN
lib/assets/images/03.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
BIN
lib/assets/images/04.jpeg
Normal file
BIN
lib/assets/images/04.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 101 KiB |
BIN
lib/assets/images/05.jpeg
Normal file
BIN
lib/assets/images/05.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
BIN
lib/assets/images/image_05.jpeg
Normal file
BIN
lib/assets/images/image_05.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 KiB |
BIN
lib/assets/images/masculino.png
Normal file
BIN
lib/assets/images/masculino.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
358
lib/src/app/home/screens/categoria_screen.dart
Normal file
358
lib/src/app/home/screens/categoria_screen.dart
Normal file
@ -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<CategoriaScreen> createState() => _CategoriaScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CategoriaScreenState extends State<CategoriaScreen> with TickerProviderStateMixin {
|
||||||
|
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
172
lib/src/app/home/screens/formulario_screen.dart
Normal file
172
lib/src/app/home/screens/formulario_screen.dart
Normal file
@ -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<FormularioScreen> createState() => _FormularioScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FormularioScreenState extends State<FormularioScreen> with TickerProviderStateMixin {
|
||||||
|
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
|
||||||
|
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: (){
|
||||||
|
}
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_font_icons/flutter_font_icons.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/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.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/utils/responsive/responsive_metrics.dart';
|
||||||
import 'package:recomendagro/src/shared/widgets/inputs/search_controller.dart';
|
import 'package:recomendagro/src/shared/widgets/inputs/search_controller.dart';
|
||||||
|
|
||||||
@ -111,19 +114,19 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// const SizedBox(height: 15),
|
const SizedBox(height: 15),
|
||||||
// SizedBox(
|
SizedBox(
|
||||||
// width: double.infinity,
|
width: double.infinity,
|
||||||
// child: Text(
|
child: Text(
|
||||||
// "Selecione as informacoes",
|
"Escolha o segmento desejado",
|
||||||
// textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
// style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||||
// fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
// color: AppColorLight.text01Color,
|
color: AppColorLight.text02Color,
|
||||||
// fontSize: 20
|
fontSize: 20
|
||||||
// )
|
)
|
||||||
// )
|
)
|
||||||
// ),
|
),
|
||||||
// SizedBox(
|
// SizedBox(
|
||||||
// width: double.infinity,
|
// width: double.infinity,
|
||||||
// child: Text(
|
// child: Text(
|
||||||
@ -136,58 +139,77 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
// )
|
// )
|
||||||
// )
|
// )
|
||||||
// ),
|
// ),
|
||||||
|
// 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),
|
const SizedBox(height: 20),
|
||||||
SearchInput(
|
Row(
|
||||||
hintText: 'Pesquisar',
|
children: [
|
||||||
showIcon: true,
|
CardInfoCardV2Widget(
|
||||||
prefixIcon: Feather.search,
|
svg: 'lib/assets/images/image_05.jpeg',
|
||||||
textInputType: TextInputType.text,
|
title: 'Inseticida',
|
||||||
textInputAction: TextInputAction.search,
|
onTap: (){
|
||||||
onFieldSubmitted: (value) async {
|
context.push(CategoriaScreen.path, extra: 'Algodão');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(width: 20),
|
||||||
|
CardInfoCardWidget(
|
||||||
|
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/algodao.png',
|
|
||||||
title: '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',
|
|
||||||
)
|
)
|
||||||
],
|
]
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
CardInfoCardWidget(
|
CardInfoCardWidget(
|
||||||
svg: 'lib/assets/images/soja.png',
|
svg: 'lib/assets/images/masculino.png',
|
||||||
title: 'Soja',
|
title: 'Fungicida',
|
||||||
|
onTap: (){
|
||||||
|
context.push(CategoriaScreen.path, extra: 'Cana');
|
||||||
|
},
|
||||||
),
|
),
|
||||||
SizedBox(width: 20),
|
SizedBox(width: 20),
|
||||||
CardInfoCardWidget(
|
CardInfoCardWidget(
|
||||||
svg: 'lib/assets/images/trigo.png',
|
svg: 'lib/assets/images/masculino.png',
|
||||||
title: 'Trigo',
|
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),
|
const SizedBox(height: 20),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
174
lib/src/app/home/screens/relatorio_screen.dart
Normal file
174
lib/src/app/home/screens/relatorio_screen.dart
Normal file
@ -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<RelatorioScreen> createState() => _RelatorioScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _RelatorioScreenState extends State<RelatorioScreen> with TickerProviderStateMixin {
|
||||||
|
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
|
||||||
|
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: (){
|
||||||
|
// }
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -4,11 +4,15 @@ import 'package:recomendagro/assets/theme/colors.dart';
|
|||||||
class CardInfoCardWidget extends StatelessWidget {
|
class CardInfoCardWidget extends StatelessWidget {
|
||||||
final String svg;
|
final String svg;
|
||||||
final String title;
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: onTap,
|
||||||
|
radius: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 200,
|
height: 200,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@ -39,9 +43,17 @@ class CardInfoCardWidget extends StatelessWidget {
|
|||||||
color: AppColorLight.primaryColor,
|
color: AppColorLight.primaryColor,
|
||||||
fontSize: 15
|
fontSize: 15
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
Text('Maurício P. Batistella Pasini',
|
||||||
|
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||||
|
fontWeight: FontWeight.w200,
|
||||||
|
fontSize: 11
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
68
lib/src/app/home/widgets/card_info_card_v2.dart
Normal file
68
lib/src/app/home/widgets/card_info_card_v2.dart
Normal file
@ -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
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
86
lib/src/app/home/widgets/card_info_detail.dart
Normal file
86
lib/src/app/home/widgets/card_info_detail.dart
Normal file
@ -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
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,10 @@ import 'package:recomendagro/src/app/base/screens/splash.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:go_router/go_router.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/home_screen.dart';
|
||||||
|
import 'package:recomendagro/src/app/home/screens/relatorio_screen.dart';
|
||||||
|
|
||||||
final GlobalKey<NavigatorState> _rootNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'root');
|
final GlobalKey<NavigatorState> _rootNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'root');
|
||||||
final GlobalKey<NavigatorState> _shellNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'shell');
|
final GlobalKey<NavigatorState> _shellNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'shell');
|
||||||
@ -51,74 +54,24 @@ final routerProvider = Provider<GoRouter>((ref) {
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
// GoRoute(
|
GoRoute(
|
||||||
// path: RecuperarContaScreen.path,
|
path: CategoriaScreen.path,
|
||||||
// parentNavigatorKey: _rootNavigatorKey,
|
parentNavigatorKey: _rootNavigatorKey,
|
||||||
// builder: (_, state) => const RecuperarContaScreen()
|
builder: (_, state) {
|
||||||
// ),
|
String title = state.extra as String;
|
||||||
// GoRoute(
|
return CategoriaScreen(title: title);
|
||||||
// path: ComponentScreen.path,
|
}
|
||||||
// parentNavigatorKey: _rootNavigatorKey,
|
),
|
||||||
// builder: (_, state) => const ComponentScreen()
|
GoRoute(
|
||||||
// ),
|
path: FormularioScreen.path,
|
||||||
// GoRoute(
|
parentNavigatorKey: _rootNavigatorKey,
|
||||||
// parentNavigatorKey: _rootNavigatorKey,
|
builder: (_, state) => const FormularioScreen()
|
||||||
// path: '${HomeSignScreen.pathDoc}/:id',
|
),
|
||||||
// pageBuilder: (_, state) => transitionScreen(
|
GoRoute(
|
||||||
// state.pageKey,
|
path: RelatorioScreen.path,
|
||||||
// child: HomeSignScreen(urlState: state)
|
parentNavigatorKey: _rootNavigatorKey,
|
||||||
// )
|
builder: (_, state) => const RelatorioScreen()
|
||||||
// ),
|
),
|
||||||
// ShellRoute(
|
|
||||||
// navigatorKey: _shellNavigatorKey,
|
|
||||||
// builder: (context, state, child) {
|
|
||||||
// return BaseHomeDash(
|
|
||||||
// child: child
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// routes: <RouteBase>[
|
|
||||||
// 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(),
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:recomendagro/assets/theme/colors.dart';
|
import 'package:recomendagro/assets/theme/colors.dart';
|
||||||
|
|
||||||
class BackButtonWidget extends StatelessWidget {
|
class BackButtonWidget extends StatelessWidget {
|
||||||
@ -9,7 +8,7 @@ class BackButtonWidget extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
context.pop();
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(5),
|
padding: const EdgeInsets.all(5),
|
||||||
@ -17,7 +16,7 @@ class BackButtonWidget extends StatelessWidget {
|
|||||||
border: Border.all(width: 1, color: AppColorLight.text04Color),
|
border: Border.all(width: 1, color: AppColorLight.text04Color),
|
||||||
borderRadius: BorderRadius.circular(10)
|
borderRadius: BorderRadius.circular(10)
|
||||||
),
|
),
|
||||||
child: const Icon(Icons.chevron_left)
|
child: Icon(Icons.chevron_left)
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user