WIP
This commit is contained in:
parent
4c9c0cda24
commit
641cec87d6
|
@ -35,54 +35,47 @@ class _MenuCardItemState extends State<MenuCardItem> {
|
|||
child: Card(
|
||||
elevation: 0,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 10.0, 0.0),
|
||||
child: Container(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
fill: null,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 10.0, 0.0),
|
||||
child: Container(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
fill: null,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(
|
||||
widget.title ?? '',
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(
|
||||
widget.title ?? '',
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -79,30 +79,25 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
}
|
||||
|
||||
Future scheduleVisitOptAction(BuildContext context) async {
|
||||
final isWpp = AppState().whatsapp;
|
||||
final isProvisional = AppState().provisional;
|
||||
|
||||
final routesListStr = <String>[
|
||||
if (isProvisional) 'scheduleProvisionalVisitPage',
|
||||
if (isWpp) 'fastPassPage',
|
||||
'scheduleProvisionalVisitPage',
|
||||
'fastPassPage',
|
||||
'scheduleCompleteVisitPage',
|
||||
];
|
||||
final iconsListIcon = <IconData>[
|
||||
if (isProvisional) Icons.date_range_rounded,
|
||||
if (isWpp) Icons.date_range_rounded,
|
||||
Icons.date_range_rounded,
|
||||
Icons.date_range_rounded,
|
||||
Icons.date_range_rounded,
|
||||
];
|
||||
final nameListStr = <String>[
|
||||
if (isProvisional)
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nProvisória',
|
||||
enText: 'Provisional\nSchedule',
|
||||
),
|
||||
if (isWpp)
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nRápida',
|
||||
enText: 'Fast\nSchedule',
|
||||
),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nProvisória',
|
||||
enText: 'Provisional\nSchedule',
|
||||
),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nRápida',
|
||||
enText: 'Fast\nSchedule',
|
||||
),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nCompleta',
|
||||
enText: 'Complete\nSchedule',
|
||||
|
|
|
@ -344,14 +344,58 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
// if (MenuItem.tile)
|
||||
return <MenuEntry>[
|
||||
MenuCardItem(
|
||||
icon: FFIcons.kvector1,
|
||||
icon: Icons.pending_actions,
|
||||
action: () async {
|
||||
await _model.scheduleVisitOptAction(context);
|
||||
await _model.scheduleProvisionalVisitAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Schedule Visit',
|
||||
ptText: 'Agendar Visita',
|
||||
enText: 'Provisional\nSchedule',
|
||||
ptText: 'Agenda\nProvisória',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.confirmation_num_outlined,
|
||||
action: () async {
|
||||
await _model.fastPassAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Fast\nVisit',
|
||||
ptText: 'Agendar\nVisita',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.event,
|
||||
action: () async {
|
||||
await _model.scheduleCompleteVisitAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Complete\nSchedule',
|
||||
ptText: 'Agenda\nCompleta',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.inventory_2_outlined,
|
||||
action: () async {
|
||||
await _model.scheduleCompleteVisitAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Order\nPickup',
|
||||
ptText: 'Fazer\nEncomenda',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.event_available,
|
||||
action: () async {
|
||||
await _model.scheduleCompleteVisitAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Fazer\nReservas',
|
||||
enText: 'Make\nReservations',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
|
@ -361,8 +405,8 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Register Visitor',
|
||||
ptText: 'Cadastro de Visitante',
|
||||
enText: 'Register\nVisitor',
|
||||
ptText: 'Cadastro\nde Visitante',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
|
@ -372,30 +416,74 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'QRCode Access',
|
||||
ptText: 'QRCode de Acesso',
|
||||
enText: 'QRCode\nAccess',
|
||||
ptText: 'QRCode\nde Acesso',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.people,
|
||||
icon: Icons.groups,
|
||||
action: () async {
|
||||
await _model.peopleOnThePropertyAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'People on the Property',
|
||||
ptText: 'Pessoas na Propriedade',
|
||||
enText: 'People on\nthe Property',
|
||||
ptText: 'Pessoas na\nPropriedade',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.history_sharp,
|
||||
icon: Icons.group_add_outlined,
|
||||
action: () async {
|
||||
await _model.consultHistoriesAction(context);
|
||||
await _model.liberationHistoryAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Consult Histories',
|
||||
ptText: 'Consultar Historicos',
|
||||
enText: 'Liberation\nHistory',
|
||||
ptText: 'Consultar\nLiberation',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.key_outlined,
|
||||
action: () async {
|
||||
await _model.accessHistoryAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Access\nHistory',
|
||||
ptText: 'Consultar\nAccessos',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.people_outline_sharp,
|
||||
action: () async {
|
||||
await _model.visitHistoryAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Visit\nHistory',
|
||||
ptText: 'Consultar\nVisitas',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.chat_outlined,
|
||||
action: () async {
|
||||
await _model.messageHistoryAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Message\nHistory',
|
||||
ptText: 'Consultar\nMessages',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.settings,
|
||||
action: () async {
|
||||
await _model.preferencesSettings(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Preferences\nSettings',
|
||||
ptText: 'Opções\ndo Sistema',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
|
@ -409,17 +497,6 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
ptText: 'Sair da Conta',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.settings,
|
||||
action: () async {
|
||||
await _model.preferencesSettings(context).then((value) => value);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Preferences Settings',
|
||||
ptText: 'Preferências de Configuração',
|
||||
),
|
||||
),
|
||||
MenuCardItem(icon: null, action: () {}, title: ''),
|
||||
];
|
||||
}();
|
||||
|
|
|
@ -126,8 +126,8 @@ class _MenuListViewComponentWidgetState
|
|||
itemCount: widget.options.length,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
height: MediaQuery.of(context).size.height * 0.08,
|
||||
width: MediaQuery.of(context).size.width * 0.08,
|
||||
// height: MediaQuery.of(context).size.height * 0.08,
|
||||
// width: MediaQuery.of(context).size.width * 0.08,
|
||||
child: widget.options[index],
|
||||
);
|
||||
},
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/actions/actions.dart';
|
||||
|
@ -10,11 +9,11 @@ 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/custom_functions.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';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/widgets/drawer_widget/drawer_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class HomePageWidget extends StatefulWidget {
|
||||
|
@ -123,7 +122,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
backgroundColor: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
// drawer: buildDrawer(context),
|
||||
drawerEnableOpenDragGesture: true,
|
||||
endDrawer: buildDrawer(context),
|
||||
endDrawer: CustomDrawer(model: _model),
|
||||
body: buildPage(context, localStatus),
|
||||
),
|
||||
);
|
||||
|
@ -267,163 +266,4 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
SizedBox buildDrawer(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Drawer(
|
||||
elevation: 16.0,
|
||||
child: Container(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildDrawerHeader(context),
|
||||
_buildSearchBar(context),
|
||||
_buildDrawerBody(),
|
||||
].addToStart(const SizedBox(height: 20)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Container _buildDrawerHeader(BuildContext context) {
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(5.0),
|
||||
bottomRight: Radius.circular(5.0),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(30, 30, 10, 0),
|
||||
child: Row(
|
||||
children: [
|
||||
Flexible(
|
||||
fit: FlexFit.loose,
|
||||
flex: 1,
|
||||
child: Container(
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: valueOrDefault(
|
||||
'assets/images/person.jpg',
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||
),
|
||||
width: 80.0,
|
||||
height: 80.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: Alignment.center,
|
||||
placeholder: (context, url) =>
|
||||
Image.asset('assets/images/person.jpg'),
|
||||
errorListener: (_) => Image.asset('assets/images/person.jpg'),
|
||||
errorWidget: (_, __, ___) =>
|
||||
Image.asset('assets/images/person.jpg'),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
convertToUppercase(AppState().name) ?? '',
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Text(
|
||||
AppState().email,
|
||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 12.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Padding _buildSearchBar(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController,
|
||||
focusNode: _model.textFieldFocusNode,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: 'Search',
|
||||
prefixIcon: const Icon(Icons.search_sharp),
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(2.0),
|
||||
),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(2.0),
|
||||
),
|
||||
errorBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(2.0),
|
||||
),
|
||||
focusedErrorBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(2.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
validator: _model.textControllerValidator.asValidator(context),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Expanded _buildDrawerBody() {
|
||||
return Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: wrapWithModel(
|
||||
model: _model.menuComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: const MenuComponentWidget(
|
||||
expandable: false,
|
||||
style: MenuView.list,
|
||||
item: MenuItem.tile,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,180 @@
|
|||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/backend/schema/enums/enums.dart';
|
||||
import 'package:hub/components/organism_components/menu_component/menu_component_widget.dart';
|
||||
import 'package:hub/flutter_flow/custom_functions.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';
|
||||
|
||||
class CustomDrawer extends StatelessWidget {
|
||||
const CustomDrawer({super.key, required this.model});
|
||||
final HomePageModel model;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Drawer(
|
||||
elevation: 16.0,
|
||||
child: Container(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildDrawerHeader(context),
|
||||
// _buildSearchBar(context),
|
||||
_buildDrawerBody(),
|
||||
].addToStart(const SizedBox(height: 20)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Container _buildDrawerHeader(BuildContext context) {
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(5.0),
|
||||
bottomRight: Radius.circular(5.0),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(30, 30, 10, 0),
|
||||
child: Row(
|
||||
children: [
|
||||
Flexible(
|
||||
fit: FlexFit.loose,
|
||||
flex: 1,
|
||||
child: Container(
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: valueOrDefault(
|
||||
'assets/images/person.jpg',
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||
),
|
||||
width: 80.0,
|
||||
height: 80.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: Alignment.center,
|
||||
placeholder: (context, url) =>
|
||||
Image.asset('assets/images/person.jpg'),
|
||||
errorListener: (_) => Image.asset('assets/images/person.jpg'),
|
||||
errorWidget: (_, __, ___) =>
|
||||
Image.asset('assets/images/person.jpg'),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
convertToUppercase(AppState().name) ?? '',
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Text(
|
||||
AppState().email,
|
||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 12.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Padding _buildSearchBar(BuildContext context) {
|
||||
final theme = FlutterFlowTheme.of(context);
|
||||
final errorColor = theme.error;
|
||||
final primaryColor = theme.primary;
|
||||
final customColor1 = theme.primaryText;
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: TextFormField(
|
||||
controller: model.textController,
|
||||
focusNode: model.textFieldFocusNode,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: 'Search',
|
||||
labelStyle: TextStyle(color: customColor1),
|
||||
prefixIcon: const Icon(Icons.search_sharp),
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(2.0),
|
||||
),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: primaryColor,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(2.0),
|
||||
),
|
||||
errorBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: errorColor,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(2.0),
|
||||
),
|
||||
focusedErrorBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: errorColor,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(2.0),
|
||||
),
|
||||
),
|
||||
style: theme.bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
validator: model.textControllerValidator.asValidator(context),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Expanded _buildDrawerBody() {
|
||||
return Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: wrapWithModel(
|
||||
model: model.menuComponentModel,
|
||||
updateCallback: () {},
|
||||
child: const MenuComponentWidget(
|
||||
expandable: false,
|
||||
style: MenuView.list,
|
||||
item: MenuItem.tile,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue