Skip to content

Instantly share code, notes, and snippets.

@etahamad
Created May 17, 2023 20:36
Show Gist options
  • Save etahamad/3e3408ef9bbf42898dcc637cb5976452 to your computer and use it in GitHub Desktop.
Save etahamad/3e3408ef9bbf42898dcc637cb5976452 to your computer and use it in GitHub Desktop.
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_animations.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:percent_indicator/percent_indicator.dart';
import 'package:provider/provider.dart';
import 'ardureads_model.dart';
export 'ardureads_model.dart';
class ArdureadsWidget extends StatefulWidget {
const ArdureadsWidget({Key? key}) : super(key: key);
@override
_ArdureadsWidgetState createState() => _ArdureadsWidgetState();
}
class _ArdureadsWidgetState extends State<ArdureadsWidget>
with TickerProviderStateMixin {
late ArdureadsModel _model;
final scaffoldKey = GlobalKey<ScaffoldState>();
final _unfocusNode = FocusNode();
final animationsMap = {
'textOnPageLoadAnimation1': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(0.0, 20.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation1': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(100.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation2': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
ScaleEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(0.8, 0.8),
end: Offset(1.0, 1.0),
),
],
),
'textOnPageLoadAnimation2': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 180.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 180.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 180.ms,
duration: 600.ms,
begin: Offset(20.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation3': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 200.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 200.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 200.ms,
duration: 600.ms,
begin: Offset(40.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation3': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(120.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation4': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
ScaleEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(0.8, 0.8),
end: Offset(1.0, 1.0),
),
],
),
'textOnPageLoadAnimation4': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 220.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 220.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 220.ms,
duration: 600.ms,
begin: Offset(20.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation5': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 240.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 240.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 240.ms,
duration: 600.ms,
begin: Offset(40.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation5': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(120.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation6': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
ScaleEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(0.8, 0.8),
end: Offset(1.0, 1.0),
),
],
),
'textOnPageLoadAnimation6': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 220.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 220.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 220.ms,
duration: 600.ms,
begin: Offset(20.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation7': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 240.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 240.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 240.ms,
duration: 600.ms,
begin: Offset(40.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation8': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 600.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 600.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 600.ms,
duration: 600.ms,
begin: Offset(0.0, 30.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation7': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1600.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 1600.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 1600.ms,
duration: 600.ms,
begin: Offset(0.0, 70.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation9': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 200.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 200.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 200.ms,
duration: 600.ms,
begin: Offset(40.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation10': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 180.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 180.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 180.ms,
duration: 600.ms,
begin: Offset(20.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation8': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
ScaleEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(0.8, 0.8),
end: Offset(1.0, 1.0),
),
],
),
'containerOnPageLoadAnimation9': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1600.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 1600.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 1600.ms,
duration: 600.ms,
begin: Offset(0.0, 90.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation11': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 200.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 200.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 200.ms,
duration: 600.ms,
begin: Offset(40.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation12': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 180.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 180.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 180.ms,
duration: 600.ms,
begin: Offset(20.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation10': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
ScaleEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(0.8, 0.8),
end: Offset(1.0, 1.0),
),
],
),
'containerOnPageLoadAnimation11': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1600.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 1600.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 1600.ms,
duration: 600.ms,
begin: Offset(0.0, 90.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation13': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 200.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 200.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 200.ms,
duration: 600.ms,
begin: Offset(40.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'textOnPageLoadAnimation14': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 180.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 180.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 180.ms,
duration: 600.ms,
begin: Offset(20.0, 0.0),
end: Offset(0.0, 0.0),
),
],
),
'containerOnPageLoadAnimation12': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
ScaleEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(0.8, 0.8),
end: Offset(1.0, 1.0),
),
],
),
'textOnPageLoadAnimation15': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effects: [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 0.ms,
duration: 600.ms,
begin: Offset(0.0, 10.0),
end: Offset(0.0, 0.0),
),
],
),
};
@override
void initState() {
super.initState();
_model = createModel(context, () => ArdureadsModel());
setupAnimations(
animationsMap.values.where((anim) =>
anim.trigger == AnimationTrigger.onActionTrigger ||
!anim.applyInitialState),
this,
);
}
@override
void dispose() {
_model.dispose();
_unfocusNode.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => FocusScope.of(context).requestFocus(_unfocusNode),
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).white,
appBar: AppBar(
backgroundColor: FlutterFlowTheme.of(context).tertiary400,
automaticallyImplyLeading: false,
title: Text(
'Hardware Readings',
style: FlutterFlowTheme.of(context).displaySmall.override(
fontFamily: 'Outfit',
color: Colors.white,
fontSize: 36.0,
fontWeight: FontWeight.w600,
useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context).displaySmallFamily),
),
).animateOnPageLoad(animationsMap['textOnPageLoadAnimation15']!),
actions: [],
centerTitle: false,
elevation: 0.0,
),
body: SafeArea(
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 160.0,
child: Stack(
children: [
Container(
width: double.infinity,
height: 100.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).tertiary400,
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
16.0, 0.0, 0.0, 0.0),
child: Text(
'here you get the readings of the sensors',
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context)
.titleSmall
.override(
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).white,
fontSize: 16.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context)
.titleSmallFamily),
),
).animateOnPageLoad(
animationsMap['textOnPageLoadAnimation1']!),
),
),
Align(
alignment: AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0.0, 30.0, 0.0, 0.0),
child: ListView(
padding: EdgeInsets.zero,
primary: false,
shrinkWrap: true,
scrollDirection: Axis.horizontal,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
16.0, 0.0, 0.0, 12.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
_model.apiResult9ab =
await ListPlantInfoCall.call();
setState(() {});
},
child: Container(
height: 120.0,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: Color(0x1F000000),
offset: Offset(0.0, 2.0),
)
],
borderRadius: BorderRadius.circular(8.0),
border: Border.all(
color: Color(0xFFF1F4F8),
width: 1.0,
),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
12.0, 0.0, 12.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 60.0,
height: 60.0,
decoration: BoxDecoration(
color: Color(0xFFF1F4F8),
shape: BoxShape.circle,
),
alignment:
AlignmentDirectional(0.0, 0.0),
child: Card(
clipBehavior:
Clip.antiAliasWithSaveLayer,
color:
FlutterFlowTheme.of(context)
.tertiary400,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(40.0),
),
child: Padding(
padding: EdgeInsetsDirectional
.fromSTEB(
12.0, 12.0, 12.0, 12.0),
child: Icon(
Icons.water_damage,
color: Colors.white,
size: 24.0,
),
),
),
).animateOnPageLoad(animationsMap[
'containerOnPageLoadAnimation2']!),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(
12.0, 12.0, 12.0, 12.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Humidity',
style: FlutterFlowTheme.of(
context)
.labelMedium
.override(
fontFamily:
'Plus Jakarta Sans',
color: Colors.black,
fontSize: 25.0,
fontWeight:
FontWeight.normal,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.labelMediumFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation2']!),
Padding(
padding: EdgeInsetsDirectional
.fromSTEB(
0.0, 8.0, 0.0, 0.0),
child: Text(
valueOrDefault<String>(
(_model != null && _model.apiResult9ab?.jsonBody != null)
? (ListPlantInfoCall.listplantinfoHumidity(
_model.apiResult9ab?.jsonBody ?? '',
) as List)
.map<String>((s) => s.toString())
.toList()
.last
.toString()
: '0',
'0',
),
style: FlutterFlowTheme.of(
context)
.displaySmall
.override(
fontFamily: 'Outfit',
color:
Color(0xFF14181B),
fontSize: 25.0,
fontWeight:
FontWeight.w600,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.displaySmallFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation3']!),
),
],
),
),
],
),
),
),
).animateOnPageLoad(animationsMap[
'containerOnPageLoadAnimation1']!),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
16.0, 0.0, 16.0, 12.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
_model.apiResultsba =
await ListPlantInfoCall.call();
setState(() {});
},
child: Container(
height: 120.0,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: Color(0x1F000000),
offset: Offset(0.0, 2.0),
)
],
borderRadius: BorderRadius.circular(8.0),
border: Border.all(
color: Color(0xFFF1F4F8),
width: 1.0,
),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
12.0, 0.0, 12.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 60.0,
height: 60.0,
decoration: BoxDecoration(
color: Color(0xFFF1F4F8),
shape: BoxShape.circle,
),
alignment:
AlignmentDirectional(0.0, 0.0),
child: Card(
clipBehavior:
Clip.antiAliasWithSaveLayer,
color:
FlutterFlowTheme.of(context)
.tertiary400,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(40.0),
),
child: Padding(
padding: EdgeInsetsDirectional
.fromSTEB(
12.0, 12.0, 12.0, 12.0),
child: Icon(
Icons.local_pizza,
color: Colors.white,
size: 24.0,
),
),
),
).animateOnPageLoad(animationsMap[
'containerOnPageLoadAnimation4']!),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(
12.0, 12.0, 12.0, 12.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Moisture ',
style: FlutterFlowTheme.of(
context)
.labelMedium
.override(
fontFamily:
'Plus Jakarta Sans',
color: Colors.black,
fontSize: 25.0,
fontWeight:
FontWeight.normal,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.labelMediumFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation4']!),
Padding(
padding: EdgeInsetsDirectional
.fromSTEB(
0.0, 8.0, 0.0, 0.0),
child: Text(
valueOrDefault<String>(
(_model != null && _model.apiResultsba?.jsonBody != null)
? (ListPlantInfoCall.listplantinfoMoisture(
_model.apiResultsba?.jsonBody ?? '',
) as List)
.map<String>((s) => s.toString())
.toList()
.last
.toString()
: '0',
'0',
),
style: FlutterFlowTheme.of(
context)
.displaySmall
.override(
fontFamily: 'Outfit',
color:
Color(0xFF14181B),
fontSize: 25.0,
fontWeight:
FontWeight.w600,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.displaySmallFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation5']!),
),
],
),
),
],
),
),
),
).animateOnPageLoad(animationsMap[
'containerOnPageLoadAnimation3']!),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
16.0, 0.0, 16.0, 12.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
_model.apiResultpws =
await ListPlantInfoCall.call();
setState(() {});
},
child: Container(
height: 120.0,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: Color(0x1F000000),
offset: Offset(0.0, 2.0),
)
],
borderRadius: BorderRadius.circular(8.0),
border: Border.all(
color: Color(0xFFF1F4F8),
width: 1.0,
),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
12.0, 0.0, 12.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 60.0,
height: 60.0,
decoration: BoxDecoration(
color: Color(0xFFF1F4F8),
shape: BoxShape.circle,
),
alignment:
AlignmentDirectional(0.0, 0.0),
child: Card(
clipBehavior:
Clip.antiAliasWithSaveLayer,
color:
FlutterFlowTheme.of(context)
.tertiary400,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(40.0),
),
child: Padding(
padding: EdgeInsetsDirectional
.fromSTEB(
12.0, 12.0, 12.0, 12.0),
child: Icon(
Icons.thermostat_rounded,
color: Colors.white,
size: 24.0,
),
),
),
).animateOnPageLoad(animationsMap[
'containerOnPageLoadAnimation6']!),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(
12.0, 12.0, 12.0, 12.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'temp',
style: FlutterFlowTheme.of(
context)
.labelMedium
.override(
fontFamily:
'Plus Jakarta Sans',
color: Colors.black,
fontSize: 25.0,
fontWeight:
FontWeight.normal,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.labelMediumFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation6']!),
Padding(
padding: EdgeInsetsDirectional
.fromSTEB(
0.0, 8.0, 0.0, 0.0),
child: Text(
valueOrDefault<String>(
(_model != null && _model.apiResultpws?.jsonBody != null)
? (ListPlantInfoCall.listplantinfoTemp(
_model.apiResultpws?.jsonBody ?? '',
) as List)
.map<String>((s) => s.toString())
.toList()
.last
.toString()
: '0',
'0',
),
style: FlutterFlowTheme.of(
context)
.displaySmall
.override(
fontFamily: 'Outfit',
color:
Color(0xFF14181B),
fontSize: 25.0,
fontWeight:
FontWeight.w600,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.displaySmallFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation7']!),
),
],
),
),
],
),
),
),
).animateOnPageLoad(animationsMap[
'containerOnPageLoadAnimation5']!),
),
],
),
),
),
],
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(16.0, 8.0, 0.0, 0.0),
child: Text(
'Reads',
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context).titleLarge.override(
fontFamily: 'Outfit',
color: Colors.black,
fontSize: 22.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context).titleLargeFamily),
),
).animateOnPageLoad(
animationsMap['textOnPageLoadAnimation8']!),
),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: Color(0x1F000000),
offset: Offset(0.0, 2.0),
)
],
borderRadius: BorderRadius.circular(8.0),
border: Border.all(
color: FlutterFlowTheme.of(context).tertiary400,
width: 1.0,
),
),
child: Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 12.0),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
12.0, 8.0, 16.0, 4.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
4.0, 12.0, 12.0, 12.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Moisture',
style: FlutterFlowTheme.of(context)
.titleLarge
.override(
fontFamily: 'Outfit',
color: Colors.black,
fontSize: 22.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.titleLargeFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation9']!),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0.0, 4.0, 0.0, 0.0),
child: Text(
valueOrDefault<String>(
(_model != null && _model.apiResultsba?.jsonBody != null)
? (ListPlantInfoCall.listplantinfoMoisture(
_model.apiResultsba?.jsonBody ?? '',
) as List)
.map<String>((s) => s.toString())
.toList()
.last
.toString()
: '0',
'0',
),
style: FlutterFlowTheme.of(context)
.labelMedium
.override(
fontFamily: 'Plus Jakarta Sans',
color: Color(0xFF57636C),
fontSize: 30.0,
fontWeight: FontWeight.normal,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.labelMediumFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation10']!),
),
],
),
),
Container(
width: 60.0,
height: 60.0,
decoration: BoxDecoration(
color: Color(0xFFF1F4F8),
shape: BoxShape.circle,
),
alignment: AlignmentDirectional(0.0, 0.0),
child: Card(
clipBehavior: Clip.antiAliasWithSaveLayer,
color: FlutterFlowTheme.of(context)
.tertiary400,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.0),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
12.0, 12.0, 12.0, 12.0),
child: Icon(
Icons.local_pizza,
color:
FlutterFlowTheme.of(context).white,
size: 24.0,
),
),
),
).animateOnPageLoad(animationsMap[
'containerOnPageLoadAnimation8']!),
],
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
16.0, 0.0, 16.0, 0.0),
child: LinearPercentIndicator(
percent: 0.9,
width: MediaQuery.of(context).size.width * 0.82,
lineHeight: 16.0,
animation: true,
progressColor:
FlutterFlowTheme.of(context).tertiary400,
backgroundColor: Color(0xFFF1F4F8),
barRadius: Radius.circular(24.0),
padding: EdgeInsets.zero,
),
),
],
),
),
).animateOnPageLoad(
animationsMap['containerOnPageLoadAnimation7']!),
),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 16.0),
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: Color(0x1F000000),
offset: Offset(0.0, 2.0),
)
],
borderRadius: BorderRadius.circular(8.0),
border: Border.all(
color: FlutterFlowTheme.of(context).tertiary400,
width: 1.0,
),
),
child: Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 12.0),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
12.0, 8.0, 16.0, 4.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
4.0, 12.0, 12.0, 12.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Humidity',
style: FlutterFlowTheme.of(context)
.titleLarge
.override(
fontFamily: 'Outfit',
color: Colors.black,
fontSize: 22.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.titleLargeFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation11']!),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0.0, 4.0, 0.0, 0.0),
child: Text(
valueOrDefault<String>(
(_model != null && _model.apiResult9ab?.jsonBody != null)
? (ListPlantInfoCall.listplantinfoHumidity(
_model.apiResult9ab?.jsonBody ?? '',
) as List)
.map<String>((s) => s.toString())
.toList()
.last
.toString()
: '0',
'0',
),
style: FlutterFlowTheme.of(context)
.labelMedium
.override(
fontFamily: 'Plus Jakarta Sans',
color: Color(0xFF57636C),
fontSize: 30.0,
fontWeight: FontWeight.normal,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.labelMediumFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation12']!),
),
],
),
),
Container(
width: 60.0,
height: 60.0,
decoration: BoxDecoration(
color: Color(0xFFF1F4F8),
shape: BoxShape.circle,
),
alignment: AlignmentDirectional(0.0, 0.0),
child: Card(
clipBehavior: Clip.antiAliasWithSaveLayer,
color: FlutterFlowTheme.of(context)
.tertiary400,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.0),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
12.0, 12.0, 12.0, 12.0),
child: Icon(
Icons.water_damage,
color:
FlutterFlowTheme.of(context).white,
size: 24.0,
),
),
),
).animateOnPageLoad(animationsMap[
'containerOnPageLoadAnimation10']!),
],
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
16.0, 0.0, 16.0, 0.0),
child: LinearPercentIndicator(
percent: 0.2,
width: MediaQuery.of(context).size.width * 0.82,
lineHeight: 16.0,
animation: true,
progressColor:
FlutterFlowTheme.of(context).tertiary400,
backgroundColor: Color(0xFFF1F4F8),
barRadius: Radius.circular(24.0),
padding: EdgeInsets.zero,
),
),
],
),
),
).animateOnPageLoad(
animationsMap['containerOnPageLoadAnimation9']!),
),
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 16.0),
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: Color(0x1F000000),
offset: Offset(0.0, 2.0),
)
],
borderRadius: BorderRadius.circular(8.0),
border: Border.all(
color: FlutterFlowTheme.of(context).tertiary400,
width: 1.0,
),
),
child: Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 12.0),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
12.0, 8.0, 16.0, 4.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
4.0, 12.0, 12.0, 12.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Temperature',
style: FlutterFlowTheme.of(context)
.titleLarge
.override(
fontFamily: 'Outfit',
color: Colors.black,
fontSize: 22.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.titleLargeFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation13']!),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0.0, 4.0, 0.0, 0.0),
child: Text(
valueOrDefault<String>(
(_model != null && _model.apiResultpws?.jsonBody != null)
? (ListPlantInfoCall.listplantinfoTemp(
_model.apiResultpws?.jsonBody ?? '',
) as List)
.map<String>((s) => s.toString())
.toList()
.last
.toString()
: '0',
'0',
),
style: FlutterFlowTheme.of(context)
.labelMedium
.override(
fontFamily: 'Plus Jakarta Sans',
color: Color(0xFF57636C),
fontSize: 30.0,
fontWeight: FontWeight.normal,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.labelMediumFamily),
),
).animateOnPageLoad(animationsMap[
'textOnPageLoadAnimation14']!),
),
],
),
),
Container(
width: 60.0,
height: 60.0,
decoration: BoxDecoration(
color: Color(0xFFF1F4F8),
shape: BoxShape.circle,
),
alignment: AlignmentDirectional(0.0, 0.0),
child: Card(
clipBehavior: Clip.antiAliasWithSaveLayer,
color: FlutterFlowTheme.of(context)
.tertiary400,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.0),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
12.0, 12.0, 12.0, 12.0),
child: Icon(
Icons.device_thermostat,
color:
FlutterFlowTheme.of(context).white,
size: 24.0,
),
),
),
).animateOnPageLoad(animationsMap[
'containerOnPageLoadAnimation12']!),
],
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
16.0, 0.0, 16.0, 0.0),
child: LinearPercentIndicator(
percent: 0.6,
width: MediaQuery.of(context).size.width * 0.82,
lineHeight: 16.0,
animation: true,
progressColor:
FlutterFlowTheme.of(context).tertiary400,
backgroundColor: Color(0xFFF1F4F8),
barRadius: Radius.circular(24.0),
padding: EdgeInsets.zero,
),
),
],
),
),
).animateOnPageLoad(
animationsMap['containerOnPageLoadAnimation11']!),
),
],
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment