This commit is contained in:
jantunesmesias 2024-08-26 16:28:44 -03:00
parent 2c1ca87b3b
commit f481967af1
1 changed files with 119 additions and 51 deletions

View File

@ -1,5 +1,6 @@
import 'dart:developer';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:hub/actions/actions.dart';
@ -9,6 +10,7 @@ import 'package:hub/backend/schema/enums/enums.dart';
import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
import 'package:hub/components/organism_components/local_profile_component/local_profile_component_widget.dart';
import 'package:hub/components/organism_components/menu_component/menu_component_widget.dart';
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
import 'package:hub/flutter_flow/flutter_flow_util.dart';
import 'package:hub/pages/home_page/home_page_model.dart';
@ -121,7 +123,9 @@ class _HomePageWidgetState extends State<HomePageWidget> {
backgroundColor: FlutterFlowTheme.of(context).secondaryBackground,
// drawer: buildDrawer(context),
drawerEnableOpenDragGesture: true,
endDrawer: CustomDrawer(model: _model),
drawerDragStartBehavior: DragStartBehavior.start,
drawer: CustomDrawer(model: _model),
body: buildPage(context, localStatus),
),
);
@ -158,58 +162,122 @@ class _HomePageWidgetState extends State<HomePageWidget> {
);
}
Widget createHeader(BuildContext context) {
return Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height * 0.12,
decoration: const BoxDecoration(
color: Color(0xFF1AAB5F),
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
child: IconButton(
icon: const Icon(
Icons.menu_rounded,
color: Colors.white,
size: 28.0,
),
onPressed: () async {
scaffoldKey.currentState!.openEndDrawer();
},
Row createHeader(BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
child: Container(
width: 100.0,
height: 100.0,
decoration: const BoxDecoration(
color: Color(0xFF1AAB5F),
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 1.0),
child: Container(
height: 50.0,
decoration: const BoxDecoration(),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Align(
alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
10.0, 0.0, 0.0, 0.0),
child: FlutterFlowIconButton(
borderRadius: 20.0,
borderWidth: 1.0,
buttonSize: 40.0,
fillColor: FlutterFlowTheme.of(context).primary,
icon: const Icon(
Icons.menu_rounded,
color: Colors.white,
size: 28.0,
),
onPressed: () async {
scaffoldKey.currentState!.openDrawer();
},
),
),
),
Align(
alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
60.0, 15.0, 0.0, 0.0),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Image.asset(
'assets/images/logo.png',
width: 50.0,
height: 200.0,
fit: BoxFit.none,
),
),
),
),
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 15.0, 0.0, 0.0),
child: Text(
'FRE ACCESS',
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: FlutterFlowTheme.of(context)
.bodyMediumFamily,
color: FlutterFlowTheme.of(context).info,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
FlutterFlowTheme.of(context)
.bodyMediumFamily),
),
),
),
),
],
),
),
),
),
// Align(
// alignment: const AlignmentDirectional(0.0, 1.0),
// child: Container(
// width: 100.0,
// height: 50.0,
// decoration: const BoxDecoration(),
// child: Align(
// alignment: const AlignmentDirectional(1.0, 1.0),
// child: FlutterFlowIconButton(
// borderRadius: 20.0,
// borderWidth: 1.0,
// buttonSize: 40.0,
// icon: Icon(
// Icons.notifications_sharp,
// color: FlutterFlowTheme.of(context).info,
// size: 24.0,
// ),
// onPressed: () {},
// ),
// ),
// ),
// ),
],
),
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Image.asset(
'assets/images/logo.png',
width: 50.0,
height: 200.0,
fit: BoxFit.none,
),
),
Text(
'FRE ACCESS',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).info,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context).bodyMediumFamily),
),
),
],
),
const SizedBox(),
],
),
),
],
);
}