Skip to content

Commit

Permalink
Merge pull request #26 from UnBArqDsw2021-2/190-Tela_Detalhes
Browse files Browse the repository at this point in the history
190 tela detalhes
  • Loading branch information
CarlosFiuza authored Apr 19, 2022
2 parents ef2a3b5 + 2b10faf commit 863354a
Show file tree
Hide file tree
Showing 14 changed files with 564 additions and 6 deletions.
Binary file added assets/Agrotoxico.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/morango.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/produtor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/components/loading.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Loading extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.only(bottom: 20),
padding: EdgeInsets.only(bottom: 15),
child: Center(
child: CircularProgressIndicator(
color: MyColors().blue,
Expand Down
4 changes: 2 additions & 2 deletions lib/components/plantation_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class _PlantationCardState extends State<PlantationCard> {
),
Container(
padding: EdgeInsets.only(left: 26),
width: size.width * 0.3,
width: size.width * 0.27,
child: !widget.plantation.isEmpty
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down Expand Up @@ -117,7 +117,7 @@ class _PlantationCardState extends State<PlantationCard> {
Container(
alignment: Alignment.center,
padding: EdgeInsets.only(left: 5, right: 5),
height: size.height * 0.04,
height: size.height * 0.06,
width: size.width * 0.45,
child: ListView.builder(
scrollDirection: Axis.horizontal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PendencyController {
pesticideAplications = [];

for (dynamic aplication in data) {
if (aplication['estadoAnalise'] == "P") {
if (aplication['estadoAnalise'] == "A") {
dynamic map = {
'id': aplication['idAplicacao'],
'aplicationDate': Utils().formatData(aplication['dataAplicacao']),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:caderneta_campo_digital/services/plantation_details/plantations_details_service.dart';
import 'package:dio/dio.dart';
import 'package:intl/intl.dart';

class PlantationDetailsController {
PlantationDetailsService details = PlantationDetailsService();
// ignore: non_constant_identifier_names
dynamic details_info;
Future getDetails(String id) async {
Response? response = await details.getData(id);
details_info = response?.data;
}

String convertDataFromServer(String date) {
var dateTime = DateTime.parse(date);
final DateFormat formatter = DateFormat("dd/MM/yyyy");

return formatter.format(dateTime);
}
}
2 changes: 1 addition & 1 deletion lib/pages/estate/components/plots_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PlotsList extends StatelessWidget {
),
plots.isNotEmpty
? SizedBox(
height: plots.length * size.height * 0.224,
height: plots.length * size.height * 0.228,
child: ListView.builder(
physics: NeverScrollableScrollPhysics(),
padding: const EdgeInsets.all(8),
Expand Down
85 changes: 85 additions & 0 deletions lib/pages/plantation_details/components/carrousel.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import 'package:flutter/material.dart';

class Carroussel extends StatelessWidget {
final List<dynamic> pestcides;
final _scrollController = ScrollController();

Carroussel({required this.pestcides, required Key key}) : super(key: key);

@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;

return ListView(
scrollDirection: Axis.horizontal,
controller: _scrollController,
children: pestcides
.map(
(element) => Container(
padding: EdgeInsets.symmetric(horizontal: size.width * 0.05),
child: Row(
children: [
SizedBox(
child: ClipRRect(
borderRadius: BorderRadius.circular(25),
child: Image(
image: AssetImage("assets/Agrotoxico.jpg"),
fit: BoxFit.fill,
),
),
height: size.height * 0.11,
width: size.width * 0.18,
),
Padding(
padding:
EdgeInsets.symmetric(horizontal: size.width * 0.03),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Text("Nome: Aldrin"),
Text("Data Aplicação: 22/02/2022"),
Text("Período de Carência: 15 dias"),
Text("Data pós Carência: 09/03/2022"),
],
),
),
],
),
width: size.width * 0.87,
height: size.height * 0.15,
margin: EdgeInsets.only(
bottom: size.height * 0.03,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(20),
),
border: Border.all(
color: Color(0xFF000000).withOpacity(0.5),
width: 1.0,
style: BorderStyle.solid,
),
boxShadow: const [
BoxShadow(
color: Color.fromARGB(134, 0, 0, 0),
offset: Offset(
0.0,
3.0,
),
blurRadius: 2.0,
), //BoxShadow
BoxShadow(
color: Colors.white,
offset: Offset(0.0, 0.0),
blurRadius: 0.0,
spreadRadius: 0.0,
),
],
),
),
)
.toList(),
);
}
}
Loading

0 comments on commit 863354a

Please sign in to comment.