WIP
This commit is contained in:
parent
27b5a9890a
commit
4006bc3566
|
@ -151,8 +151,7 @@ Future singInLoginAction(
|
||||||
AppState().userDevUUID =
|
AppState().userDevUUID =
|
||||||
PhpGroup.loginCall.userDeviceId((loginCall.jsonBody ?? ''))!;
|
PhpGroup.loginCall.userDeviceId((loginCall.jsonBody ?? ''))!;
|
||||||
|
|
||||||
AppState().name =
|
PhpGroup.loginCall.userName((loginCall.jsonBody ?? ''))!;
|
||||||
PhpGroup.loginCall.userName((loginCall.jsonBody ?? ''))!;
|
|
||||||
|
|
||||||
AppState().serialNumber = await getSerialNumber() ?? '';
|
AppState().serialNumber = await getSerialNumber() ?? '';
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ class AppState extends ChangeNotifier {
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_devUUID = await secureStorage.getString('ff_devUUID') ?? _devUUID;
|
_devUUID = await secureStorage.getString('ff_devUUID') ?? _devUUID;
|
||||||
});
|
});
|
||||||
|
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_email = await secureStorage.getString('ff_email') ?? _email;
|
_email = await secureStorage.getString('ff_email') ?? _email;
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
@ -9,7 +11,6 @@ import 'package:hub/components/organism_components/bottom_arrow_linked_locals_co
|
||||||
import 'package:hub/components/organism_components/local_profile_component/local_profile_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/components/organism_components/menu_component/menu_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/custom_functions.dart';
|
import 'package:hub/flutter_flow/custom_functions.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_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/pages/home_page/home_page_model.dart';
|
import 'package:hub/pages/home_page/home_page_model.dart';
|
||||||
|
@ -28,6 +29,38 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
bool localStatus = false;
|
bool localStatus = false;
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
|
void checkData() async {
|
||||||
|
final response = await PhpGroup.getDadosCall.call(
|
||||||
|
devUUID: AppState().devUUID,
|
||||||
|
userUUID: AppState().userUUID,
|
||||||
|
cliUUID: AppState().cliUUID,
|
||||||
|
atividade: 'getDados',
|
||||||
|
);
|
||||||
|
|
||||||
|
switch (response.statusCode) {
|
||||||
|
case 200:
|
||||||
|
if (response.jsonBody['error'] == false) {
|
||||||
|
AppState().whatsapp = response.jsonBody['whatsapp'];
|
||||||
|
AppState().provisional = response.jsonBody['provisional'];
|
||||||
|
AppState().name = response.jsonBody['visitado']['VDO_NOME'];
|
||||||
|
} else {
|
||||||
|
if (response.jsonBody['error_msg'] !=
|
||||||
|
r'''Usuario nao possui vinculo ativo com esse condominio''') {
|
||||||
|
log(response.jsonBody['error_msg']);
|
||||||
|
await DialogUtil.warningDefault(context)
|
||||||
|
.whenComplete(() => checkData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
await DialogUtil.warningDefault(context)
|
||||||
|
.whenComplete(() => checkData());
|
||||||
|
|
||||||
|
safeSetState(() {});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
@ -38,35 +71,8 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
() async {
|
() async {
|
||||||
await FirebaseMessagingService().updateDeviceToken();
|
await FirebaseMessagingService().updateDeviceToken();
|
||||||
}();
|
}();
|
||||||
void fetchData() async {
|
|
||||||
final response = await PhpGroup.getDadosCall.call(
|
|
||||||
devUUID: AppState().devUUID,
|
|
||||||
userUUID: AppState().userUUID,
|
|
||||||
cliUUID: AppState().cliUUID,
|
|
||||||
atividade: 'getDados',
|
|
||||||
);
|
|
||||||
|
|
||||||
switch (response.statusCode) {
|
checkData();
|
||||||
case 200:
|
|
||||||
if (response.jsonBody['error'] == false) {
|
|
||||||
AppState().whatsapp = response.jsonBody['whatsapp'];
|
|
||||||
AppState().provisional = response.jsonBody['provisional'];
|
|
||||||
} else {
|
|
||||||
await DialogUtil.warningDefault(context)
|
|
||||||
.whenComplete(() => fetchData());
|
|
||||||
safeSetState(() {});
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
await DialogUtil.warningDefault(context)
|
|
||||||
.whenComplete(() => fetchData());
|
|
||||||
|
|
||||||
safeSetState(() {});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fetchData();
|
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||||
localStatus = await checkLocals(
|
localStatus = await checkLocals(
|
||||||
|
@ -115,7 +121,9 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
key: scaffoldKey,
|
key: scaffoldKey,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).secondaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).secondaryBackground,
|
||||||
drawer: buildDrawer(context),
|
// drawer: buildDrawer(context),
|
||||||
|
drawerEnableOpenDragGesture: true,
|
||||||
|
endDrawer: buildDrawer(context),
|
||||||
body: buildPage(context, localStatus),
|
body: buildPage(context, localStatus),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -152,6 +160,64 @@ 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: Align(
|
||||||
|
alignment: AlignmentDirectional.bottomCenter,
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
const SizedBox(),
|
||||||
|
Row(
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(10.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();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Wrap createBody() {
|
Wrap createBody() {
|
||||||
return Wrap(
|
return Wrap(
|
||||||
spacing: 0.0,
|
spacing: 0.0,
|
||||||
|
@ -202,337 +268,159 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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: () {},
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
SizedBox buildDrawer(BuildContext context) {
|
SizedBox buildDrawer(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: MediaQuery.of(context).size.width * 0.8,
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
child: Drawer(
|
child: Drawer(
|
||||||
elevation: 16.0,
|
elevation: 16.0,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
shape: BoxShape.rectangle,
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
Container(
|
_buildDrawerHeader(context),
|
||||||
width: double.infinity,
|
_buildSearchBar(context),
|
||||||
decoration: const BoxDecoration(
|
_buildDrawerBody(),
|
||||||
borderRadius: BorderRadius.only(
|
].addToStart(const SizedBox(height: 20)),
|
||||||
bottomLeft: Radius.circular(5.0),
|
),
|
||||||
bottomRight: Radius.circular(5.0),
|
),
|
||||||
topLeft: Radius.circular(0.0),
|
),
|
||||||
topRight: Radius.circular(0.0),
|
);
|
||||||
),
|
}
|
||||||
shape: BoxShape.rectangle,
|
|
||||||
|
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: Column(
|
child: CachedNetworkImage(
|
||||||
mainAxisSize: MainAxisSize.max,
|
imageUrl: valueOrDefault(
|
||||||
children: [
|
'assets/images/person.jpg',
|
||||||
Padding(
|
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||||
padding: const EdgeInsets.fromLTRB(30, 30, 10, 0),
|
),
|
||||||
child: Row(
|
width: 80.0,
|
||||||
mainAxisSize: MainAxisSize.max,
|
height: 80.0,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
fit: BoxFit.cover,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
alignment: Alignment.center,
|
||||||
children: [
|
placeholder: (context, url) =>
|
||||||
Flexible(
|
Image.asset('assets/images/person.jpg'),
|
||||||
child: Container(
|
errorListener: (_) => Image.asset('assets/images/person.jpg'),
|
||||||
width: double.infinity,
|
errorWidget: (_, __, ___) =>
|
||||||
decoration: const BoxDecoration(),
|
Image.asset('assets/images/person.jpg'),
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 50.0,
|
|
||||||
height: 50.0,
|
|
||||||
clipBehavior: Clip.antiAlias,
|
|
||||||
decoration: const 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: const Alignment(0.0, 0.0),
|
|
||||||
placeholder: (context, url) =>
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/home.png'),
|
|
||||||
errorListener: (_) => Image.asset(
|
|
||||||
'assets/images/home.png'),
|
|
||||||
errorWidget: (_, __, ___) =>
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/home.png'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 150.0,
|
|
||||||
child: Text(
|
|
||||||
valueOrDefault<String>(
|
|
||||||
convertToUppercase(AppState().local),
|
|
||||||
'NOME DO LOCAL',
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyLarge
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Nunito Sans',
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 14.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
useGoogleFonts:
|
|
||||||
GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Nunito Sans'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.divide(const SizedBox(width: 0.0))
|
|
||||||
.around(const SizedBox(width: 0.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
].addToStart(const SizedBox(height: 30.0)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
padding:
|
SizedBox(width: 10),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
Expanded(
|
||||||
child: Row(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Text(
|
||||||
Flexible(
|
convertToUppercase(AppState().name) ?? '',
|
||||||
child: Padding(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
fontFamily: 'Nunito Sans',
|
||||||
8.0, 0.0, 8.0, 0.0),
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
child: TextFormField(
|
fontSize: 14.0,
|
||||||
controller: _model.textController,
|
letterSpacing: 0.0,
|
||||||
focusNode: _model.textFieldFocusNode,
|
fontWeight: FontWeight.normal,
|
||||||
autofocus: false,
|
|
||||||
obscureText: false,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
isDense: true,
|
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
alignLabelWithHint: false,
|
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
prefixIcon: const Icon(
|
|
||||||
Icons.search_sharp,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
validator: _model.textControllerValidator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.addToStart(const SizedBox(width: 30.0))
|
|
||||||
.addToEnd(const SizedBox(width: 30.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: wrapWithModel(
|
|
||||||
model: _model.menuComponentModel,
|
|
||||||
updateCallback: () => setState(() {}),
|
|
||||||
child: const MenuComponentWidget(
|
|
||||||
expandable: false,
|
|
||||||
style: MenuView.list,
|
|
||||||
item: MenuItem.tile,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue