some changes
This commit is contained in:
parent
e30337b167
commit
b23ab9c2ac
File diff suppressed because one or more lines are too long
|
@ -1,14 +1,25 @@
|
||||||
import '/flutter_flow/flutter_flow_animations.dart';
|
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
|
||||||
|
import '/flutter_flow/flutter_flow_animations.dart';
|
||||||
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'option_selection_modal_model.dart';
|
import 'option_selection_modal_model.dart';
|
||||||
|
|
||||||
export 'option_selection_modal_model.dart';
|
export 'option_selection_modal_model.dart';
|
||||||
|
|
||||||
class OptionSelectionModalWidget extends StatefulWidget {
|
class OptionSelectionModalWidget extends StatefulWidget {
|
||||||
const OptionSelectionModalWidget({super.key});
|
const OptionSelectionModalWidget({
|
||||||
|
super.key,
|
||||||
|
this.routesListStr,
|
||||||
|
this.iconsListIcon,
|
||||||
|
this.nameListStr,
|
||||||
|
});
|
||||||
|
|
||||||
|
final List<String>? routesListStr;
|
||||||
|
final List<IconData?>? iconsListIcon;
|
||||||
|
final List<String>? nameListStr;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<OptionSelectionModalWidget> createState() =>
|
State<OptionSelectionModalWidget> createState() =>
|
||||||
|
@ -57,43 +68,39 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return Padding(
|
||||||
splashColor: Colors.transparent,
|
padding: const EdgeInsets.all(8.0),
|
||||||
focusColor: Colors.transparent,
|
child: GestureDetector(
|
||||||
hoverColor: Colors.transparent,
|
onTap: () async {
|
||||||
highlightColor: Colors.transparent,
|
Navigator.pop(context);
|
||||||
onTap: () async {
|
},
|
||||||
Navigator.pop(context);
|
child: Align(
|
||||||
},
|
alignment: Alignment.center,
|
||||||
child: Column(
|
child: GridView.builder(
|
||||||
mainAxisSize: MainAxisSize.max,
|
padding: EdgeInsets.zero,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
children: [
|
crossAxisCount: 3,
|
||||||
Align(
|
crossAxisSpacing: 10.0,
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
mainAxisSpacing: 100.0,
|
||||||
child: Wrap(
|
mainAxisExtent: 120.0,
|
||||||
spacing: 17.0,
|
childAspectRatio: 10,
|
||||||
runSpacing: 0.0,
|
),
|
||||||
alignment: WrapAlignment.start,
|
scrollDirection: Axis.vertical,
|
||||||
crossAxisAlignment: WrapCrossAlignment.start,
|
shrinkWrap: true,
|
||||||
direction: Axis.horizontal,
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
runAlignment: WrapAlignment.start,
|
itemCount: widget.routesListStr!.length,
|
||||||
verticalDirection: VerticalDirection.down,
|
itemBuilder: (context, optionsListIndex) {
|
||||||
clipBehavior: Clip.none,
|
return GestureDetector(
|
||||||
children: [
|
onTap: () async {
|
||||||
InkWell(
|
Navigator.pop(context);
|
||||||
splashColor: Colors.transparent,
|
|
||||||
focusColor: Colors.transparent,
|
|
||||||
hoverColor: Colors.transparent,
|
|
||||||
highlightColor: Colors.transparent,
|
|
||||||
onTap: () async {
|
|
||||||
Navigator.pop(context);
|
|
||||||
|
|
||||||
context.pushNamed('fastPassPage');
|
context.pushNamed(widget.routesListStr![optionsListIndex]);
|
||||||
},
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(5.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 50.0,
|
||||||
height: 100.0,
|
height: 50.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
|
@ -114,7 +121,7 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(4.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
@ -145,7 +152,8 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
alignment: const AlignmentDirectional(
|
alignment: const AlignmentDirectional(
|
||||||
0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.schedule_send,
|
widget.iconsListIcon![
|
||||||
|
optionsListIndex]!,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.accent1,
|
.accent1,
|
||||||
size: 34.0,
|
size: 34.0,
|
||||||
|
@ -167,11 +175,7 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
widget.nameListStr![optionsListIndex],
|
||||||
'bmjlmhht' /* Agenda
|
|
||||||
Rapida */
|
|
||||||
,
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context)
|
||||||
.titleLarge
|
.titleLarge
|
||||||
.override(
|
.override(
|
||||||
|
@ -194,254 +198,10 @@ Rapida */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
InkWell(
|
);
|
||||||
splashColor: Colors.transparent,
|
},
|
||||||
focusColor: Colors.transparent,
|
).animateOnPageLoad(animationsMap['wrapOnPageLoadAnimation']!),
|
||||||
hoverColor: Colors.transparent,
|
),
|
||||||
highlightColor: Colors.transparent,
|
|
||||||
onTap: () async {
|
|
||||||
Navigator.pop(context);
|
|
||||||
|
|
||||||
context.pushNamed(
|
|
||||||
'scheduleProvisionalVisitPage',
|
|
||||||
extra: <String, dynamic>{
|
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
|
||||||
hasTransition: true,
|
|
||||||
transitionType: PageTransitionType.scale,
|
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
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.hourglass_bottom,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.accent1,
|
|
||||||
size: 34.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(
|
|
||||||
'ci8eyh2v' /* Agenda
|
|
||||||
Provisória */
|
|
||||||
,
|
|
||||||
),
|
|
||||||
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 {
|
|
||||||
Navigator.pop(context);
|
|
||||||
|
|
||||||
context.pushNamed(
|
|
||||||
'scheduleCompleteVisitPage',
|
|
||||||
extra: <String, dynamic>{
|
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
|
||||||
hasTransition: true,
|
|
||||||
transitionType: PageTransitionType.scale,
|
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
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.scale,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.accent1,
|
|
||||||
size: 34.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(
|
|
||||||
'jj2b545b' /* Agenda
|
|
||||||
Completa */
|
|
||||||
,
|
|
||||||
),
|
|
||||||
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)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
).animateOnPageLoad(animationsMap['wrapOnPageLoadAnimation']!),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
import '/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
||||||
import '/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
|
import '/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
|
||||||
import '/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
|
import '/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'menu_component_widget.dart' show MenuComponentWidget;
|
import 'menu_component_widget.dart' show MenuComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
/// Local state fields for this component.
|
/// Local state fields for this component.
|
||||||
|
@ -14,6 +15,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
|
|
||||||
// Model for menuListViewComponent.
|
// Model for menuListViewComponent.
|
||||||
late MenuListViewComponentModel menuListViewComponentModel;
|
late MenuListViewComponentModel menuListViewComponentModel;
|
||||||
|
|
||||||
// Model for menuStaggeredViewComponent.
|
// Model for menuStaggeredViewComponent.
|
||||||
late MenuStaggeredViewComponentModel menuStaggeredViewComponentModel;
|
late MenuStaggeredViewComponentModel menuStaggeredViewComponentModel;
|
||||||
|
|
||||||
|
@ -45,7 +47,32 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child: const OptionSelectionModalWidget(),
|
child: OptionSelectionModalWidget(
|
||||||
|
routesListStr: <String>[
|
||||||
|
'scheduleProvisionalVisitPage',
|
||||||
|
'scheduleCompleteVisitPage',
|
||||||
|
'fastPassPage',
|
||||||
|
],
|
||||||
|
iconsListIcon: <IconData>[
|
||||||
|
Icons.date_range_rounded,
|
||||||
|
Icons.date_range_rounded,
|
||||||
|
Icons.date_range_rounded,
|
||||||
|
],
|
||||||
|
nameListStr: <String>[
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Visita\nCompleta',
|
||||||
|
enText: 'Complete\nSchedule',
|
||||||
|
),
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Visita\nProvisória',
|
||||||
|
enText: 'Provisional\nSchedule',
|
||||||
|
),
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Visita\nRápida',
|
||||||
|
enText: 'Fast\nSchedule',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -90,14 +117,41 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future liberationHistoryOptAction(BuildContext context) async {
|
Future liberationHistoryOptAction(BuildContext context) async {
|
||||||
context.pushNamed(
|
await showModalBottomSheet(
|
||||||
'liberationHistory',
|
isScrollControlled: true,
|
||||||
extra: <String, dynamic>{
|
backgroundColor: Colors.transparent,
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
enableDrag: false,
|
||||||
hasTransition: true,
|
context: context,
|
||||||
transitionType: PageTransitionType.scale,
|
builder: (context) {
|
||||||
alignment: Alignment.bottomCenter,
|
return Padding(
|
||||||
),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
|
child: OptionSelectionModalWidget(
|
||||||
|
routesListStr: <String>[
|
||||||
|
'liberationHistory',
|
||||||
|
'acessHistoryPage',
|
||||||
|
'scheduleCompleteVisitPage',
|
||||||
|
],
|
||||||
|
iconsListIcon: <IconData>[
|
||||||
|
Icons.history_rounded,
|
||||||
|
Icons.history_rounded,
|
||||||
|
Icons.history_rounded,
|
||||||
|
],
|
||||||
|
nameListStr: <String>[
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Histórico\nde Liberação',
|
||||||
|
enText: 'Liberation\nHistory',
|
||||||
|
),
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Histórico\nde Acesso',
|
||||||
|
enText: 'Access\nHistory',
|
||||||
|
),
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Histórico\nde Visita',
|
||||||
|
enText: 'Visit\nHistory',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'menu_list_view_component_model.dart';
|
import 'menu_list_view_component_model.dart';
|
||||||
|
|
||||||
export 'menu_list_view_component_model.dart';
|
export 'menu_list_view_component_model.dart';
|
||||||
|
|
||||||
class MenuListViewComponentWidget extends StatefulWidget {
|
class MenuListViewComponentWidget extends StatefulWidget {
|
||||||
|
@ -80,7 +82,8 @@ class _MenuListViewComponentWidgetState
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 10.0, 0.0, 20.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -129,8 +132,8 @@ class _MenuListViewComponentWidgetState
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional
|
||||||
8.0, 0.0, 0.0, 0.0),
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -139,8 +142,8 @@ class _MenuListViewComponentWidgetState
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.kvector1,
|
FFIcons.kvector1,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
|
@ -161,10 +164,11 @@ class _MenuListViewComponentWidgetState
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'utgue9a5' /* Agendar
|
'utgue9a5' /* Agendar
|
||||||
Visita */
|
Visita */
|
||||||
,
|
,
|
||||||
),
|
),
|
||||||
|
@ -192,7 +196,8 @@ Visita */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 10.0, 0.0, 20.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -241,8 +246,8 @@ Visita */
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional
|
||||||
8.0, 0.0, 0.0, 0.0),
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -251,8 +256,8 @@ Visita */
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.kvector,
|
FFIcons.kvector,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
|
@ -273,7 +278,8 @@ Visita */
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'82b5f8yz' /* Cadastrar
|
'82b5f8yz' /* Cadastrar
|
||||||
|
@ -304,7 +310,8 @@ Visitante */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 10.0, 0.0, 20.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
|
@ -342,10 +349,12 @@ Visitante */
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding:
|
||||||
8.0, 0.0, 0.0, 0.0),
|
const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -354,8 +363,8 @@ Visitante */
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.khome,
|
FFIcons.khome,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
|
@ -376,10 +385,11 @@ Visitante */
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
't4ie13ut' /* Vincular
|
't4ie13ut' /* Vincular
|
||||||
Condomínio */
|
Condomínio */
|
||||||
,
|
,
|
||||||
),
|
),
|
||||||
|
@ -406,7 +416,8 @@ Condomínio */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 10.0, 0.0, 20.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
|
@ -444,10 +455,12 @@ Condomínio */
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding:
|
||||||
8.0, 0.0, 0.0, 0.0),
|
const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -456,8 +469,8 @@ Condomínio */
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.kpets,
|
FFIcons.kpets,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
|
@ -478,10 +491,11 @@ Condomínio */
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'n3n76pha' /* Cadastrar
|
'n3n76pha' /* Cadastrar
|
||||||
Pet */
|
Pet */
|
||||||
,
|
,
|
||||||
),
|
),
|
||||||
|
@ -508,7 +522,8 @@ Pet */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 10.0, 0.0, 20.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
|
@ -546,10 +561,12 @@ Pet */
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding:
|
||||||
8.0, 0.0, 0.0, 0.0),
|
const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -558,8 +575,8 @@ Pet */
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.kvector2,
|
FFIcons.kvector2,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
|
@ -580,10 +597,11 @@ Pet */
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'l6b9o7yn' /* QR Code
|
'l6b9o7yn' /* QR Code
|
||||||
de Acesso */
|
de Acesso */
|
||||||
,
|
,
|
||||||
),
|
),
|
||||||
|
@ -610,7 +628,8 @@ de Acesso */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 10.0, 0.0, 20.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -659,8 +678,8 @@ de Acesso */
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional
|
||||||
8.0, 0.0, 0.0, 0.0),
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -669,8 +688,8 @@ de Acesso */
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.people,
|
Icons.people,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
|
@ -691,7 +710,8 @@ de Acesso */
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'rxnrtdau' /* Pessoas na
|
'rxnrtdau' /* Pessoas na
|
||||||
|
@ -722,119 +742,8 @@ Propriedade */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
child: InkWell(
|
0.0, 10.0, 0.0, 20.0),
|
||||||
splashColor: Colors.transparent,
|
|
||||||
focusColor: Colors.transparent,
|
|
||||||
hoverColor: Colors.transparent,
|
|
||||||
highlightColor: Colors.transparent,
|
|
||||||
onTap: () async {
|
|
||||||
await widget.acessHistoryOptAction?.call();
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 100.0,
|
|
||||||
height: double.infinity,
|
|
||||||
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).getText(
|
|
||||||
'nxssjz3q' /* Histórico
|
|
||||||
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)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -883,8 +792,8 @@ de Acesso */
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional
|
||||||
8.0, 0.0, 0.0, 0.0),
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -893,8 +802,8 @@ de Acesso */
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.history_sharp,
|
Icons.history_sharp,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
|
@ -915,12 +824,13 @@ de Acesso */
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context)
|
||||||
'944g4ib1' /* Histórico
|
.getVariableText(
|
||||||
de Liberação */
|
ptText: 'Consultar\nHistóricos',
|
||||||
,
|
enText: 'Consult\nHistories',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context)
|
||||||
.titleLarge
|
.titleLarge
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
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:flutter/material.dart';
|
||||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
|
||||||
|
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'menu_staggered_view_component_model.dart';
|
import 'menu_staggered_view_component_model.dart';
|
||||||
|
|
||||||
export 'menu_staggered_view_component_model.dart';
|
export 'menu_staggered_view_component_model.dart';
|
||||||
|
|
||||||
class MenuStaggeredViewComponentWidget extends StatefulWidget {
|
class MenuStaggeredViewComponentWidget extends StatefulWidget {
|
||||||
|
@ -73,12 +75,13 @@ class _MenuStaggeredViewComponentWidgetState
|
||||||
padding: const EdgeInsets.all(14.0),
|
padding: const EdgeInsets.all(14.0),
|
||||||
child: MasonryGridView.builder(
|
child: MasonryGridView.builder(
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
gridDelegate: const SliverSimpleGridDelegateWithFixedCrossAxisCount(
|
gridDelegate:
|
||||||
|
const SliverSimpleGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
),
|
),
|
||||||
crossAxisSpacing: 10.0,
|
crossAxisSpacing: 10.0,
|
||||||
mainAxisSpacing: 10.0,
|
mainAxisSpacing: 10.0,
|
||||||
itemCount: 8,
|
itemCount: 7,
|
||||||
padding: const EdgeInsets.fromLTRB(
|
padding: const EdgeInsets.fromLTRB(
|
||||||
0,
|
0,
|
||||||
10.0,
|
10.0,
|
||||||
|
@ -128,19 +131,19 @@ class _MenuStaggeredViewComponentWidgetState
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
8.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -150,8 +153,9 @@ class _MenuStaggeredViewComponentWidgetState
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment: const AlignmentDirectional(
|
alignment:
|
||||||
0.0, 0.0),
|
const AlignmentDirectional(
|
||||||
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.kvector1,
|
FFIcons.kvector1,
|
||||||
color:
|
color:
|
||||||
|
@ -167,17 +171,18 @@ class _MenuStaggeredViewComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'ee33l0ms' /* Agendar
|
'ee33l0ms' /* Agendar
|
||||||
Visita */
|
Visita */
|
||||||
,
|
,
|
||||||
),
|
),
|
||||||
|
@ -245,19 +250,19 @@ Visita */
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
8.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -267,8 +272,9 @@ Visita */
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment: const AlignmentDirectional(
|
alignment:
|
||||||
0.0, 0.0),
|
const AlignmentDirectional(
|
||||||
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.kvector,
|
FFIcons.kvector,
|
||||||
color:
|
color:
|
||||||
|
@ -284,14 +290,15 @@ Visita */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'ya37l3jt' /* Cadastrar
|
'ya37l3jt' /* Cadastrar
|
||||||
|
@ -359,12 +366,11 @@ Visita */
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
8.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -375,7 +381,8 @@ Visita */
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
const AlignmentDirectional(
|
||||||
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.khome,
|
FFIcons.khome,
|
||||||
color:
|
color:
|
||||||
|
@ -397,7 +404,8 @@ Visita */
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'h8s3adu8' /* Vincular
|
'h8s3adu8' /* Vincular
|
||||||
|
@ -464,12 +472,11 @@ Condomínio */
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
8.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -480,7 +487,8 @@ Condomínio */
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
const AlignmentDirectional(
|
||||||
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.kpets,
|
FFIcons.kpets,
|
||||||
color:
|
color:
|
||||||
|
@ -502,7 +510,8 @@ Condomínio */
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'j6tfixen' /* Cadastrar
|
'j6tfixen' /* Cadastrar
|
||||||
|
@ -569,12 +578,11 @@ Pet */
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
8.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -585,7 +593,8 @@ Pet */
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
const AlignmentDirectional(
|
||||||
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
FFIcons.kvector2,
|
FFIcons.kvector2,
|
||||||
color:
|
color:
|
||||||
|
@ -607,7 +616,8 @@ Pet */
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'9tli4i2x' /* QR Code
|
'9tli4i2x' /* QR Code
|
||||||
|
@ -677,19 +687,19 @@ de Acesso */
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
8.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -699,8 +709,9 @@ de Acesso */
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment: const AlignmentDirectional(
|
alignment:
|
||||||
0.0, 0.0),
|
const AlignmentDirectional(
|
||||||
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.people,
|
Icons.people,
|
||||||
color:
|
color:
|
||||||
|
@ -716,14 +727,15 @@ de Acesso */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'i22hecs8' /* Pessoas na
|
'i22hecs8' /* Pessoas na
|
||||||
|
@ -754,123 +766,6 @@ Propriedade */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
() => InkWell(
|
|
||||||
splashColor: Colors.transparent,
|
|
||||||
focusColor: Colors.transparent,
|
|
||||||
hoverColor: Colors.transparent,
|
|
||||||
highlightColor: Colors.transparent,
|
|
||||||
onTap: () async {
|
|
||||||
await widget.accessHistoryOptAction?.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).getText(
|
|
||||||
'6jzghbyi' /* Histórico
|
|
||||||
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(
|
() => InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -911,19 +806,19 @@ de Acesso */
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
8.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
@ -933,8 +828,9 @@ de Acesso */
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment: const AlignmentDirectional(
|
alignment:
|
||||||
0.0, 0.0),
|
const AlignmentDirectional(
|
||||||
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.history_sharp,
|
Icons.history_sharp,
|
||||||
color:
|
color:
|
||||||
|
@ -950,19 +846,20 @@ de Acesso */
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context)
|
||||||
'u8qu4v6q' /* Histórico
|
.getVariableText(
|
||||||
de Liberação */
|
enText: 'Consult\nHistories',
|
||||||
,
|
ptText: 'Consultar\nHistóricos',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context)
|
||||||
.titleLarge
|
.titleLarge
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:f_r_e_hub/pages/acess_history_page/acess_history_page_widget.dart';
|
|
||||||
import 'package:f_r_e_hub/pages/fast_pass_page/fast_pass_page_widget.dart';
|
import 'package:f_r_e_hub/pages/fast_pass_page/fast_pass_page_widget.dart';
|
||||||
import 'package:f_r_e_hub/pages/test_page/test_page.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '/backend/schema/structs/index.dart';
|
import '/backend/schema/structs/index.dart';
|
||||||
|
|
||||||
import '/index.dart';
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import '/index.dart';
|
||||||
|
import '../../pages/visit_history_page/visit_history_page_widget.dart';
|
||||||
|
|
||||||
export 'package:go_router/go_router.dart';
|
export 'package:go_router/go_router.dart';
|
||||||
|
|
||||||
export 'serialization_util.dart';
|
export 'serialization_util.dart';
|
||||||
|
|
||||||
const kTransitionInfoKey = '__transition_info__';
|
const kTransitionInfoKey = '__transition_info__';
|
||||||
|
@ -73,6 +72,11 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
||||||
path: '/homePage',
|
path: '/homePage',
|
||||||
builder: (context, params) => const HomePageWidget(),
|
builder: (context, params) => const HomePageWidget(),
|
||||||
),
|
),
|
||||||
|
FFRoute(
|
||||||
|
name: 'visitHistoryPage',
|
||||||
|
path: '/visitHistoryPage',
|
||||||
|
builder: (context, params) => const VisitHistoryPageWidget(),
|
||||||
|
),
|
||||||
FFRoute(
|
FFRoute(
|
||||||
name: 'registerVisitorPage',
|
name: 'registerVisitorPage',
|
||||||
path: '/registerVisitorPage',
|
path: '/registerVisitorPage',
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:rxdart/rxdart.dart';
|
import 'package:rxdart/rxdart.dart';
|
||||||
|
|
||||||
import '/backend/api_requests/api_calls.dart';
|
import '/backend/api_requests/api_calls.dart';
|
||||||
import '/components/molecular_components/opt_modal/opt_modal_widget.dart';
|
import '/components/molecular_components/opt_modal/opt_modal_widget.dart';
|
||||||
|
import '/flutter_flow/custom_functions.dart' as functions;
|
||||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/custom_functions.dart' as functions;
|
import '../../components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'acess_history_page_model.dart';
|
import 'acess_history_page_model.dart';
|
||||||
|
|
||||||
export 'acess_history_page_model.dart';
|
export 'acess_history_page_model.dart';
|
||||||
|
|
||||||
@immutable
|
@immutable
|
||||||
|
@ -304,39 +306,37 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
||||||
|
|
||||||
Widget _accessHistoryCardMoleculeWidget(
|
Widget _accessHistoryCardMoleculeWidget(
|
||||||
BuildContext context, dynamic accessHistoryItem) {
|
BuildContext context, dynamic accessHistoryItem) {
|
||||||
var tipoPessoa =
|
return CardItemTemplateComponentWidget(
|
||||||
getJsonField(accessHistoryItem, r'''$.PES_TIPO''').toString();
|
imageHashMap: Map<String, String>.from({
|
||||||
var documentoPessoa =
|
'key': accessHistoryItem['PES_ID'] ?? '',
|
||||||
getJsonField(accessHistoryItem, r'''$.PES_ID''').toString();
|
'value': accessHistoryItem['PES_TIPO'] ?? '',
|
||||||
var corFundoTipo = tipoPessoa == 'E'
|
}),
|
||||||
? FlutterFlowTheme.of(context).primary
|
labelsHashMap: Map<String, String>.from({
|
||||||
: FlutterFlowTheme.of(context).warning;
|
'Nome:': accessHistoryItem['PES_NOME'] ?? '',
|
||||||
debugPrint('Tipo de Pessoa: $tipoPessoa');
|
'Entrada:': accessHistoryItem['ACE_DATAHORA'] ?? '',
|
||||||
debugPrint('Documento da Pessoa: $documentoPessoa');
|
'Setor:': accessHistoryItem['ACI_DESCRICAO'] ?? '',
|
||||||
var urlImagem = imageUrlAtomWidget(documentoPessoa, tipoPessoa);
|
}),
|
||||||
return Card(
|
statusHashMap: accessHistoryItem['NOT_STATUS'] == 'L'
|
||||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
? Map<String, Color>.from({
|
||||||
color: FlutterFlowTheme.of(context).secondaryBackground,
|
FFLocalizations.of(context).getVariableText(
|
||||||
shape: RoundedRectangleBorder(
|
ptText: 'Ativo',
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
enText: 'Active',
|
||||||
),
|
): FlutterFlowTheme.of(context).success,
|
||||||
child: Container(
|
})
|
||||||
width: 350.0,
|
: accessHistoryItem['NOT_STATUS'] == 'B'
|
||||||
height: 128.0,
|
? Map<String, Color>.from({
|
||||||
decoration: BoxDecoration(
|
FFLocalizations.of(context).getVariableText(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
ptText: 'Bloqueado',
|
||||||
),
|
enText: 'Blocked',
|
||||||
child: Column(
|
): FlutterFlowTheme.of(context).error,
|
||||||
mainAxisSize: MainAxisSize.max,
|
})
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
: Map<String, Color>.from({
|
||||||
children: [
|
FFLocalizations.of(context).getVariableText(
|
||||||
_cardHeaderAtomWidget(context, urlImagem, tipoPessoa, corFundoTipo,
|
ptText: 'Pendente',
|
||||||
accessHistoryItem),
|
enText: 'Pending',
|
||||||
_cardDetailsMoleculeWidget(context, accessHistoryItem),
|
): FlutterFlowTheme.of(context).warning,
|
||||||
],
|
}),
|
||||||
),
|
onTapCardItemAction: () async {});
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,21 @@
|
||||||
// import 'package:f_r_e_hub/backend/push_notification/pushNotification.dart';
|
// import 'package:f_r_e_hub/backend/push_notification/pushNotification.dart';
|
||||||
import 'package:f_r_e_hub/backend/push_notification/pushNotificationService.dart';
|
import 'package:f_r_e_hub/backend/push_notification/pushNotificationService.dart';
|
||||||
import 'package:f_r_e_hub/backend/push_notification/tapNotifcationActivity.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:f_r_e_hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
|
import 'package:flutter/scheduler.dart';
|
||||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
|
import '/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
|
||||||
import '/components/organism_components/local_profile_component/local_profile_component_widget.dart';
|
import '/components/organism_components/local_profile_component/local_profile_component_widget.dart';
|
||||||
import '/components/organism_components/menu_component/menu_component_widget.dart';
|
import '/components/organism_components/menu_component/menu_component_widget.dart';
|
||||||
import '/components/organism_components/message_well_component/message_well_component_widget.dart';
|
import '/components/organism_components/message_well_component/message_well_component_widget.dart';
|
||||||
|
import '/flutter_flow/custom_functions.dart' as functions;
|
||||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/scheduler.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
import 'home_page_model.dart';
|
import 'home_page_model.dart';
|
||||||
|
|
||||||
export 'home_page_model.dart';
|
export 'home_page_model.dart';
|
||||||
|
|
||||||
class HomePageWidget extends StatefulWidget {
|
class HomePageWidget extends StatefulWidget {
|
||||||
|
@ -98,6 +97,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(5.0),
|
bottomLeft: Radius.circular(5.0),
|
||||||
|
@ -122,7 +122,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
@ -140,10 +140,13 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Flexible(
|
Container(
|
||||||
|
width: 150.0,
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
valueOrDefault<String>(
|
||||||
'lyiat6s2' /* NOME DO MORADOR */,
|
functions.convertToUppercase(
|
||||||
|
FFAppState().local),
|
||||||
|
'NOME DO LOCAL',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context)
|
||||||
.bodyLarge
|
.bodyLarge
|
||||||
|
@ -166,12 +169,13 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Container(
|
||||||
|
width: 50.0,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
|
|
|
@ -158,6 +158,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PreferredSizeWidget appBarScheduleCompleteVisit(BuildContext context) {
|
PreferredSizeWidget appBarScheduleCompleteVisit(BuildContext context) {
|
||||||
return AppBar(
|
return AppBar(
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -2478,4 +2479,6 @@ Widget visitHistory(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,107 @@
|
||||||
|
import 'package:f_r_e_hub/backend/api_requests/api_manager.dart';
|
||||||
|
import 'package:f_r_e_hub/flutter_flow/request_manager.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import '/flutter_flow/form_field_controller.dart';
|
||||||
|
import 'visit_history_page_widget.dart' show VisitHistoryPageWidget;
|
||||||
|
|
||||||
|
class VisitHistoryPageModel extends FlutterFlowModel<VisitHistoryPageWidget> {
|
||||||
|
final _visitHistoryManager = FutureRequestManager<ApiCallResponse>();
|
||||||
|
Future<ApiCallResponse> visitHistory({
|
||||||
|
String? uniqueQueryKey,
|
||||||
|
bool? overrideCache,
|
||||||
|
required Future<ApiCallResponse> Function() requestFn,
|
||||||
|
}) =>
|
||||||
|
_visitHistoryManager.performRequest(
|
||||||
|
uniqueQueryKey: uniqueQueryKey,
|
||||||
|
overrideCache: overrideCache,
|
||||||
|
requestFn: requestFn,
|
||||||
|
);
|
||||||
|
void clearVisitHistoryCache() => _visitHistoryManager.clear();
|
||||||
|
void clearVisitHistoryCacheKey(String? uniqueKey) =>
|
||||||
|
_visitHistoryManager.clearRequest(uniqueKey);
|
||||||
|
|
||||||
|
/// Local state fields for this page.
|
||||||
|
|
||||||
|
List<dynamic> visitorJsonList = [];
|
||||||
|
void addToVisitorJsonList(dynamic item) => visitorJsonList.add(item);
|
||||||
|
void removeFromVisitorJsonList(dynamic item) => visitorJsonList.remove(item);
|
||||||
|
void removeAtIndexFromVisitorJsonList(int index) =>
|
||||||
|
visitorJsonList.removeAt(index);
|
||||||
|
void insertAtIndexInVisitorJsonList(int index, dynamic item) =>
|
||||||
|
visitorJsonList.insert(index, item);
|
||||||
|
void updateVisitorJsonListAtIndex(int index, Function(dynamic) updateFn) =>
|
||||||
|
visitorJsonList[index] = updateFn(visitorJsonList[index]);
|
||||||
|
|
||||||
|
String visitorStrList = '0';
|
||||||
|
|
||||||
|
/// State fields for stateful widgets in this page.
|
||||||
|
|
||||||
|
final unfocusNode = FocusNode();
|
||||||
|
// State field(s) for TabBar widget.
|
||||||
|
TabController? tabBarController;
|
||||||
|
int get tabBarCurrentIndex =>
|
||||||
|
tabBarController != null ? tabBarController!.index : 0;
|
||||||
|
|
||||||
|
// State field(s) for TextField widget.
|
||||||
|
FocusNode? textFieldFocusNode1;
|
||||||
|
TextEditingController? textController1;
|
||||||
|
String? Function(BuildContext, String?)? textController1Validator;
|
||||||
|
DateTime? datePicked1;
|
||||||
|
// State field(s) for TextField widget.
|
||||||
|
FocusNode? textFieldFocusNode2;
|
||||||
|
TextEditingController? textController2;
|
||||||
|
String? Function(BuildContext, String?)? textController2Validator;
|
||||||
|
DateTime? datePicked2;
|
||||||
|
// State field(s) for DropDown widget.
|
||||||
|
String? dropDownValue1;
|
||||||
|
FormFieldController<String>? dropDownValueController1;
|
||||||
|
// State field(s) for DropDown widget.
|
||||||
|
String? dropDownValue2;
|
||||||
|
FormFieldController<String>? dropDownValueController2;
|
||||||
|
// State field(s) for Switch widget.
|
||||||
|
bool? switchValue;
|
||||||
|
// State field(s) for TextField widget.
|
||||||
|
FocusNode? textFieldFocusNode3;
|
||||||
|
TextEditingController? textController3;
|
||||||
|
String? Function(BuildContext, String?)? textController3Validator;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
unfocusNode.dispose();
|
||||||
|
tabBarController?.dispose();
|
||||||
|
textFieldFocusNode1?.dispose();
|
||||||
|
textController1?.dispose();
|
||||||
|
|
||||||
|
textFieldFocusNode2?.dispose();
|
||||||
|
textController2?.dispose();
|
||||||
|
|
||||||
|
textFieldFocusNode3?.dispose();
|
||||||
|
textController3?.dispose();
|
||||||
|
|
||||||
|
clearVisitHistoryCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Action blocks.
|
||||||
|
Future getVisitorsActionPage(
|
||||||
|
BuildContext context, {
|
||||||
|
List<dynamic>? visitorsJsonList,
|
||||||
|
}) async {
|
||||||
|
visitorJsonList = visitorsJsonList!.toList().cast<dynamic>();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<bool> toggleCurrentSelectionHeader(
|
||||||
|
BuildContext context, {
|
||||||
|
required bool? toggleIndexValue,
|
||||||
|
}) async {
|
||||||
|
if (toggleIndexValue == true) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,752 @@
|
||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:f_r_e_hub/pages/visit_history_page/visit_history_page_model.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/scheduler.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '/flutter_flow/custom_functions.dart' as functions;
|
||||||
|
import '../../backend/api_requests/api_calls.dart';
|
||||||
|
import '../../components/templates_components/visit_details_modal_template_component/visit_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';
|
||||||
|
|
||||||
|
class VisitHistoryPageWidget extends StatefulWidget {
|
||||||
|
const VisitHistoryPageWidget({
|
||||||
|
super.key,
|
||||||
|
this.visitorStrList,
|
||||||
|
this.visitStartDateStr,
|
||||||
|
this.visitEndDateStr,
|
||||||
|
this.visitReasonStr,
|
||||||
|
this.visitLevelStr,
|
||||||
|
this.visitTempBol,
|
||||||
|
this.visitObsStr,
|
||||||
|
this.visitorJsonList,
|
||||||
|
});
|
||||||
|
|
||||||
|
final String? visitorStrList;
|
||||||
|
final String? visitStartDateStr;
|
||||||
|
final String? visitEndDateStr;
|
||||||
|
final String? visitReasonStr;
|
||||||
|
final String? visitLevelStr;
|
||||||
|
final bool? visitTempBol;
|
||||||
|
final String? visitObsStr;
|
||||||
|
final List<dynamic>? visitorJsonList;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<VisitHistoryPageWidget> createState() => _VisitHistoryPageWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _VisitHistoryPageWidgetState extends State<VisitHistoryPageWidget>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
|
late VisitHistoryPageModel _model;
|
||||||
|
int _visitHistoryLoadingIdx = 0;
|
||||||
|
final int _visitHistoryLoadingCount = 10;
|
||||||
|
List<dynamic> _visitHistoryList = [];
|
||||||
|
ScrollController _visitHistoryController = ScrollController();
|
||||||
|
|
||||||
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_model = createModel(context, () => VisitHistoryPageModel());
|
||||||
|
|
||||||
|
// On page load action.
|
||||||
|
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||||
|
if ((widget.visitorStrList != null && widget.visitorStrList != '') &&
|
||||||
|
((widget.visitorJsonList != null &&
|
||||||
|
(widget.visitorJsonList)!.isNotEmpty) !=
|
||||||
|
null)) {
|
||||||
|
_model.visitorJsonList = widget.visitorJsonList!
|
||||||
|
.where((e) =>
|
||||||
|
widget.visitorStrList ==
|
||||||
|
getJsonField(
|
||||||
|
e,
|
||||||
|
r'''$.VTE_DOCUMENTO''',
|
||||||
|
).toString().toString())
|
||||||
|
.toList()
|
||||||
|
.toList()
|
||||||
|
.cast<dynamic>();
|
||||||
|
_model.visitorStrList = widget.visitorStrList!;
|
||||||
|
setState(() {});
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
_model.tabBarController = TabController(
|
||||||
|
vsync: this,
|
||||||
|
length: 2,
|
||||||
|
initialIndex: 0,
|
||||||
|
)..addListener(() => setState(() {}));
|
||||||
|
_model.textController1 ??= TextEditingController();
|
||||||
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
|
||||||
|
_model.textController2 ??= TextEditingController();
|
||||||
|
_model.textFieldFocusNode2 ??= FocusNode();
|
||||||
|
|
||||||
|
_model.switchValue = true;
|
||||||
|
_model.textController3 ??= TextEditingController();
|
||||||
|
_model.textFieldFocusNode3 ??= FocusNode();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _loadMoreVisitHistory() async {
|
||||||
|
// Simulate fetching data from an API or database
|
||||||
|
Future<List<String>> fetchVisitHistory(int start, int limit) async {
|
||||||
|
// Simulate network delay
|
||||||
|
await Future.delayed(Duration(seconds: 1));
|
||||||
|
// Generate a list of visit history items
|
||||||
|
return List.generate(limit, (index) => "Item ${start + index}");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate the start index for the next batch of items to load
|
||||||
|
final int start = _visitHistoryLoadingIdx * _visitHistoryLoadingCount;
|
||||||
|
// Fetch the next batch of items
|
||||||
|
final List<String> newItems =
|
||||||
|
await fetchVisitHistory(start, _visitHistoryLoadingCount);
|
||||||
|
|
||||||
|
// If new items were fetched, add them to the list and update the index
|
||||||
|
if (newItems.isNotEmpty) {
|
||||||
|
_visitHistoryList.addAll(newItems);
|
||||||
|
_visitHistoryLoadingIdx++;
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void_scrollListener() {
|
||||||
|
if (_visitHistoryController.position.pixels ==
|
||||||
|
_visitHistoryController.position.maxScrollExtent) {
|
||||||
|
_loadMoreVisitHistory();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_model.dispose();
|
||||||
|
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
context.watch<FFAppState>();
|
||||||
|
|
||||||
|
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: appBarScheduleCompleteVisit(context),
|
||||||
|
body:
|
||||||
|
bodyScheduleCompleteVisit(context, _model, setState, safeSetState),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferredSizeWidget appBarScheduleCompleteVisit(BuildContext context) {
|
||||||
|
return AppBar(
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
leading: FlutterFlowIconButton(
|
||||||
|
borderColor: Colors.transparent,
|
||||||
|
borderRadius: 30.0,
|
||||||
|
borderWidth: 1.0,
|
||||||
|
buttonSize: 60.0,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.keyboard_arrow_left,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
size: 30.0,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
context.pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'61lcxdgm' /* Agendar Visita */,
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 15.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: const [],
|
||||||
|
centerTitle: true,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget bodyScheduleCompleteVisit(BuildContext context,
|
||||||
|
VisitHistoryPageModel _model, Function setState, Function safeSetState) {
|
||||||
|
return SafeArea(
|
||||||
|
top: true,
|
||||||
|
child: visitHistory(context, _model, safeSetState),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget visitHistory(
|
||||||
|
BuildContext context,
|
||||||
|
VisitHistoryPageModel _model,
|
||||||
|
Function safeSetState,
|
||||||
|
) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 900.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
|
FlutterFlowIconButton(
|
||||||
|
borderColor: Colors.transparent,
|
||||||
|
borderRadius: 20.0,
|
||||||
|
borderWidth: 1.0,
|
||||||
|
buttonSize: 40.0,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.settings_sharp,
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
size: 24.0,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
print('IconButton pressed ...');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
FutureBuilder<ApiCallResponse>(
|
||||||
|
future: _model.visitHistory(
|
||||||
|
requestFn: () => PhpGroup.getVisitsCall.call(
|
||||||
|
devUUID: FFAppState().devUUID,
|
||||||
|
userUUID: FFAppState().userUUID,
|
||||||
|
cliID: FFAppState().cliUUID,
|
||||||
|
atividade: 'getVisitas',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
builder: (context, snapshot) {
|
||||||
|
// Customize what your widget looks like when it's loading.
|
||||||
|
if (!snapshot.hasData) {
|
||||||
|
return Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 50.0,
|
||||||
|
height: 50.0,
|
||||||
|
child: SpinKitCircle(
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
size: 50.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
final wrapGetVisitsResponse = snapshot.data!;
|
||||||
|
return Builder(
|
||||||
|
builder: (context) {
|
||||||
|
final visitaWrap = PhpGroup.getVisitsCall
|
||||||
|
.visitasList(
|
||||||
|
wrapGetVisitsResponse.jsonBody,
|
||||||
|
)
|
||||||
|
?.toList() ??
|
||||||
|
[];
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: visitaWrap.length,
|
||||||
|
shrinkWrap: true,
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
physics: const BouncingScrollPhysics(),
|
||||||
|
addAutomaticKeepAlives: true,
|
||||||
|
cacheExtent: 1000.0,
|
||||||
|
addRepaintBoundaries: true,
|
||||||
|
addSemanticIndexes: true,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
final visitaWrapItem = visitaWrap[index];
|
||||||
|
// visitaWrap.length, (visitaWrapIndex) {
|
||||||
|
|
||||||
|
return InkWell(
|
||||||
|
splashColor: Colors.transparent,
|
||||||
|
focusColor: Colors.transparent,
|
||||||
|
hoverColor: Colors.transparent,
|
||||||
|
highlightColor: Colors.transparent,
|
||||||
|
onTap: () async {
|
||||||
|
await showModalBottomSheet(
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
enableDrag: false,
|
||||||
|
useSafeArea: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () =>
|
||||||
|
_model.unfocusNode.canRequestFocus
|
||||||
|
? FocusScope.of(context)
|
||||||
|
.requestFocus(_model.unfocusNode)
|
||||||
|
: FocusScope.of(context).unfocus(),
|
||||||
|
child: Padding(
|
||||||
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
|
child:
|
||||||
|
VisitDetailsModalTemplateComponentWidget(
|
||||||
|
visitStatusStr: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
).toString(),
|
||||||
|
visitStartDateStr: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_DTINICIO''',
|
||||||
|
).toString(),
|
||||||
|
visitEndDateStr: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_DTFIM''',
|
||||||
|
).toString(),
|
||||||
|
visitReasonStr: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.MOT_DESCRICAO''',
|
||||||
|
).toString(),
|
||||||
|
visitLevelStr: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.NAC_DESCRICAO''',
|
||||||
|
).toString(),
|
||||||
|
visitTempStr: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VTE_UNICA''',
|
||||||
|
).toString(),
|
||||||
|
visitObsStr: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_OBS''',
|
||||||
|
).toString(),
|
||||||
|
visitorImgPath: valueOrDefault<String>(
|
||||||
|
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VTE_DOCUMENTO''',
|
||||||
|
).toString()}&tipo=E',
|
||||||
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||||
|
),
|
||||||
|
visitorStrList: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VTE_DOCUMENTO''',
|
||||||
|
).toString(),
|
||||||
|
visitIdStr: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_ID''',
|
||||||
|
).toString(),
|
||||||
|
visitStatusColor: getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
).toString() ==
|
||||||
|
'A'
|
||||||
|
? FlutterFlowTheme.of(context).success
|
||||||
|
: FlutterFlowTheme.of(context).error,
|
||||||
|
visitorJsonList:
|
||||||
|
PhpGroup.getVisitsCall.visitasList(
|
||||||
|
wrapGetVisitsResponse.jsonBody,
|
||||||
|
),
|
||||||
|
updateToggleIdx: () async {},
|
||||||
|
repeatVisitSchedule: () async {},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
).then((value) => safeSetState(() {}));
|
||||||
|
},
|
||||||
|
child: Card(
|
||||||
|
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.secondaryBackground,
|
||||||
|
elevation: 5.0,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
width: 350.0,
|
||||||
|
height: 115.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.secondaryBackground,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
width: 100.0,
|
||||||
|
height: 100.0,
|
||||||
|
decoration: const BoxDecoration(),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
FFLocalizations.of(context)
|
||||||
|
.getText(
|
||||||
|
'i46frqyi' /* Visitante: */,
|
||||||
|
),
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
fontSize: 12.5,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.bold,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment:
|
||||||
|
const AlignmentDirectional(
|
||||||
|
-1.0, -1.0),
|
||||||
|
child: Text(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VTE_NOME''',
|
||||||
|
).toString(),
|
||||||
|
style: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
fontSize: 12.5,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].addToStart(
|
||||||
|
const SizedBox(width: 10.0)),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
FFLocalizations.of(context)
|
||||||
|
.getText(
|
||||||
|
'73b1kj59' /* Início em: */,
|
||||||
|
),
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
fontSize: 12.5,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.bold,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_DTINICIO''',
|
||||||
|
).toString(),
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
fontSize: 12.5,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].addToStart(
|
||||||
|
const SizedBox(width: 10.0)),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
FFLocalizations.of(context)
|
||||||
|
.getText(
|
||||||
|
'klzzrfbn' /* Fim em: */,
|
||||||
|
),
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
fontSize: 12.5,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.bold,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_DTFIM''',
|
||||||
|
).toString(),
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
fontSize: 12.5,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].addToStart(
|
||||||
|
const SizedBox(width: 10.0)),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment:
|
||||||
|
const AlignmentDirectional(
|
||||||
|
-1.0, 0.0),
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsetsDirectional
|
||||||
|
.fromSTEB(
|
||||||
|
10.0, 0.0, 0.0, 0.0),
|
||||||
|
child: Container(
|
||||||
|
width: 200.0,
|
||||||
|
height: 27.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: valueOrDefault<Color>(
|
||||||
|
() {
|
||||||
|
if (functions.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"A\"') {
|
||||||
|
return FlutterFlowTheme
|
||||||
|
.of(context)
|
||||||
|
.success;
|
||||||
|
} else if ((functions
|
||||||
|
.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"C\"') ||
|
||||||
|
(functions.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"F\"') ||
|
||||||
|
(functions.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"B\"') ||
|
||||||
|
(functions.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"I\"')) {
|
||||||
|
return FlutterFlowTheme
|
||||||
|
.of(context)
|
||||||
|
.error;
|
||||||
|
} else if (functions
|
||||||
|
.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"I\"') {
|
||||||
|
return FlutterFlowTheme
|
||||||
|
.of(context)
|
||||||
|
.warning;
|
||||||
|
} else {
|
||||||
|
return FlutterFlowTheme
|
||||||
|
.of(context)
|
||||||
|
.primary;
|
||||||
|
}
|
||||||
|
}(),
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.primary,
|
||||||
|
),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
5.0),
|
||||||
|
),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
const AlignmentDirectional(
|
||||||
|
0.0, 0.0),
|
||||||
|
child: Text(
|
||||||
|
() {
|
||||||
|
if (functions.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"A\"') {
|
||||||
|
return FFLocalizations
|
||||||
|
.of(context)
|
||||||
|
.getVariableText(
|
||||||
|
ptText: 'Ativo',
|
||||||
|
enText: 'Active',
|
||||||
|
);
|
||||||
|
} else if ((functions
|
||||||
|
.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"F\"') ||
|
||||||
|
(functions.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"C\"') ||
|
||||||
|
(functions.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"B\"') ||
|
||||||
|
(functions.jsonToStr(
|
||||||
|
getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VAW_STATUS''',
|
||||||
|
)) ==
|
||||||
|
'\"I\"')) {
|
||||||
|
return FFLocalizations
|
||||||
|
.of(context)
|
||||||
|
.getVariableText(
|
||||||
|
ptText: 'Cancelado',
|
||||||
|
enText: 'Canceled',
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return FFLocalizations
|
||||||
|
.of(context)
|
||||||
|
.getVariableText(
|
||||||
|
ptText: 'Pendente',
|
||||||
|
enText: 'Pending',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}(),
|
||||||
|
style: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme
|
||||||
|
.of(context)
|
||||||
|
.info,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(const SizedBox(height: 3.0)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
fadeInDuration:
|
||||||
|
const Duration(milliseconds: 500),
|
||||||
|
fadeOutDuration:
|
||||||
|
const Duration(milliseconds: 500),
|
||||||
|
imageUrl: valueOrDefault<String>(
|
||||||
|
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||||
|
visitaWrapItem,
|
||||||
|
r'''$.VTE_DOCUMENTO''',
|
||||||
|
).toString()}&tipo=E',
|
||||||
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||||
|
),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in New Issue