fix navigate to liberation page

This commit is contained in:
FlutterFlow 2024-07-01 14:29:25 +00:00
parent c24d10dc23
commit 474e43fcb1
6 changed files with 267 additions and 5 deletions

View File

@ -44,8 +44,8 @@
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6436409727A31CDF00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 6436409F27A31CDD00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6436409A27A31CD600820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 6436409827A31CDC00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@ -225,8 +225,8 @@
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
6436409727A31CDF00820AF7 /* pt */, 6436409F27A31CDD00820AF7 /* pt */,
6436409A27A31CD600820AF7 /* en */, 6436409827A31CDC00820AF7 /* en */,
); );
name = InfoPlist.strings; name = InfoPlist.strings;
sourceTree = "<group>"; sourceTree = "<group>";

View File

@ -88,4 +88,17 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
}, },
); );
} }
Future liberationHistoryOptAction(BuildContext context) async {
context.pushNamed(
'liberationHistory',
extra: <String, dynamic>{
kTransitionInfoKey: const TransitionInfo(
hasTransition: true,
transitionType: PageTransitionType.scale,
alignment: Alignment.bottomCenter,
),
},
);
}
} }

View File

@ -66,6 +66,10 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
await _model.acessHistoryOptAction(context); await _model.acessHistoryOptAction(context);
setState(() {}); setState(() {});
}, },
liberationHistoryOptAction: () async {
await _model.liberationHistoryOptAction(context);
setState(() {});
},
), ),
); );
} else { } else {
@ -94,6 +98,10 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
await _model.acessHistoryOptAction(context); await _model.acessHistoryOptAction(context);
setState(() {}); setState(() {});
}, },
liberationHistoryOptAction: () async {
await _model.liberationHistoryOptAction(context);
setState(() {});
},
), ),
); );
} }

View File

@ -14,6 +14,7 @@ class MenuListViewComponentWidget extends StatefulWidget {
required this.scheduleVisitOptAction, required this.scheduleVisitOptAction,
required this.peopleOnThePropertyOptAction, required this.peopleOnThePropertyOptAction,
required this.acessHistoryOptAction, required this.acessHistoryOptAction,
required this.liberationHistoryOptAction,
}); });
final Future Function()? changeMenuStyle; final Future Function()? changeMenuStyle;
@ -21,6 +22,7 @@ class MenuListViewComponentWidget extends StatefulWidget {
final Future Function()? scheduleVisitOptAction; final Future Function()? scheduleVisitOptAction;
final Future Function()? peopleOnThePropertyOptAction; final Future Function()? peopleOnThePropertyOptAction;
final Future Function()? acessHistoryOptAction; final Future Function()? acessHistoryOptAction;
final Future Function()? liberationHistoryOptAction;
@override @override
State<MenuListViewComponentWidget> createState() => State<MenuListViewComponentWidget> createState() =>
@ -831,6 +833,118 @@ de Acesso */
), ),
), ),
), ),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
await widget.liberationHistoryOptAction?.call();
},
child: Container(
width: 100.0,
height: 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(
'944g4ib1' /* Histórico
de Liberação */
,
),
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)),
),
),
),
),
),
].divide(const SizedBox(width: 15.0)), ].divide(const SizedBox(width: 15.0)),
), ),
), ),

View File

@ -15,6 +15,7 @@ class MenuStaggeredViewComponentWidget extends StatefulWidget {
required this.scheduleVisitOptAction, required this.scheduleVisitOptAction,
required this.peopleOnThePropertyOptAction, required this.peopleOnThePropertyOptAction,
required this.accessHistoryOptAction, required this.accessHistoryOptAction,
required this.liberationHistoryOptAction,
}); });
final Future Function()? changeMenuStyleAction; final Future Function()? changeMenuStyleAction;
@ -22,6 +23,7 @@ class MenuStaggeredViewComponentWidget extends StatefulWidget {
final Future Function()? scheduleVisitOptAction; final Future Function()? scheduleVisitOptAction;
final Future Function()? peopleOnThePropertyOptAction; final Future Function()? peopleOnThePropertyOptAction;
final Future Function()? accessHistoryOptAction; final Future Function()? accessHistoryOptAction;
final Future Function()? liberationHistoryOptAction;
@override @override
State<MenuStaggeredViewComponentWidget> createState() => State<MenuStaggeredViewComponentWidget> createState() =>
@ -76,7 +78,7 @@ class _MenuStaggeredViewComponentWidgetState
), ),
crossAxisSpacing: 10.0, crossAxisSpacing: 10.0,
mainAxisSpacing: 10.0, mainAxisSpacing: 10.0,
itemCount: 7, itemCount: 8,
padding: const EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(
0, 0,
10.0, 10.0,
@ -869,6 +871,123 @@ de Acesso */
), ),
), ),
), ),
() => InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
await widget.liberationHistoryOptAction?.call();
},
child: Container(
width: 100.0,
height: 100.0,
decoration: BoxDecoration(
color:
FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color:
FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Align(
alignment:
const AlignmentDirectional(-1.0, 0.0),
child: Padding(
padding:
const EdgeInsetsDirectional.fromSTEB(
8.0, 0.0, 0.0, 0.0),
child: Container(
width: 30.0,
height: 30.0,
decoration: BoxDecoration(
color:
FlutterFlowTheme.of(context)
.primaryBackground,
shape: BoxShape.circle,
),
alignment: const AlignmentDirectional(
0.0, 0.0),
child: Icon(
Icons.history_sharp,
color:
FlutterFlowTheme.of(context)
.accent1,
size: 24.0,
),
),
),
),
),
],
),
),
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment:
const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'u8qu4v6q' /* Histórico
de Liberação */
,
),
style: FlutterFlowTheme.of(context)
.titleLarge
.override(
fontFamily: 'Nunito',
color:
FlutterFlowTheme.of(context)
.primaryText,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts:
GoogleFonts.asMap()
.containsKey('Nunito'),
),
),
),
],
),
),
].divide(const SizedBox(height: 0.0)),
),
),
),
),
][index](); ][index]();
}, },
), ),

View File

@ -762,6 +762,10 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'pt': 'Histórico \nde Acesso', 'pt': 'Histórico \nde Acesso',
'en': 'Access \nHistory', 'en': 'Access \nHistory',
}, },
'944g4ib1': {
'pt': 'Histórico \nde Liberação',
'en': 'Liberation\nHistory',
},
}, },
// menuStaggeredViewComponent // menuStaggeredViewComponent
{ {
@ -793,6 +797,10 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'pt': 'Histórico\nde Acesso', 'pt': 'Histórico\nde Acesso',
'en': 'Access\nHistory', 'en': 'Access\nHistory',
}, },
'u8qu4v6q': {
'pt': 'Histórico\nde Liberação',
'en': 'Liberation\nHistory',
},
}, },
// messageWellComponent // messageWellComponent
{ {