update
This commit is contained in:
parent
d73d38b66c
commit
b85e75fbf8
|
@ -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>"; };
|
||||||
6436409427A31CD300820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
6436409227A31CDD00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
6436409F27A31CD500820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
6436409F27A31CDD00820AF7 /* 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 = (
|
||||||
6436409427A31CD300820AF7 /* pt */,
|
6436409227A31CDD00820AF7 /* pt */,
|
||||||
6436409F27A31CD500820AF7 /* en */,
|
6436409F27A31CDD00820AF7 /* en */,
|
||||||
);
|
);
|
||||||
name = InfoPlist.strings;
|
name = InfoPlist.strings;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
|
@ -10,19 +10,15 @@ class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
||||||
FocusNode? textFieldFocusNode;
|
FocusNode? textFieldFocusNode;
|
||||||
TextEditingController? textController;
|
TextEditingController? textController;
|
||||||
String? Function(BuildContext, String?)? textControllerValidator;
|
String? Function(BuildContext, String?)? textControllerValidator;
|
||||||
|
// State field(s) for Checkbox widget.
|
||||||
|
bool? checkboxValue1;
|
||||||
|
// State field(s) for Checkbox widget.
|
||||||
|
bool? checkboxValue2;
|
||||||
// State field(s) for CheckboxGroup widget.
|
// State field(s) for CheckboxGroup widget.
|
||||||
FormFieldController<List<String>>? checkboxGroupValueController1;
|
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||||
List<String>? get checkboxGroupValues1 =>
|
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||||
checkboxGroupValueController1?.value;
|
set checkboxGroupValues(List<String>? v) =>
|
||||||
set checkboxGroupValues1(List<String>? v) =>
|
checkboxGroupValueController?.value = v;
|
||||||
checkboxGroupValueController1?.value = v;
|
|
||||||
|
|
||||||
// State field(s) for CheckboxGroup widget.
|
|
||||||
FormFieldController<List<String>>? checkboxGroupValueController2;
|
|
||||||
List<String>? get checkboxGroupValues2 =>
|
|
||||||
checkboxGroupValueController2?.value;
|
|
||||||
set checkboxGroupValues2(List<String>? v) =>
|
|
||||||
checkboxGroupValueController2?.value = v;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
|
@ -9,7 +9,12 @@ import 'opt_modal_model.dart';
|
||||||
export 'opt_modal_model.dart';
|
export 'opt_modal_model.dart';
|
||||||
|
|
||||||
class OptModalWidget extends StatefulWidget {
|
class OptModalWidget extends StatefulWidget {
|
||||||
const OptModalWidget({super.key});
|
const OptModalWidget({
|
||||||
|
super.key,
|
||||||
|
required this.togglePersonType,
|
||||||
|
});
|
||||||
|
|
||||||
|
final Future Function(String personType)? togglePersonType;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<OptModalWidget> createState() => _OptModalWidgetState();
|
State<OptModalWidget> createState() => _OptModalWidgetState();
|
||||||
|
@ -173,44 +178,119 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
),
|
),
|
||||||
].addToStart(const SizedBox(width: 24.0)),
|
].addToStart(const SizedBox(width: 24.0)),
|
||||||
),
|
),
|
||||||
FlutterFlowCheckboxGroup(
|
Row(
|
||||||
options: [
|
mainAxisSize: MainAxisSize.max,
|
||||||
FFLocalizations.of(context).getText(
|
children: [
|
||||||
'zok7lu4w' /* Visitante */,
|
Theme(
|
||||||
),
|
data: ThemeData(
|
||||||
FFLocalizations.of(context).getText(
|
checkboxTheme: CheckboxThemeData(
|
||||||
'oonqk812' /* Morador */,
|
visualDensity: VisualDensity.compact,
|
||||||
)
|
materialTapTargetSize:
|
||||||
],
|
MaterialTapTargetSize.shrinkWrap,
|
||||||
onChanged: (val) =>
|
shape: RoundedRectangleBorder(
|
||||||
setState(() => _model.checkboxGroupValues1 = val),
|
borderRadius: BorderRadius.circular(4.0),
|
||||||
controller: _model.checkboxGroupValueController1 ??=
|
|
||||||
FormFieldController<List<String>>(
|
|
||||||
List.from([
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'yfj9pd6k' /* Visitante */,
|
|
||||||
),
|
),
|
||||||
FFLocalizations.of(context).getText(
|
),
|
||||||
'svfcf5xs' /* Morador */,
|
unselectedWidgetColor:
|
||||||
)
|
FlutterFlowTheme.of(context).secondaryText,
|
||||||
] ??
|
|
||||||
[]),
|
|
||||||
),
|
|
||||||
activeColor: FlutterFlowTheme.of(context).primary,
|
|
||||||
checkColor: FlutterFlowTheme.of(context).info,
|
|
||||||
checkboxBorderColor:
|
|
||||||
FlutterFlowTheme.of(context).secondaryText,
|
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
checkboxBorderRadius: BorderRadius.circular(6.0),
|
child: Checkbox(
|
||||||
initialized: _model.checkboxGroupValues1 != null,
|
value: _model.checkboxValue1 ??= true,
|
||||||
|
onChanged: (newValue) async {
|
||||||
|
setState(() => _model.checkboxValue1 = newValue!);
|
||||||
|
if (newValue!) {
|
||||||
|
if (_model.checkboxValue2 == true) {
|
||||||
|
await widget.togglePersonType?.call(
|
||||||
|
'T',
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
await widget.togglePersonType?.call(
|
||||||
|
'E',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
side: BorderSide(
|
||||||
|
width: 2,
|
||||||
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
|
),
|
||||||
|
activeColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
checkColor: FlutterFlowTheme.of(context).info,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'20wie2n3' /* Morador */,
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Theme(
|
||||||
|
data: ThemeData(
|
||||||
|
checkboxTheme: CheckboxThemeData(
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
|
materialTapTargetSize:
|
||||||
|
MaterialTapTargetSize.shrinkWrap,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(4.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
unselectedWidgetColor:
|
||||||
|
FlutterFlowTheme.of(context).secondaryText,
|
||||||
|
),
|
||||||
|
child: Checkbox(
|
||||||
|
value: _model.checkboxValue2 ??= true,
|
||||||
|
onChanged: (newValue) async {
|
||||||
|
setState(() => _model.checkboxValue2 = newValue!);
|
||||||
|
if (newValue!) {
|
||||||
|
if (_model.checkboxValue2 == true) {
|
||||||
|
await widget.togglePersonType?.call(
|
||||||
|
'T',
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
await widget.togglePersonType?.call(
|
||||||
|
'O',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
side: BorderSide(
|
||||||
|
width: 2,
|
||||||
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
|
),
|
||||||
|
activeColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
checkColor: FlutterFlowTheme.of(context).info,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'pglvsv6g' /* Visitante */,
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
.addToStart(const SizedBox(height: 10.0))
|
.addToStart(const SizedBox(height: 10.0))
|
||||||
|
@ -249,8 +329,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
onChanged: (val) =>
|
onChanged: (val) =>
|
||||||
setState(() => _model.checkboxGroupValues2 = val),
|
setState(() => _model.checkboxGroupValues = val),
|
||||||
controller: _model.checkboxGroupValueController2 ??=
|
controller: _model.checkboxGroupValueController ??=
|
||||||
FormFieldController<List<String>>(
|
FormFieldController<List<String>>(
|
||||||
List.from([
|
List.from([
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
|
@ -276,7 +356,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
checkboxBorderRadius: BorderRadius.circular(6.0),
|
checkboxBorderRadius: BorderRadius.circular(6.0),
|
||||||
initialized: _model.checkboxGroupValues2 != null,
|
initialized: _model.checkboxGroupValues != null,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
.addToStart(const SizedBox(height: 10.0))
|
.addToStart(const SizedBox(height: 10.0))
|
||||||
|
|
|
@ -492,20 +492,12 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'pt': 'Tipo de Pessoa',
|
'pt': 'Tipo de Pessoa',
|
||||||
'en': 'Type of Person',
|
'en': 'Type of Person',
|
||||||
},
|
},
|
||||||
'zok7lu4w': {
|
'20wie2n3': {
|
||||||
'pt': 'Visitante',
|
|
||||||
'en': 'Visitor',
|
|
||||||
},
|
|
||||||
'oonqk812': {
|
|
||||||
'pt': 'Morador',
|
'pt': 'Morador',
|
||||||
'en': 'Resident',
|
|
||||||
},
|
|
||||||
'yfj9pd6k': {
|
|
||||||
'pt': 'Visitante',
|
|
||||||
'en': '',
|
'en': '',
|
||||||
},
|
},
|
||||||
'svfcf5xs': {
|
'pglvsv6g': {
|
||||||
'pt': 'Morador',
|
'pt': 'Visitante',
|
||||||
'en': '',
|
'en': '',
|
||||||
},
|
},
|
||||||
'pepv7gl9': {
|
'pepv7gl9': {
|
||||||
|
|
|
@ -7,6 +7,10 @@ import 'acess_history_page_widget.dart' show AcessHistoryPageWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
||||||
|
/// Local state fields for this page.
|
||||||
|
|
||||||
|
String pesType = 'T';
|
||||||
|
|
||||||
/// State fields for stateful widgets in this page.
|
/// State fields for stateful widgets in this page.
|
||||||
|
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
|
@ -54,7 +58,12 @@ class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
||||||
: FocusScope.of(context).unfocus(),
|
: FocusScope.of(context).unfocus(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child: const OptModalWidget(),
|
child: OptModalWidget(
|
||||||
|
togglePersonType: (personType) async {
|
||||||
|
_model.pesType = personType;
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -120,7 +120,12 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
||||||
: FocusScope.of(context).unfocus(),
|
: FocusScope.of(context).unfocus(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child: const OptModalWidget(),
|
child: OptModalWidget(
|
||||||
|
togglePersonType: (personType) async {
|
||||||
|
_model.pesType = personType;
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -150,7 +155,7 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
||||||
atividade: 'getAcessos',
|
atividade: 'getAcessos',
|
||||||
pageSize: '100',
|
pageSize: '100',
|
||||||
pageNumber: '1',
|
pageNumber: '1',
|
||||||
pesTipo: 'T',
|
pesTipo: _model.pesType,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
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/throw_exception/throw_exception_widget.dart';
|
import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||||
import '/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
|
import '/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
|
||||||
import '/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
|
import '/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
|
||||||
|
@ -2257,28 +2256,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () {
|
||||||
await showModalBottomSheet(
|
print('IconButton pressed ...');
|
||||||
isScrollControlled: true,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
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: const OptModalWidget(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
).then((value) => safeSetState(() {}));
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue