Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import '../flutter_flow/flutter_flow_icon_button.dart';
- import '../flutter_flow/flutter_flow_theme.dart';
- import '../flutter_flow/flutter_flow_util.dart';
- import 'package:easy_debounce/easy_debounce.dart';
- import 'package:flutter/material.dart';
- import 'package:google_fonts/google_fonts.dart';
- import 'package:provider/provider.dart';
- import 'home_page_model.dart';
- export 'home_page_model.dart';
- class HomePageWidget extends StatefulWidget {
- const HomePageWidget({Key? key}) : super(key: key);
- @override
- _HomePageWidgetState createState() => _HomePageWidgetState();
- }
- class _HomePageWidgetState extends State<HomePageWidget> {
- late HomePageModel _model;
- final scaffoldKey = GlobalKey<ScaffoldState>();
- final _unfocusNode = FocusNode();
- @override
- void initState() {
- super.initState();
- _model = createModel(context, () => HomePageModel());
- _model.textController ??= TextEditingController();
- }
- @override
- void dispose() {
- _model.dispose();
- _unfocusNode.dispose();
- super.dispose();
- }
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- key: scaffoldKey,
- backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
- drawer: Drawer(
- elevation: 16,
- child: Container(
- width: 100,
- height: 100,
- decoration: BoxDecoration(
- gradient: LinearGradient(
- colors: [Color(0xFFFFA726), Color(0xFFE65100)],
- stops: [0, 1],
- begin: AlignmentDirectional(-1, -1),
- end: AlignmentDirectional(1, 1),
- ),
- ),
- child: ListView(
- padding: EdgeInsets.zero,
- scrollDirection: Axis.vertical,
- children: [
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(15, 0, 15, 0),
- child: Wrap(
- spacing: 0,
- runSpacing: 0,
- alignment: WrapAlignment.start,
- crossAxisAlignment: WrapCrossAlignment.start,
- direction: Axis.horizontal,
- runAlignment: WrapAlignment.start,
- verticalDirection: VerticalDirection.down,
- clipBehavior: Clip.none,
- children: [
- Container(
- width: 100,
- height: 70,
- decoration: BoxDecoration(
- color: Color(0x00FFFFFF),
- ),
- ),
- Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- ClipRRect(
- borderRadius: BorderRadius.circular(10),
- child: Image.network(
- 'https://picsum.photos/seed/176/600',
- width: 65,
- height: 65,
- fit: BoxFit.cover,
- ),
- ),
- Text(
- 'EPMC App',
- style:
- FlutterFlowTheme.of(context).bodyText1.override(
- fontFamily: 'Montserrat',
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- fontSize: 20,
- ),
- ),
- FlutterFlowIconButton(
- borderColor: Colors.transparent,
- borderRadius: 30,
- borderWidth: 1,
- buttonSize: 60,
- icon: Icon(
- Icons.keyboard_backspace,
- color: Color(0xFFD43015),
- size: 30,
- ),
- onPressed: () async {
- Navigator.pop(context);
- },
- ),
- ],
- ),
- Container(
- width: 100,
- height: 30,
- decoration: BoxDecoration(
- color: Color(0x00FFFFFF),
- ),
- ),
- TextFormField(
- controller: _model.textController,
- onChanged: (_) => EasyDebounce.debounce(
- '_model.textController',
- Duration(milliseconds: 2000),
- () => setState(() {}),
- ),
- autofocus: true,
- obscureText: false,
- decoration: InputDecoration(
- hintText: 'Search...',
- hintStyle:
- FlutterFlowTheme.of(context).bodyText2.override(
- fontFamily: 'Poppins',
- color: Color(0xB2F1F4F8),
- ),
- enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0x4CFBFBFB),
- width: 1,
- ),
- borderRadius: BorderRadius.circular(10),
- ),
- focusedBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0x00000000),
- width: 1,
- ),
- borderRadius: BorderRadius.circular(10),
- ),
- errorBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0x00000000),
- width: 1,
- ),
- borderRadius: BorderRadius.circular(10),
- ),
- focusedErrorBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: Color(0x00000000),
- width: 1,
- ),
- borderRadius: BorderRadius.circular(10),
- ),
- filled: true,
- fillColor: Color(0x1AFBFBFB),
- prefixIcon: Icon(
- Icons.search,
- color: Color(0xB2F1F4F8),
- size: 20,
- ),
- suffixIcon: _model.textController!.text.isNotEmpty
- ? InkWell(
- onTap: () async {
- _model.textController?.clear();
- setState(() {});
- },
- child: Icon(
- Icons.clear,
- color: Color(0xFFD43015),
- size: 20,
- ),
- )
- : null,
- ),
- style: FlutterFlowTheme.of(context).bodyText1,
- validator:
- _model.textControllerValidator.asValidator(context),
- ),
- Container(
- width: MediaQuery.of(context).size.width,
- height: 25,
- decoration: BoxDecoration(
- color: Color(0x00FFFFFF),
- ),
- ),
- Text(
- 'Menu',
- style: FlutterFlowTheme.of(context).bodyText1.override(
- fontFamily: 'Poppins',
- color: Color(0xB2F1F4F8),
- ),
- ),
- ListTile(
- leading: Icon(
- Icons.dashboard_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Dashboard',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.addchart_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Project Details',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.library_add_check_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Task',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.content_paste,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Material',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.library_books_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Drawing',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(10, 15, 10, 15),
- child: Container(
- width: MediaQuery.of(context).size.width,
- height: 3,
- decoration: BoxDecoration(
- color: Color(0x1AFBFBFB),
- ),
- ),
- ),
- ListTile(
- leading: Icon(
- Icons.dashboard_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Dilapidation Report',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.insights_rounded,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Weekly Report',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.dashboard_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Project Executive Report',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.calendar_today_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Master Work Schedule',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(10, 15, 10, 15),
- child: Container(
- width: MediaQuery.of(context).size.width,
- height: 3,
- decoration: BoxDecoration(
- color: Color(0x1AFBFBFB),
- ),
- ),
- ),
- ListTile(
- leading: Icon(
- Icons.payments_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Payment',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.group_work_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Work Inspection',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.warning_amber_outlined,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Warranty',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- ListTile(
- leading: Icon(
- Icons.style,
- color: FlutterFlowTheme.of(context).primaryBackground,
- ),
- title: Text(
- 'Site Memo',
- style: GoogleFonts.getFont(
- 'Montserrat',
- color: Color(0xB2F1F4F8),
- fontWeight: FontWeight.w500,
- fontSize: 15,
- ),
- ),
- tileColor: Color(0xFFF5F5F5),
- dense: false,
- ),
- Container(
- width: MediaQuery.of(context).size.width,
- height: 25,
- decoration: BoxDecoration(
- color: Color(0x00FFFFFF),
- ),
- ),
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 25),
- child: Container(
- width: MediaQuery.of(context).size.width,
- decoration: BoxDecoration(
- color: Color(0x1AFBFBFB),
- borderRadius: BorderRadius.circular(10),
- ),
- child: Padding(
- padding:
- EdgeInsetsDirectional.fromSTEB(10, 10, 10, 10),
- child: Container(
- width: MediaQuery.of(context).size.width,
- decoration: BoxDecoration(
- color: Color(0x00FFFFFF),
- ),
- child: Column(
- mainAxisSize: MainAxisSize.max,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- 'New Features Available!',
- style: FlutterFlowTheme.of(context)
- .bodyText1
- .override(
- fontFamily: 'Poppins',
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- fontSize: 12,
- ),
- ),
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(
- 0, 2, 0, 0),
- child: Text(
- 'Check out the new dashboard view.\nPages and exports now load faster.',
- style: FlutterFlowTheme.of(context)
- .bodyText1
- .override(
- fontFamily: 'Poppins',
- fontSize: 8,
- fontWeight: FontWeight.normal,
- lineHeight: 1.2,
- ),
- ),
- ),
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(
- 0, 10, 0, 15),
- child: ClipRRect(
- borderRadius: BorderRadius.circular(8),
- child: Image.network(
- 'https://picsum.photos/seed/427/600',
- width: MediaQuery.of(context).size.width,
- height: 130,
- fit: BoxFit.cover,
- ),
- ),
- ),
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(
- 10, 0, 10, 0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- Text(
- 'Dismiss',
- style: FlutterFlowTheme.of(context)
- .bodyText1
- .override(
- fontFamily: 'Poppins',
- color: Color(0x9AF1F4F8),
- fontSize: 10,
- fontWeight: FontWeight.w600,
- ),
- ),
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(
- 15, 0, 0, 0),
- child: Text(
- 'What\'s new?',
- style: FlutterFlowTheme.of(context)
- .bodyText1
- .override(
- fontFamily: 'Poppins',
- color:
- FlutterFlowTheme.of(context)
- .primaryBackground,
- fontSize: 10,
- fontWeight: FontWeight.w600,
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- ),
- appBar: AppBar(
- backgroundColor: FlutterFlowTheme.of(context).primaryColor,
- automaticallyImplyLeading: false,
- title: Text(
- 'Page Title',
- style: FlutterFlowTheme.of(context).title2.override(
- fontFamily: 'Poppins',
- color: Colors.white,
- fontSize: 22,
- ),
- ),
- actions: [],
- centerTitle: false,
- elevation: 2,
- ),
- body: SafeArea(
- child: GestureDetector(
- onTap: () => FocusScope.of(context).requestFocus(_unfocusNode),
- child: Column(
- mainAxisSize: MainAxisSize.max,
- children: [],
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement