From d60b526c9b1210998d0fd8af04b7ff6605a285da Mon Sep 17 00:00:00 2001 From: "Sravan Vijayan (sravanvijs)" Date: Fri, 16 Dec 2022 18:05:15 +0000 Subject: [PATCH] Create APP CODE --- APP CODE | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 APP CODE diff --git a/APP CODE b/APP CODE new file mode 100644 index 0000000..ce2c990 --- /dev/null +++ b/APP CODE @@ -0,0 +1,143 @@ +import '../flutter_flow/flutter_flow_charts.dart'; +import '../flutter_flow/flutter_flow_theme.dart'; +import '../flutter_flow/flutter_flow_util.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:percent_indicator/percent_indicator.dart'; + +class HomePageWidget extends StatefulWidget { + const HomePageWidget({Key? key}) : super(key: key); + + @override + _HomePageWidgetState createState() => _HomePageWidgetState(); +} + +class _HomePageWidgetState extends State { + final scaffoldKey = GlobalKey(); + + @override + Widget build(BuildContext context) { + return Scaffold( + key: scaffoldKey, + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + appBar: AppBar( + backgroundColor: FlutterFlowTheme.of(context).primaryColor, + automaticallyImplyLeading: false, + title: Text( + 'Quit Today', + style: FlutterFlowTheme.of(context).subtitle1.override( + fontFamily: 'Poppins', + color: Colors.white, + ), + ), + actions: [], + centerTitle: false, + elevation: 2, + ), + body: SafeArea( + child: GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: double.infinity, + height: 285, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).secondaryBackground, + ), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( + padding: EdgeInsetsDirectional.fromSTEB(0, 20, 0, 0), + child: Text( + 'Nicotine consumption ', + style: FlutterFlowTheme.of(context).bodyText1.override( + fontFamily: 'Poppins', + color: Color(0x66000000), + fontSize: 16, + ), + ), + ), + Align( + alignment: AlignmentDirectional(0, 0), + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB(0, 20, 0, 0), + child: CircularPercentIndicator( + percent: 0.8, + radius: 100, + lineWidth: 8, + animation: true, + progressColor: + FlutterFlowTheme.of(context).primaryColor, + backgroundColor: Color(0xFFF1F4F8), + center: Text( + '50%', + style: FlutterFlowTheme.of(context) + .bodyText1 + .override( + fontFamily: 'Poppins', + color: + FlutterFlowTheme.of(context).primaryColor, + ), + ), + startAngle: 0, + ), + ), + ), + ], + ), + ), + Container( + width: double.infinity, + height: 300, + decoration: BoxDecoration(), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Text( + 'Over all report', + textAlign: TextAlign.center, + style: FlutterFlowTheme.of(context).bodyText1.override( + fontFamily: 'Poppins', + color: Color(0x60000000), + fontSize: 16, + ), + ), + Align( + alignment: AlignmentDirectional(0, 0), + child: Container( + width: double.infinity, + height: 300, + child: FlutterFlowBarChart( + barData: [ + FFBarChartData( + yData: [], + color: Color(0xFFFF5B36), + ) + ], + xLabels: [], + barWidth: 25, + barBorderRadius: BorderRadius.circular(0), + groupSpace: 5, + chartStylingInfo: ChartStylingInfo( + backgroundColor: Colors.white, + showBorder: false, + ), + axisBounds: AxisBounds(), + xAxisLabelInfo: AxisLabelInfo(), + yAxisLabelInfo: AxisLabelInfo(), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + } +}