This commit is contained in:
jantunesmesias 2024-08-27 14:46:12 -03:00
parent 6d2fac31cd
commit 31e20ab37c
3 changed files with 61 additions and 97 deletions

View File

@ -59,9 +59,9 @@ class _LocalProfileComponentWidgetState
width: double.infinity,
height: 119.0,
decoration: BoxDecoration(
color: const Color(0xFF1AAB5F),
color: FlutterFlowTheme.of(context).primary,
border: Border.all(
color: const Color(0xFF1AAB5F),
color: FlutterFlowTheme.of(context).primary,
),
),
child: Row(

View File

@ -546,7 +546,9 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
}();
return Padding(
padding: const EdgeInsetsDirectional.only(top: 10),
padding: const EdgeInsetsDirectional.only(
top: 10,
),
child: Builder(
builder: (context) {
if (widget.style == MenuView.list_grid &&

View File

@ -96,11 +96,57 @@ class _HomePageWidgetState extends State<HomePageWidget> {
: FocusScope.of(context).unfocus(),
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).secondaryBackground,
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
// drawer: buildDrawer(context),
drawerEnableOpenDragGesture: true,
drawerDragStartBehavior: DragStartBehavior.start,
drawer: CustomDrawer(model: _model),
appBar: AppBar(
backgroundColor: FlutterFlowTheme.of(context).primary,
automaticallyImplyLeading: false,
leading: 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();
},
),
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Image.asset(
'assets/images/logo.png',
width: 15.0,
height: 15.0,
fit: BoxFit.cover,
),
),
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),
),
),
].divide(const SizedBox(width: 8.0)),
),
actions: const [],
centerTitle: true,
elevation: 0.0,
),
body: buildPage(context),
),
);
@ -126,7 +172,6 @@ class _HomePageWidgetState extends State<HomePageWidget> {
verticalDirection: VerticalDirection.down,
clipBehavior: Clip.none,
children: [
createHeader(context),
createLocal(),
createBody(),
],
@ -137,104 +182,21 @@ class _HomePageWidgetState extends State<HomePageWidget> {
);
}
Widget createHeader(BuildContext context) {
Widget createBody() {
return Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height * 0.13,
decoration: const BoxDecoration(
color: Color(0xFF1AAB5F),
),
child: SafeArea(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
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();
},
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Image.asset(
'assets/images/logo.png',
width: 15.0,
height: 15.0,
fit: BoxFit.cover,
),
),
const SizedBox(width: 8.0),
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(width: 60.0),
],
color: FlutterFlowTheme.of(context).primaryBackground,
child: wrapWithModel(
model: _model.menuComponentModel,
updateCallback: () => setState(() {}),
child: const MenuComponentWidget(
expandable: true,
style: MenuView.list_grid,
item: MenuItem.button,
),
),
);
}
Wrap createBody() {
return Wrap(
spacing: 0.0,
runSpacing: 0.0,
alignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.start,
direction: Axis.horizontal,
runAlignment: WrapAlignment.start,
verticalDirection: VerticalDirection.down,
clipBehavior: Clip.none,
children: [
wrapWithModel(
model: _model.menuComponentModel,
updateCallback: () => setState(() {}),
child: const MenuComponentWidget(
expandable: true,
style: MenuView.list_grid,
item: MenuItem.button,
),
),
// Align(
// alignment: const AlignmentDirectional(0.0, 0.0),
// child: Provider<MessageWellNotifier>(
// create: (_) => MessageWellNotifier(),
// child: wrapWithModel(
// model: _model.messageWellComponentModel,
// updateCallback: () => setState(() {}),
// child: const MessageWellComponentWidget(),
// ),
// ),
// ),
//footer
const SizedBox(
height: 100,
width: double.infinity,
)
],
);
}
Widget createLocal() {
return wrapWithModel(
model: _model.localComponentModel,