-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from UnBArqDsw2021-2/190-Tela_Detalhes
190 tela detalhes
- Loading branch information
Showing
14 changed files
with
564 additions
and
6 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
lib/controllers/plantation_details/plantation_details_controller.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(), | ||
); | ||
} | ||
} |
Oops, something went wrong.