fix menu
This commit is contained in:
parent
5f84d79629
commit
aea9b851c0
|
@ -21,9 +21,12 @@ class MenuButtonWidget extends MenuEntry {
|
|||
|
||||
@override
|
||||
_MenuButtonWidgetState createState() => _MenuButtonWidgetState();
|
||||
|
||||
}
|
||||
|
||||
class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||
get action => action;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
|
||||
|
||||
|
||||
|
||||
class MenuCardItem extends MenuEntry {
|
||||
const MenuCardItem({
|
||||
Key? key,
|
||||
this.action,
|
||||
this.title,
|
||||
this.icon,
|
||||
}) : super(key: key);
|
||||
|
||||
final Function()? action;
|
||||
final String? title;
|
||||
final IconData? icon;
|
||||
|
||||
@override
|
||||
_MenuCardItemState createState() => _MenuCardItemState();
|
||||
|
||||
}
|
||||
|
||||
class _MenuCardItemState extends State<MenuCardItem> {
|
||||
get action => action;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.action?.call();
|
||||
},
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Text(
|
||||
widget.title ?? '',
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -5,8 +5,15 @@ import 'package:flutter/material.dart';
|
|||
abstract class MenuEntry extends StatefulWidget {
|
||||
const MenuEntry({
|
||||
Key? key,
|
||||
this.action,
|
||||
this.title,
|
||||
this.icon,
|
||||
}) : super(key: key);
|
||||
|
||||
final Function()? action;
|
||||
final String? title;
|
||||
final IconData? icon;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:hub/backend/schema/enums/enums.dart';
|
||||
import 'package:hub/components/atomic_components/menu_button_item/menu_button_item_widget.dart';
|
||||
import 'package:hub/components/atomic_components/menu_card_item/menu_card_item.dart';
|
||||
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
|
||||
|
@ -18,13 +20,10 @@ class MenuComponentWidget extends StatefulWidget {
|
|||
required this.style,
|
||||
required this.item,
|
||||
required this.expandable,
|
||||
required this.options,
|
||||
});
|
||||
final MenuView style;
|
||||
final MenuItem item;
|
||||
final bool expandable;
|
||||
final List<MenuEntry> options;
|
||||
|
||||
@override
|
||||
State<MenuComponentWidget> createState() => _MenuComponentWidgetState();
|
||||
}
|
||||
|
@ -32,8 +31,11 @@ class MenuComponentWidget extends StatefulWidget {
|
|||
class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||
late MenuComponentModel _model;
|
||||
|
||||
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
@ -42,6 +44,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => MenuComponentModel());
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -53,7 +56,39 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
log('MenuComponentWidget: ${widget.options.toList().toString()}');
|
||||
final options = widget.item == MenuItem.button
|
||||
? <MenuEntry>[
|
||||
MenuButtonWidget(icon: FFIcons.kvector1, action: () async { await _model.scheduleVisitOptAction(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Schedule\nVisit' , ptText:'Agendar/Visita' ,),),
|
||||
|
||||
MenuButtonWidget(icon: FFIcons.khome, action: () async {await _model.registerVisitorOptAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Register\nVisitor' , ptText:'Cadastro de Visitante' ,),),
|
||||
|
||||
// MenuButtonWidget(icon: FFIcons.kvector2, action: () async {setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Link\nCondominum' , ptText:'' ,),),
|
||||
// MenuButtonWidget(icon: FFIcons.kpets, action: () async {setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Register\Pet' , ptText:'' ,),),
|
||||
|
||||
MenuButtonWidget(icon: Icons.qr_code, action: () async {await _model.accessQRCodeOptAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'QRCode\nAccess' , ptText:'' ,),),
|
||||
|
||||
MenuButtonWidget(icon: Icons.people, action: () async {await _model.peopleOnThePropertyAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Poeple on\nthe Property' , ptText:'' ,),),
|
||||
|
||||
MenuButtonWidget(icon: Icons.history_sharp, action: () async {await _model.liberationHistoryOptAction(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Consult\nHistories' , ptText:'' ,),),
|
||||
|
||||
MenuButtonWidget(icon: Icons.settings, action: () async {await _model.preferencesSettings(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Preferences\nSettings' , ptText:'' ,),),
|
||||
] : <MenuEntry>[
|
||||
MenuCardItem(icon: FFIcons.kvector1, action: () async { await _model.scheduleVisitOptAction(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Schedule Visit' , ptText:'Agendar/Visita' ,),),
|
||||
|
||||
MenuCardItem(icon: FFIcons.khome, action: () async {await _model.registerVisitorOptAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Register Visitor' , ptText:'Cadastro de Visitante' ,),),
|
||||
|
||||
// MenuCardItem(icon: FFIcons.kvector2, action: () async {setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Link Condominum' , ptText:'' ,),),
|
||||
// MenuCardItem(icon: FFIcons.kpets, action: () async {setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Register\Pet' , ptText:'' ,),),
|
||||
|
||||
MenuCardItem(icon: Icons.qr_code, action: () async {await _model.accessQRCodeOptAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'QRCode Access' , ptText:'' ,),),
|
||||
|
||||
MenuCardItem(icon: Icons.people, action: () async {await _model.peopleOnThePropertyAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Poeple on the Property' , ptText:'' ,),),
|
||||
|
||||
MenuCardItem(icon: Icons.history_sharp, action: () async {await _model.liberationHistoryOptAction(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Consult Histories' , ptText:'' ,),),
|
||||
|
||||
MenuCardItem(icon: Icons.settings, action: () async {await _model.preferencesSettings(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Preferences Settings' , ptText:'' ,),),
|
||||
|
||||
];
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||
child: Builder(
|
||||
|
@ -65,44 +100,13 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: MenuListViewComponentWidget(
|
||||
options: widget.options,
|
||||
options: options,
|
||||
expandable: widget.expandable,
|
||||
item: widget.item,
|
||||
|
||||
|
||||
changeMenuStyle: () async {
|
||||
await _model.changeMenuStyle(context);
|
||||
setState(() {});
|
||||
},
|
||||
registerVisitorOptAction: () async {
|
||||
await _model.registerVisitorOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
scheduleVisitOptAction: () async {
|
||||
await _model.scheduleVisitOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
peopleOnThePropertyOptAction: () async {
|
||||
await _model.peopleOnThePropertyAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
preferencesSettings: () async {
|
||||
await _model.preferencesSettings(context);
|
||||
setState(() {});
|
||||
},
|
||||
liberationHistoryOptAction: () async {
|
||||
await _model.liberationHistoryOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
accessQRCodeOptAction: () async {
|
||||
await _model.accessQRCodeOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
messageHistoryAction: () async {
|
||||
await _model.messageHistoryAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
@ -111,85 +115,32 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: MenuStaggeredViewComponentWidget(
|
||||
changeMenuStyleAction: () async {
|
||||
options: options,
|
||||
expandable: widget.expandable,
|
||||
item: widget.item,
|
||||
changeMenuStyle: () async {
|
||||
await _model.changeMenuStyle(context);
|
||||
setState(() {});
|
||||
},
|
||||
registerVisitorOptAction: () async {
|
||||
await _model.registerVisitorOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
scheduleVisitOptAction: () async {
|
||||
await _model.scheduleVisitOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
peopleOnThePropertyOptAction: () async {
|
||||
await _model.peopleOnThePropertyAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
preferencesSettings: () async {
|
||||
await _model.preferencesSettings(context);
|
||||
setState(() {});
|
||||
},
|
||||
liberationHistoryOptAction: () async {
|
||||
await _model.liberationHistoryOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
accessQRCodeOptAction: () async {
|
||||
await _model.accessQRCodeOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
if (widget.style == MenuView.list && widget.expandable == false && widget.item == MenuItem.card){
|
||||
return wrapWithModel(
|
||||
model: _model.menuListViewComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: MenuListViewComponentWidget(
|
||||
expandable: widget.expandable,
|
||||
item: widget.item,
|
||||
options: widget.options,
|
||||
messageHistoryAction: () async {
|
||||
await _model.messageHistoryAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
|
||||
|
||||
changeMenuStyle: () async {
|
||||
await _model.changeMenuStyle(context);
|
||||
setState(() {});
|
||||
},
|
||||
registerVisitorOptAction: () async {
|
||||
await _model.registerVisitorOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
scheduleVisitOptAction: () async {
|
||||
await _model.scheduleVisitOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
peopleOnThePropertyOptAction: () async {
|
||||
await _model.peopleOnThePropertyAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
preferencesSettings: () async {
|
||||
await _model.preferencesSettings(context);
|
||||
setState(() {});
|
||||
},
|
||||
liberationHistoryOptAction: () async {
|
||||
await _model.liberationHistoryOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
accessQRCodeOptAction: () async {
|
||||
await _model.accessQRCodeOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
return wrapWithModel(
|
||||
model: _model.menuListViewComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: MenuListViewComponentWidget(
|
||||
options: options,
|
||||
expandable: widget.expandable,
|
||||
item: widget.item,
|
||||
changeMenuStyle: () async {
|
||||
await _model.changeMenuStyle(context);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
return const SizedBox();
|
||||
},
|
||||
|
|
|
@ -17,16 +17,10 @@ class MenuListViewComponentWidget extends StatefulWidget {
|
|||
const MenuListViewComponentWidget({
|
||||
super.key,
|
||||
required this.changeMenuStyle,
|
||||
required this.registerVisitorOptAction,
|
||||
required this.scheduleVisitOptAction,
|
||||
required this.peopleOnThePropertyOptAction,
|
||||
required this.preferencesSettings,
|
||||
required this.liberationHistoryOptAction,
|
||||
required this.accessQRCodeOptAction,
|
||||
|
||||
required this.expandable,
|
||||
required this.item,
|
||||
required this.options,
|
||||
required this.messageHistoryAction,
|
||||
});
|
||||
|
||||
final bool expandable;
|
||||
|
@ -34,13 +28,6 @@ class MenuListViewComponentWidget extends StatefulWidget {
|
|||
|
||||
final List<MenuEntry> options;
|
||||
final Future Function()? changeMenuStyle;
|
||||
final Future Function()? registerVisitorOptAction;
|
||||
final Future Function()? scheduleVisitOptAction;
|
||||
final Future Function()? peopleOnThePropertyOptAction;
|
||||
final Future Function()? preferencesSettings;
|
||||
final Future Function()? liberationHistoryOptAction;
|
||||
final Future Function()? accessQRCodeOptAction;
|
||||
final Future Function()? messageHistoryAction;
|
||||
|
||||
@override
|
||||
State<MenuListViewComponentWidget> createState() =>
|
||||
|
@ -97,37 +84,43 @@ class _MenuListViewComponentWidgetState
|
|||
width: double.infinity,
|
||||
child: ListView.builder(
|
||||
addAutomaticKeepAlives: true,
|
||||
padding: EdgeInsets.zero,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
shrinkWrap: true,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
scrollDirection: Axis.horizontal,
|
||||
|
||||
itemCount: widget.options.length,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
height: 115,
|
||||
width: 115,
|
||||
child: widget.options[index]);
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: SizedBox(
|
||||
height: 115,
|
||||
width: 115,
|
||||
child: widget.options[index]),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
case MenuItem.card:
|
||||
return ListView.builder(
|
||||
addAutomaticKeepAlives: true,
|
||||
padding: EdgeInsets.zero,
|
||||
shrinkWrap: true,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
itemCount: widget.options.length,
|
||||
itemBuilder: (context, index) {
|
||||
return MenuButtonWidget(
|
||||
action: widget.registerVisitorOptAction,
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Register Visitor',
|
||||
ptText: 'Registrar Visitante',
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.8,
|
||||
child: ListView.builder(
|
||||
addAutomaticKeepAlives: true,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
shrinkWrap: true,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: widget.options.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: SizedBox(
|
||||
height: 115,
|
||||
width: 115,
|
||||
child: widget.options[index]),
|
||||
);
|
||||
},
|
||||
),
|
||||
icon: Icons.person_add_alt_1_outlined,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ import 'package:flutter/widgets.dart';
|
|||
import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/backend/schema/enums/enums.dart';
|
||||
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
||||
import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart';
|
||||
import 'package:hub/flutter_flow/custom_icons.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||
|
@ -15,22 +17,17 @@ import 'package:hub/flutter_flow/internationalization.dart';
|
|||
class MenuStaggeredViewComponentWidget extends StatefulWidget {
|
||||
const MenuStaggeredViewComponentWidget({
|
||||
super.key,
|
||||
required this.changeMenuStyleAction,
|
||||
required this.registerVisitorOptAction,
|
||||
required this.scheduleVisitOptAction,
|
||||
required this.peopleOnThePropertyOptAction,
|
||||
required this.preferencesSettings,
|
||||
required this.liberationHistoryOptAction,
|
||||
required this.accessQRCodeOptAction,
|
||||
required this.changeMenuStyle,
|
||||
required this.expandable,
|
||||
required this.item,
|
||||
required this.options,
|
||||
});
|
||||
|
||||
final Future Function()? changeMenuStyleAction;
|
||||
final Future Function()? registerVisitorOptAction;
|
||||
final Future Function()? scheduleVisitOptAction;
|
||||
final Future Function()? peopleOnThePropertyOptAction;
|
||||
final Future Function()? preferencesSettings;
|
||||
final Future Function()? liberationHistoryOptAction;
|
||||
final Future Function()? accessQRCodeOptAction;
|
||||
final bool expandable;
|
||||
final MenuItem item;
|
||||
|
||||
final List<MenuEntry> options;
|
||||
final Future Function()? changeMenuStyle;
|
||||
|
||||
@override
|
||||
State<MenuStaggeredViewComponentWidget> createState() =>
|
||||
|
@ -86,7 +83,7 @@ class _MenuStaggeredViewComponentWidgetState
|
|||
),
|
||||
crossAxisSpacing: 10.0,
|
||||
mainAxisSpacing: 10.0,
|
||||
itemCount: 8,
|
||||
itemCount: widget.options.length,
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
0,
|
||||
10.0,
|
||||
|
@ -95,933 +92,10 @@ class _MenuStaggeredViewComponentWidgetState
|
|||
),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return [
|
||||
() => InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.scheduleVisitOptAction?.call();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(8.0, 0.0, 0.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(
|
||||
FFIcons.kvector1,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ee33l0ms' /* Agendar
|
||||
Visita */
|
||||
,
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
() => InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.registerVisitorOptAction?.call();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(8.0, 0.0, 0.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(
|
||||
FFIcons.kvector,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ya37l3jt' /* Cadastrar
|
||||
Visitante */
|
||||
,
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
() => Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(8.0, 0.0, 0.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(
|
||||
FFIcons.khome,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'h8s3adu8' /* Vincular
|
||||
Condomínio */
|
||||
,
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
() => Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(8.0, 0.0, 0.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(
|
||||
FFIcons.kpets,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'j6tfixen' /* Cadastrar
|
||||
Pet */
|
||||
,
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
() => InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.accessQRCodeOptAction?.call();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 0.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(
|
||||
FFIcons.kvector2,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'9tli4i2x' /* QR Code
|
||||
de Acesso */
|
||||
,
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
() => InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.peopleOnThePropertyOptAction?.call();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(8.0, 0.0, 0.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(
|
||||
Icons.people,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'i22hecs8' /* Pessoas na
|
||||
Propriedade */
|
||||
,
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
() => InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.liberationHistoryOptAction?.call();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(8.0, 0.0, 0.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(
|
||||
Icons.history_sharp,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'Consult\nHistories',
|
||||
ptText: 'Consultar\nHistóricos',
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
() => InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.preferencesSettings?.call();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(8.0, 0.0, 0.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(
|
||||
Icons.history_sharp,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'Preferences\nSettings',
|
||||
ptText: 'Preferências\ndo Sistema',
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
][index]();
|
||||
return SizedBox(
|
||||
height: 100,
|
||||
width: 100,
|
||||
child: widget.options[index]);
|
||||
},
|
||||
),
|
||||
),
|
||||
|
@ -1069,7 +143,7 @@ Propriedade */
|
|||
color: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
onPressed: () async {
|
||||
await widget.changeMenuStyleAction?.call();
|
||||
await widget.changeMenuStyle?.call();
|
||||
},
|
||||
),
|
||||
),
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
|
||||
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart';
|
||||
import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_model.dart';
|
||||
import 'package:hub/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
|
||||
import 'package:hub/components/view_visit_detail/view_visit_detail_model.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
|
@ -0,0 +1,959 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_model.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/flutter_flow/nav/serialization_util.dart';
|
||||
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||
import '/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
||||
|
||||
class ViewVisitDetailWidget extends StatefulWidget {
|
||||
const ViewVisitDetailWidget({
|
||||
super.key,
|
||||
this.visitorImgPath,
|
||||
required this.visitStartDate,
|
||||
required this.visitEndDate,
|
||||
required this.visitReasonStr,
|
||||
required this.visitLevelStr,
|
||||
required this.visitTempStr,
|
||||
required this.visitObsStr,
|
||||
required this.visitStatusStr,
|
||||
required this.visitorStrList,
|
||||
this.visitorJsonList,
|
||||
required this.visitIdStr,
|
||||
required this.visitStatusColor,
|
||||
});
|
||||
|
||||
final String? visitorImgPath;
|
||||
final String? visitStartDate;
|
||||
final String? visitEndDate;
|
||||
final String? visitReasonStr;
|
||||
final String? visitLevelStr;
|
||||
final String? visitTempStr;
|
||||
final String? visitObsStr;
|
||||
final String? visitStatusStr;
|
||||
final String? visitorStrList;
|
||||
final List<dynamic>? visitorJsonList;
|
||||
final String? visitIdStr;
|
||||
final Color? visitStatusColor;
|
||||
|
||||
@override
|
||||
State<ViewVisitDetailWidget> createState() => _ViewVisitDetailWidgetState();
|
||||
}
|
||||
|
||||
List<dynamic>? findVisitorById(List<dynamic>? jsonList, String? id) {
|
||||
if (jsonList == null || id == null) return null;
|
||||
try {
|
||||
var foundItem = jsonList.firstWhere(
|
||||
(item) => item["VAW_ID"] == id,
|
||||
orElse: () => null,
|
||||
);
|
||||
return foundItem != null ? [foundItem] : null;
|
||||
} catch (e) {
|
||||
log("Error searching item: $e");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||
late ViewVisitDetailModel _model;
|
||||
bool isLoading = true;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => ViewVisitDetailModel());
|
||||
|
||||
// On component load action.
|
||||
// SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
// if (widget.visitStatusStr != null) {
|
||||
// _model.visitStatusColor = await action_blocks.manageStatusColorAction(
|
||||
// context,
|
||||
// visitStatusStr: widget.visitStatusStr!,
|
||||
// );
|
||||
// }
|
||||
// });
|
||||
|
||||
_model.textController1 = TextEditingController(
|
||||
text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? '');
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
||||
_model.textController2 ??=
|
||||
TextEditingController(text: widget.visitStartDate);
|
||||
_model.textFieldFocusNode2 ??= FocusNode();
|
||||
|
||||
_model.textController3 ??=
|
||||
TextEditingController(text: widget.visitEndDate);
|
||||
_model.textFieldFocusNode3 ??= FocusNode();
|
||||
|
||||
_model.textController4 ??=
|
||||
TextEditingController(text: widget.visitReasonStr);
|
||||
_model.textFieldFocusNode4 ??= FocusNode();
|
||||
|
||||
_model.textController5 ??=
|
||||
TextEditingController(text: widget.visitLevelStr);
|
||||
_model.textFieldFocusNode5 ??= FocusNode();
|
||||
|
||||
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
||||
_model.textFieldFocusNode6 ??= FocusNode();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var filteredVisitorJsonList =
|
||||
findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null';
|
||||
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 35.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25.0),
|
||||
bottomRight: Radius.circular(25.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 35.0,
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
),
|
||||
),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 15.0, 0.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(
|
||||
Icons.close,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 20.0, 20.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
Navigator.pop(context);
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
useSafeArea: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child:
|
||||
const VisitorDetailsModalTemplateComponentWidget(),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
fadeOutDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
imageUrl: valueOrDefault<String>(
|
||||
widget.visitorImgPath,
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: const BoxDecoration(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 8.0, 10.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController1,
|
||||
focusNode: _model.textFieldFocusNode1,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'9yu35pzg' /* Encerramento da Visita */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
hintStyle: 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),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
validator: _model.textController1Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 10.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 8.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController2,
|
||||
focusNode: _model.textFieldFocusNode2,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'aj6scczp' /* Início */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'ub084nhy' /* dd/mm/yyyy */,
|
||||
),
|
||||
hintStyle: 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),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController2Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 8.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController3,
|
||||
focusNode: _model.textFieldFocusNode3,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'rvi5z7wg' /* Término */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'ixs67mrz' /* dd/mm/yyyy */,
|
||||
),
|
||||
hintStyle: 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),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController3Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 10.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 8.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController4,
|
||||
focusNode: _model.textFieldFocusNode4,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'yxilg7ek' /* Motivo da Visita */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'ypeydbem' /* Motivo */,
|
||||
),
|
||||
hintStyle: 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),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController4Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 8.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController5,
|
||||
focusNode: _model.textFieldFocusNode5,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'dgr3pk3a' /* Nível de Acesso */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'rs3d4gb8' /* Nível de Acesso */,
|
||||
),
|
||||
hintStyle: 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),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController5Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: const BoxDecoration(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 8.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController6,
|
||||
focusNode: _model.textFieldFocusNode6,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'lppn9rxa' /* Observações da Visita */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
hintStyle: 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),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
validator: _model.textController6Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 6.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 35.0,
|
||||
decoration: BoxDecoration(
|
||||
color: widget.visitStatusColor,
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(0.0),
|
||||
topRight: Radius.circular(0.0),
|
||||
),
|
||||
),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
if (widget.visitStatusStr == 'A') {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(
|
||||
Icons.block_sharp,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
_model.deleteVisit =
|
||||
await PhpGroup.deleteVisitCall.call(
|
||||
devUUID: FFAppState().devUUID,
|
||||
userUUID: FFAppState().userUUID,
|
||||
cliID: FFAppState().cliUUID,
|
||||
atividade: 'cancelaVisita',
|
||||
idVisita: widget.visitIdStr,
|
||||
);
|
||||
|
||||
if (PhpGroup.deleteVisitCall.error(
|
||||
(_model.deleteVisit?.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding:
|
||||
MediaQuery.viewInsetsOf(context),
|
||||
child: ThrowExceptionWidget(
|
||||
msg: PhpGroup.deleteVisitCall.msg(
|
||||
(_model.deleteVisit?.jsonBody ??
|
||||
''),
|
||||
)!,
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
FlutterFlowIconButton(
|
||||
borderColor: Colors.transparent,
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(
|
||||
Icons.share,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () {
|
||||
log('IconButton pressed ...');
|
||||
// Implement share functionality here
|
||||
Share.share(
|
||||
'Visita agendada para ${widget.visitStartDate} com término previsto para ${widget.visitEndDate}. Motivo: ${widget.visitReasonStr}. Nível de acesso: ${widget.visitLevelStr}. Observações: ${widget.visitObsStr}.',
|
||||
);
|
||||
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
} else if ((widget.visitStatusStr == 'C') ||
|
||||
(widget.visitStatusStr == 'F') ||
|
||||
(widget.visitStatusStr == 'B') ||
|
||||
(widget.visitStatusStr == 'I')) {
|
||||
return InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
Navigator.pop(context);
|
||||
|
||||
context.pushNamed(
|
||||
'scheduleCompleteVisitPage',
|
||||
queryParameters: {
|
||||
'visitStartDateStr': serializeParam(
|
||||
dateTimeFormat(
|
||||
'd/M/y H:mm:ss',
|
||||
getCurrentTimestamp,
|
||||
locale: FFLocalizations.of(context)
|
||||
.languageCode,
|
||||
),
|
||||
ParamType.String,
|
||||
),
|
||||
'visitEndDateStr': serializeParam(
|
||||
'',
|
||||
ParamType.String,
|
||||
),
|
||||
'visitReasonStr': serializeParam(
|
||||
widget.visitReasonStr,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitLevelStr': serializeParam(
|
||||
widget.visitLevelStr,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitTempBol': serializeParam(
|
||||
widget.visitTempStr == 'Sim' ? true : false,
|
||||
ParamType.bool,
|
||||
),
|
||||
'visitObsStr': serializeParam(
|
||||
widget.visitObsStr,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitorStrList': serializeParam(
|
||||
widget.visitorStrList,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitorJsonList': serializeParam(
|
||||
filteredVisitorJsonList,
|
||||
ParamType.JSON,
|
||||
isList: true,
|
||||
),
|
||||
}.withoutNulls,
|
||||
);
|
||||
},
|
||||
child: Icon(
|
||||
Icons.repeat,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
size: 24.0,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.secondaryBackground,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -77,7 +77,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
name: 'homePage',
|
||||
path: '/homePage',
|
||||
builder: (context, params) => params.isEmpty
|
||||
? const NavBarPage(initialPage: 'homePage')
|
||||
? const HomePageWidget()
|
||||
: const HomePageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
|
@ -194,13 +194,13 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
path: '/preferencesPage',
|
||||
builder: (context, params) => const PreferencesPageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'settingsPage',
|
||||
path: '/settingsPage',
|
||||
builder: (context, params) => params.isEmpty
|
||||
? const NavBarPage(initialPage: 'settingsPage')
|
||||
: const SettingsPageWidget(),
|
||||
)
|
||||
// FFRoute(
|
||||
// name: 'settingsPage',
|
||||
// path: '/settingsPage',
|
||||
// builder: (context, params) => params.isEmpty
|
||||
// ? const NavBarPage(initialPage: 'settingsPage')
|
||||
// : const SettingsPageWidget(),
|
||||
// )
|
||||
].map((r) => r.toRoute(appStateNotifier)).toList(),
|
||||
);
|
||||
|
||||
|
|
|
@ -25,4 +25,3 @@ export '/pages/sign_up_page/sign_up_page_widget.dart' show SignUpPageWidget;
|
|||
export '/pages/welcome_page/welcome_page_widget.dart' show WelcomePageWidget;
|
||||
export '/pages/qr_code_page/qr_code_page_widget.dart' show QrCodePageWidget;
|
||||
export '/pages/preferences_settings_page/preferences_settings_widget.dart' show PreferencesPageWidget;
|
||||
export '/pages/settings_page/settings_page_widget.dart' show SettingsPageWidget;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,27 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'preferences_page_widget.dart' show PreferencesPageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PreferencesPageModel extends FlutterFlowModel<PreferencesPageWidget> {
|
||||
/// Local state fields for this page.
|
||||
|
||||
bool fingerprint = false;
|
||||
|
||||
bool? person;
|
||||
|
||||
bool? changPass;
|
||||
|
||||
bool? notify;
|
||||
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
}
|
||||
}
|
|
@ -1,167 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'preferences_page_model.dart';
|
||||
export 'preferences_page_model.dart';
|
||||
|
||||
class PreferencesPageWidget extends StatefulWidget {
|
||||
const PreferencesPageWidget({super.key});
|
||||
|
||||
@override
|
||||
State<PreferencesPageWidget> createState() => _PreferencesPageWidgetState();
|
||||
}
|
||||
|
||||
class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
|
||||
late PreferencesPageModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => PreferencesPageModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.dispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
appBar: AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'1vyj6y7n' /* Preferencias */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 17.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
actions: const [],
|
||||
centerTitle: true,
|
||||
elevation: 0.0,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 0.0),
|
||||
child: GridView(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
0,
|
||||
20.0,
|
||||
0,
|
||||
20.0,
|
||||
),
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
crossAxisSpacing: 10.0,
|
||||
mainAxisSpacing: 10.0,
|
||||
childAspectRatio: 1.0,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
children: [
|
||||
FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: double.infinity,
|
||||
fillColor: FlutterFlowTheme.of(context).primary,
|
||||
disabledColor: FlutterFlowTheme.of(context).alternate,
|
||||
disabledIconColor: FlutterFlowTheme.of(context).primary,
|
||||
icon: Icon(
|
||||
Icons.fingerprint,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
size: 40.0,
|
||||
),
|
||||
onPressed: _model.fingerprint
|
||||
? null
|
||||
: () {
|
||||
print('IconButton pressed ...');
|
||||
},
|
||||
),
|
||||
FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
fillColor: FlutterFlowTheme.of(context).primary,
|
||||
disabledColor: FlutterFlowTheme.of(context).alternate,
|
||||
disabledIconColor: FlutterFlowTheme.of(context).primary,
|
||||
icon: Icon(
|
||||
Icons.person,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
size: 40.0,
|
||||
),
|
||||
onPressed: _model.person!
|
||||
? null
|
||||
: () {
|
||||
print('IconButton pressed ...');
|
||||
},
|
||||
),
|
||||
FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
fillColor: FlutterFlowTheme.of(context).primary,
|
||||
disabledColor: FlutterFlowTheme.of(context).alternate,
|
||||
disabledIconColor: FlutterFlowTheme.of(context).primary,
|
||||
icon: Icon(
|
||||
Icons.notifications_active,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
size: 40.0,
|
||||
),
|
||||
onPressed: _model.notify!
|
||||
? null
|
||||
: () {
|
||||
print('IconButton pressed ...');
|
||||
},
|
||||
),
|
||||
FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
fillColor: FlutterFlowTheme.of(context).primary,
|
||||
disabledColor: FlutterFlowTheme.of(context).alternate,
|
||||
disabledIconColor: FlutterFlowTheme.of(context).primary,
|
||||
icon: Icon(
|
||||
Icons.password_sharp,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
size: 40.0,
|
||||
),
|
||||
onPressed: _model.changPass!
|
||||
? null
|
||||
: () {
|
||||
print('IconButton pressed ...');
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'settings_page_widget.dart' show SettingsPageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SettingsPageModel extends FlutterFlowModel<SettingsPageWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
}
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'settings_page_model.dart';
|
||||
export 'settings_page_model.dart';
|
||||
|
||||
class SettingsPageWidget extends StatefulWidget {
|
||||
const SettingsPageWidget({super.key});
|
||||
|
||||
@override
|
||||
State<SettingsPageWidget> createState() => _SettingsPageWidgetState();
|
||||
}
|
||||
|
||||
class _SettingsPageWidgetState extends State<SettingsPageWidget> {
|
||||
late SettingsPageModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => SettingsPageModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.dispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
appBar: AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'bc698859' /* Preferencias */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 17.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
actions: const [],
|
||||
centerTitle: true,
|
||||
elevation: 0.0,
|
||||
),
|
||||
body: const SafeArea(
|
||||
top: true,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@ import 'package:flutter/scheduler.dart';
|
|||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||
import 'package:hub/backend/api_requests/api_manager.dart';
|
||||
|
||||
import 'package:hub/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
|
||||
import 'package:hub/flutter_flow/custom_functions.dart';
|
||||
|
|
Loading…
Reference in New Issue