add acessNotificationModal and accessHistoryPage
This commit is contained in:
parent
7d852c4c63
commit
5383f22dda
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -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>"; };
|
||||||
6436409427A31CD800820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
6436409D27A31CD200820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
6436409C27A31CD500820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
6436409627A31CD500820AF7 /* 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 = (
|
||||||
6436409427A31CD800820AF7 /* pt */,
|
6436409D27A31CD200820AF7 /* pt */,
|
||||||
6436409C27A31CD500820AF7 /* en */,
|
6436409627A31CD500820AF7 /* en */,
|
||||||
);
|
);
|
||||||
name = InfoPlist.strings;
|
name = InfoPlist.strings;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
|
@ -33,6 +33,7 @@ class PhpGroup {
|
||||||
static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall();
|
static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall();
|
||||||
static RespondeSolicitacaoCall respondeSolicitacaoCall =
|
static RespondeSolicitacaoCall respondeSolicitacaoCall =
|
||||||
RespondeSolicitacaoCall();
|
RespondeSolicitacaoCall();
|
||||||
|
static GetAccessCall getAccessCall = GetAccessCall();
|
||||||
}
|
}
|
||||||
|
|
||||||
class LoginCall {
|
class LoginCall {
|
||||||
|
@ -1552,6 +1553,256 @@ class RespondeSolicitacaoCall {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class GetAccessCall {
|
||||||
|
Future<ApiCallResponse> call({
|
||||||
|
String? devUUID = '',
|
||||||
|
String? userUUID = '',
|
||||||
|
String? cliID = '',
|
||||||
|
String? atividade = '',
|
||||||
|
String? pageSize = '',
|
||||||
|
String? pageNumber = '',
|
||||||
|
String? pesTipo = '',
|
||||||
|
}) async {
|
||||||
|
final baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
|
return ApiManager.instance.makeApiCall(
|
||||||
|
callName: 'getAccess',
|
||||||
|
apiUrl: '$baseUrl/processRequest.php',
|
||||||
|
callType: ApiCallType.POST,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
},
|
||||||
|
params: {
|
||||||
|
'devUUID': devUUID,
|
||||||
|
'userUUID': userUUID,
|
||||||
|
'cliID': cliID,
|
||||||
|
'atividade': atividade,
|
||||||
|
'pageSize': pageSize,
|
||||||
|
'pageNumber': pageNumber,
|
||||||
|
'pesTipo': pesTipo,
|
||||||
|
},
|
||||||
|
bodyType: BodyType.X_WWW_FORM_URL_ENCODED,
|
||||||
|
returnBody: true,
|
||||||
|
encodeBodyUtf8: false,
|
||||||
|
decodeUtf8: false,
|
||||||
|
cache: false,
|
||||||
|
isStreamingApi: false,
|
||||||
|
alwaysAllowBody: false,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool? error(dynamic response) => castToType<bool>(getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.error''',
|
||||||
|
));
|
||||||
|
int? rows(dynamic response) => castToType<int>(getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.total_rows''',
|
||||||
|
));
|
||||||
|
int? pages(dynamic response) => castToType<int>(getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.total_pages''',
|
||||||
|
));
|
||||||
|
int? page(dynamic response) => castToType<int>(getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.page''',
|
||||||
|
));
|
||||||
|
List? access(dynamic response) => getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos''',
|
||||||
|
true,
|
||||||
|
) as List?;
|
||||||
|
List<String>? accessDateTime(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].ACE_DATAHORA''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessType(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].ACE_TIPO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessDesc(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].ACI_DESCRICAO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessID(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].ACI_ID''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessMobileNotify(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].ACI_NOTIFICA_MOBILE''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessDestDesc(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].DEST_DESC''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessDestType(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].DEST_TIPO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessDestID(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].DEST_ID''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessDestProID(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].DEST_PRO_ID''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessIdenExternCode(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].IDE_CODEXTERNO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessIdenInternalCode(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].IDE_CODINTERNO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessIdenDesc(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].IDE_DESCRICAO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessIdenID(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].IDE_ID''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessIdenStatus(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].IDE_STATUS''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessIdenUse(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].IDE_USO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessPersonID(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].PES_ID''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessPersonName(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].PES_NOME''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessPersonType(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].PES_TIPO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessDescSet(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].SET_DESCRICAO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessIDSet(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].SET_ID''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
List<String>? accessTypeSet(dynamic response) => (getJsonField(
|
||||||
|
response,
|
||||||
|
r'''$.acessos[:].SET_TIPO''',
|
||||||
|
true,
|
||||||
|
) as List?)
|
||||||
|
?.withoutNulls
|
||||||
|
.map((x) => castToType<String>(x))
|
||||||
|
.withoutNulls
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
/// End PHP Group Code
|
/// End PHP Group Code
|
||||||
|
|
||||||
class ApiPagingParams {
|
class ApiPagingParams {
|
||||||
|
|
|
@ -3,9 +3,23 @@ import 'opt_modal_widget.dart' show OptModalWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
||||||
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
|
// State field(s) for TextField widget.
|
||||||
|
FocusNode? textFieldFocusNode;
|
||||||
|
TextEditingController? textController;
|
||||||
|
String? Function(BuildContext, String?)? textControllerValidator;
|
||||||
|
// State field(s) for CheckboxListTile widget.
|
||||||
|
bool? checkboxListTileValue1;
|
||||||
|
// State field(s) for CheckboxListTile widget.
|
||||||
|
bool? checkboxListTileValue2;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {}
|
void dispose() {
|
||||||
|
textFieldFocusNode?.dispose();
|
||||||
|
textController?.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
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 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'opt_modal_model.dart';
|
import 'opt_modal_model.dart';
|
||||||
export 'opt_modal_model.dart';
|
export 'opt_modal_model.dart';
|
||||||
|
|
||||||
|
@ -24,6 +26,9 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => OptModalModel());
|
_model = createModel(context, () => OptModalModel());
|
||||||
|
|
||||||
|
_model.textController ??= TextEditingController();
|
||||||
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -36,9 +41,9 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: 300.0,
|
||||||
height: 400.0,
|
height: 400.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -53,14 +58,241 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.settings,
|
Icons.filter_list,
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController,
|
||||||
|
focusNode: _model.textFieldFocusNode,
|
||||||
|
autofocus: true,
|
||||||
|
obscureText: false,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'0enrtljz' /* Label here... */,
|
||||||
|
),
|
||||||
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
),
|
||||||
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
),
|
||||||
|
enabledBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).alternate,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
errorBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
suffixIcon: const Icon(
|
||||||
|
Icons.search_outlined,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
validator: _model.textControllerValidator.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'l7tw8b92' /* Tipo de Pessoa */,
|
||||||
|
),
|
||||||
|
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(width: 24.0)),
|
||||||
|
),
|
||||||
|
Theme(
|
||||||
|
data: ThemeData(
|
||||||
|
checkboxTheme: CheckboxThemeData(
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(25),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
unselectedWidgetColor:
|
||||||
|
FlutterFlowTheme.of(context).secondaryText,
|
||||||
|
),
|
||||||
|
child: CheckboxListTile(
|
||||||
|
value: _model.checkboxListTileValue1 ??= true,
|
||||||
|
onChanged: (newValue) async {
|
||||||
|
setState(() => _model.checkboxListTileValue1 = newValue!);
|
||||||
|
},
|
||||||
|
title: Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'dkvmdln1' /* Title */,
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).titleLargeFamily,
|
||||||
|
fontSize: 10.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).titleLargeFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
tileColor: FlutterFlowTheme.of(context).secondaryBackground,
|
||||||
|
activeColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
checkColor: FlutterFlowTheme.of(context).info,
|
||||||
|
dense: true,
|
||||||
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.addToStart(const SizedBox(height: 10.0))
|
||||||
|
.addToEnd(const SizedBox(height: 10.0)),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'pepv7gl9' /* Tipo de Acesso */,
|
||||||
|
),
|
||||||
|
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(width: 24.0)),
|
||||||
|
),
|
||||||
|
Theme(
|
||||||
|
data: ThemeData(
|
||||||
|
checkboxTheme: CheckboxThemeData(
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(25),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
unselectedWidgetColor:
|
||||||
|
FlutterFlowTheme.of(context).secondaryText,
|
||||||
|
),
|
||||||
|
child: CheckboxListTile(
|
||||||
|
value: _model.checkboxListTileValue2 ??= true,
|
||||||
|
onChanged: (newValue) async {
|
||||||
|
setState(() => _model.checkboxListTileValue2 = newValue!);
|
||||||
|
},
|
||||||
|
title: Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'qos4r9fy' /* Title */,
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).titleLargeFamily,
|
||||||
|
fontSize: 10.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).titleLargeFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
tileColor: FlutterFlowTheme.of(context).secondaryBackground,
|
||||||
|
activeColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
checkColor: FlutterFlowTheme.of(context).info,
|
||||||
|
dense: true,
|
||||||
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.addToStart(const SizedBox(height: 10.0))
|
||||||
|
.addToEnd(const SizedBox(height: 10.0)),
|
||||||
|
),
|
||||||
|
FFButtonWidget(
|
||||||
|
onPressed: () {
|
||||||
|
print('Button pressed ...');
|
||||||
|
},
|
||||||
|
text: '',
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.done,
|
||||||
|
size: 15.0,
|
||||||
|
),
|
||||||
|
options: FFButtonOptions(
|
||||||
|
height: 40.0,
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
|
color: Colors.white,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
|
),
|
||||||
|
elevation: 3.0,
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: 1.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.divide(const SizedBox(height: 10.0))
|
||||||
|
.addToStart(const SizedBox(height: 10.0))
|
||||||
|
.addToEnd(const SizedBox(height: 10.0)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -197,7 +197,16 @@ Rapida */
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
|
|
||||||
context.pushNamed('scheduleProvisionalVisitPage');
|
context.pushNamed(
|
||||||
|
'scheduleProvisionalVisitPage',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
|
@ -307,7 +316,16 @@ Provisória */
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
|
|
||||||
context.pushNamed('scheduleCompleteVisitPage');
|
context.pushNamed(
|
||||||
|
'scheduleCompleteVisitPage',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
|
|
|
@ -99,16 +99,14 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
final gridViewGetLocalsResponse = snapshot.data!;
|
final gridViewGetLocalsResponse = snapshot.data!;
|
||||||
return Builder(
|
return Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
final eachLocals = (PhpGroup.getLocalsCall
|
final eachLocals = PhpGroup.getLocalsCall
|
||||||
.locais(
|
.locais(
|
||||||
gridViewGetLocalsResponse.jsonBody,
|
gridViewGetLocalsResponse.jsonBody,
|
||||||
)
|
)
|
||||||
?.map((e) => e)
|
?.map((e) => e)
|
||||||
.toList()
|
.toList()
|
||||||
.toList() ??
|
.toList() ??
|
||||||
[])
|
[];
|
||||||
.take(2)
|
|
||||||
.toList();
|
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
gridDelegate:
|
gridDelegate:
|
||||||
|
|
|
@ -57,7 +57,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
extra: <String, dynamic>{
|
extra: <String, dynamic>{
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
hasTransition: true,
|
hasTransition: true,
|
||||||
transitionType: PageTransitionType.fade,
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -69,7 +70,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
extra: <String, dynamic>{
|
extra: <String, dynamic>{
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
hasTransition: true,
|
hasTransition: true,
|
||||||
transitionType: PageTransitionType.fade,
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
import '/backend/api_requests/api_calls.dart';
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'access_notification_modal_template_component_widget.dart'
|
||||||
|
show AccessNotificationModalTemplateComponentWidget;
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AccessNotificationModalTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<AccessNotificationModalTemplateComponentWidget> {
|
||||||
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
|
// State field(s) for TextField widget.
|
||||||
|
FocusNode? textFieldFocusNode1;
|
||||||
|
TextEditingController? textController1;
|
||||||
|
String? Function(BuildContext, String?)? textController1Validator;
|
||||||
|
// State field(s) for TextField widget.
|
||||||
|
FocusNode? textFieldFocusNode2;
|
||||||
|
TextEditingController? textController2;
|
||||||
|
String? Function(BuildContext, String?)? textController2Validator;
|
||||||
|
// State field(s) for TextField widget.
|
||||||
|
FocusNode? textFieldFocusNode3;
|
||||||
|
TextEditingController? textController3;
|
||||||
|
String? Function(BuildContext, String?)? textController3Validator;
|
||||||
|
// State field(s) for TextField widget.
|
||||||
|
FocusNode? textFieldFocusNode4;
|
||||||
|
TextEditingController? textController4;
|
||||||
|
String? Function(BuildContext, String?)? textController4Validator;
|
||||||
|
// State field(s) for TextField widget.
|
||||||
|
FocusNode? textFieldFocusNode5;
|
||||||
|
TextEditingController? textController5;
|
||||||
|
String? Function(BuildContext, String?)? textController5Validator;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
textFieldFocusNode1?.dispose();
|
||||||
|
textController1?.dispose();
|
||||||
|
|
||||||
|
textFieldFocusNode2?.dispose();
|
||||||
|
textController2?.dispose();
|
||||||
|
|
||||||
|
textFieldFocusNode3?.dispose();
|
||||||
|
textController3?.dispose();
|
||||||
|
|
||||||
|
textFieldFocusNode4?.dispose();
|
||||||
|
textController4?.dispose();
|
||||||
|
|
||||||
|
textFieldFocusNode5?.dispose();
|
||||||
|
textController5?.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Action blocks.
|
||||||
|
Future<bool> visitRequestComponentAction(
|
||||||
|
BuildContext context, {
|
||||||
|
required String? actionValue,
|
||||||
|
required String? refUUID,
|
||||||
|
required String? responseValue,
|
||||||
|
required String? vteUUID,
|
||||||
|
}) async {
|
||||||
|
ApiCallResponse? visitRequest;
|
||||||
|
|
||||||
|
visitRequest = await PhpGroup.respondeSolicitacaoCall.call(
|
||||||
|
userUUID: FFAppState().userUUID,
|
||||||
|
devUUID: FFAppState().devUUID,
|
||||||
|
cliUUID: FFAppState().cliUUID,
|
||||||
|
atividade: 'respondeSolicitacao',
|
||||||
|
referencia: refUUID,
|
||||||
|
tarefa: actionValue,
|
||||||
|
resposta: responseValue,
|
||||||
|
idVisitante: vteUUID,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (PhpGroup.respondeSolicitacaoCall.error(
|
||||||
|
(visitRequest.jsonBody ?? ''),
|
||||||
|
) ==
|
||||||
|
false) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,426 @@
|
||||||
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import 'access_notification_modal_template_component_model.dart';
|
||||||
|
export 'access_notification_modal_template_component_model.dart';
|
||||||
|
|
||||||
|
class AccessNotificationModalTemplateComponentWidget extends StatefulWidget {
|
||||||
|
const AccessNotificationModalTemplateComponentWidget({
|
||||||
|
super.key,
|
||||||
|
required this.name,
|
||||||
|
required this.type,
|
||||||
|
required this.datetime,
|
||||||
|
required this.id,
|
||||||
|
required this.drive,
|
||||||
|
});
|
||||||
|
|
||||||
|
final String? name;
|
||||||
|
final String? type;
|
||||||
|
final String? datetime;
|
||||||
|
final String? id;
|
||||||
|
final String? drive;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<AccessNotificationModalTemplateComponentWidget> createState() =>
|
||||||
|
_AccessNotificationModalTemplateComponentWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
|
extends State<AccessNotificationModalTemplateComponentWidget> {
|
||||||
|
late AccessNotificationModalTemplateComponentModel _model;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void setState(VoidCallback callback) {
|
||||||
|
super.setState(callback);
|
||||||
|
_model.onUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_model = createModel(
|
||||||
|
context, () => AccessNotificationModalTemplateComponentModel());
|
||||||
|
|
||||||
|
_model.textController1 ??= TextEditingController(text: widget.name);
|
||||||
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
|
||||||
|
_model.textController2 ??= TextEditingController(text: widget.type);
|
||||||
|
_model.textFieldFocusNode2 ??= FocusNode();
|
||||||
|
|
||||||
|
_model.textController3 ??= TextEditingController(text: widget.id);
|
||||||
|
_model.textFieldFocusNode3 ??= FocusNode();
|
||||||
|
|
||||||
|
_model.textController4 ??= TextEditingController(text: widget.datetime);
|
||||||
|
_model.textFieldFocusNode4 ??= FocusNode();
|
||||||
|
|
||||||
|
_model.textController5 ??= TextEditingController(text: widget.drive);
|
||||||
|
_model.textFieldFocusNode5 ??= FocusNode();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_model.maybeDispose();
|
||||||
|
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
context.watch<FFAppState>();
|
||||||
|
|
||||||
|
return Align(
|
||||||
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 10.0, 0.0),
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width * 0.9,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(25.0),
|
||||||
|
bottomRight: Radius.circular(25.0),
|
||||||
|
topLeft: Radius.circular(25.0),
|
||||||
|
topRight: Radius.circular(25.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 150.0,
|
||||||
|
height: 150.0,
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
fadeInDuration: const Duration(milliseconds: 100),
|
||||||
|
fadeOutDuration: const Duration(milliseconds: 100),
|
||||||
|
imageUrl: valueOrDefault<String>(
|
||||||
|
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.id}&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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.addToStart(const SizedBox(width: 10.0))
|
||||||
|
.addToEnd(const SizedBox(width: 10.0)),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController1,
|
||||||
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
autofocus: false,
|
||||||
|
textInputAction: TextInputAction.next,
|
||||||
|
readOnly: true,
|
||||||
|
obscureText: false,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'dvag09pq' /* Nome */,
|
||||||
|
),
|
||||||
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
),
|
||||||
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
),
|
||||||
|
enabledBorder: InputBorder.none,
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
errorBorder: InputBorder.none,
|
||||||
|
focusedErrorBorder: InputBorder.none,
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.person,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
maxLines: null,
|
||||||
|
keyboardType: TextInputType.name,
|
||||||
|
validator:
|
||||||
|
_model.textController1Validator.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController2,
|
||||||
|
focusNode: _model.textFieldFocusNode2,
|
||||||
|
autofocus: false,
|
||||||
|
textInputAction: TextInputAction.next,
|
||||||
|
readOnly: true,
|
||||||
|
obscureText: false,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'h3s0r1he' /* Tipo */,
|
||||||
|
),
|
||||||
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
|
),
|
||||||
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
|
),
|
||||||
|
enabledBorder: InputBorder.none,
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
errorBorder: InputBorder.none,
|
||||||
|
focusedErrorBorder: InputBorder.none,
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.merge_type,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
maxLines: null,
|
||||||
|
keyboardType: TextInputType.name,
|
||||||
|
validator: _model.textController2Validator
|
||||||
|
.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController3,
|
||||||
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
autofocus: false,
|
||||||
|
textCapitalization: TextCapitalization.none,
|
||||||
|
textInputAction: TextInputAction.next,
|
||||||
|
readOnly: true,
|
||||||
|
obscureText: false,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'vjd9uwla' /* Identificador */,
|
||||||
|
),
|
||||||
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
|
),
|
||||||
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
|
),
|
||||||
|
enabledBorder: InputBorder.none,
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
errorBorder: InputBorder.none,
|
||||||
|
focusedErrorBorder: InputBorder.none,
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.grid_3x3,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
validator: _model.textController3Validator
|
||||||
|
.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.addToStart(const SizedBox(width: 24.0))
|
||||||
|
.addToEnd(const SizedBox(width: 24.0)),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController4,
|
||||||
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
autofocus: false,
|
||||||
|
textInputAction: TextInputAction.next,
|
||||||
|
readOnly: true,
|
||||||
|
obscureText: false,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'jveeqpdz' /* Acesso */,
|
||||||
|
),
|
||||||
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
),
|
||||||
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
),
|
||||||
|
enabledBorder: InputBorder.none,
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
errorBorder: InputBorder.none,
|
||||||
|
focusedErrorBorder: InputBorder.none,
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.history_edu,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
maxLines: null,
|
||||||
|
keyboardType: TextInputType.name,
|
||||||
|
validator:
|
||||||
|
_model.textController4Validator.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController5,
|
||||||
|
focusNode: _model.textFieldFocusNode5,
|
||||||
|
autofocus: false,
|
||||||
|
textCapitalization: TextCapitalization.none,
|
||||||
|
textInputAction: TextInputAction.next,
|
||||||
|
readOnly: true,
|
||||||
|
obscureText: false,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'9jdmuak2' /* Acionamento */,
|
||||||
|
),
|
||||||
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
),
|
||||||
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
),
|
||||||
|
enabledBorder: InputBorder.none,
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
errorBorder: InputBorder.none,
|
||||||
|
focusedErrorBorder: InputBorder.none,
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.message,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
validator:
|
||||||
|
_model.textController5Validator.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.divide(const SizedBox(height: 10.0))
|
||||||
|
.addToStart(const SizedBox(height: 20.0))
|
||||||
|
.addToEnd(const SizedBox(height: 20.0)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
import '/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
import '/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
||||||
import '/components/organism_components/view_visit_detail/view_visit_detail_widget.dart';
|
import '/components/view_visit_detail/view_visit_detail_widget.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'visit_details_modal_template_component_widget.dart'
|
import 'visit_details_modal_template_component_widget.dart'
|
||||||
show VisitDetailsModalTemplateComponentWidget;
|
show VisitDetailsModalTemplateComponentWidget;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import '/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
import '/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
||||||
import '/components/organism_components/view_visit_detail/view_visit_detail_widget.dart';
|
import '/components/view_visit_detail/view_visit_detail_widget.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'visit_details_modal_template_component_model.dart';
|
import 'visit_details_modal_template_component_model.dart';
|
||||||
|
|
|
@ -336,14 +336,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
},
|
},
|
||||||
// scheduleProvisionalVisitPage
|
// scheduleProvisionalVisitPage
|
||||||
{
|
{
|
||||||
'n7bbd202': {
|
|
||||||
'pt': 'Agendamento Provisório',
|
|
||||||
'en': 'Provisional Scheduling',
|
|
||||||
},
|
|
||||||
'i4xujgbn': {
|
|
||||||
'pt': 'Visita Provisória',
|
|
||||||
'en': 'Provisional Visit',
|
|
||||||
},
|
|
||||||
'x7at46ur': {
|
'x7at46ur': {
|
||||||
'pt': 'Quais visitantes você deseja cadastrar?',
|
'pt': 'Quais visitantes você deseja cadastrar?',
|
||||||
'en': 'Which visitors do you want to register?',
|
'en': 'Which visitors do you want to register?',
|
||||||
|
@ -384,6 +376,10 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'pt': 'Escreva as suas observações aqui',
|
'pt': 'Escreva as suas observações aqui',
|
||||||
'en': 'Write your observations here',
|
'en': 'Write your observations here',
|
||||||
},
|
},
|
||||||
|
'cifgwfxs': {
|
||||||
|
'pt': 'Agendamento Provisório',
|
||||||
|
'en': 'Provisional Scheduling',
|
||||||
|
},
|
||||||
'lhzhh2jb': {
|
'lhzhh2jb': {
|
||||||
'pt': 'scheduleVisit',
|
'pt': 'scheduleVisit',
|
||||||
'en': '',
|
'en': '',
|
||||||
|
@ -406,49 +402,41 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'pt': 'Visitantes',
|
'pt': 'Visitantes',
|
||||||
'en': 'Visitors',
|
'en': 'Visitors',
|
||||||
},
|
},
|
||||||
'nhxs49l9': {
|
'26dznyam': {
|
||||||
'pt': 'Visitante: ',
|
'pt': 'Entrou: ',
|
||||||
'en': 'Visitor:',
|
'en': 'Access:',
|
||||||
},
|
},
|
||||||
'x9jg3kfx': {
|
'f2vfwn36': {
|
||||||
'pt': 'Início em: ',
|
'pt': 'Setor',
|
||||||
'en': 'Beginning in:',
|
'en': 'Drive:',
|
||||||
},
|
|
||||||
'dh8ib64e': {
|
|
||||||
'pt': 'Fim em: ',
|
|
||||||
'en': 'End in:',
|
|
||||||
},
|
},
|
||||||
'1qa1ok6g': {
|
'1qa1ok6g': {
|
||||||
'pt': 'Todos',
|
'pt': 'Todos',
|
||||||
'en': 'All',
|
'en': 'All',
|
||||||
},
|
},
|
||||||
'ftl6katl': {
|
'kf5m85d2': {
|
||||||
'pt': 'Visitante: ',
|
'pt': 'Entrou: ',
|
||||||
'en': 'Visitor:',
|
'en': 'Access:',
|
||||||
},
|
},
|
||||||
'dbquxozy': {
|
'dxvbfe8h': {
|
||||||
'pt': 'Início em: ',
|
'pt': 'Setor',
|
||||||
'en': 'Beginning in:',
|
'en': 'Drive:',
|
||||||
},
|
|
||||||
'gjw5vcc6': {
|
|
||||||
'pt': 'Fim em: ',
|
|
||||||
'en': 'End in:',
|
|
||||||
},
|
},
|
||||||
'rvac7h59': {
|
'rvac7h59': {
|
||||||
'pt': 'Moradores',
|
'pt': 'Moradores',
|
||||||
'en': 'Residents',
|
'en': 'Residents',
|
||||||
},
|
},
|
||||||
'0xbh5f3a': {
|
'5thshl66': {
|
||||||
'pt': 'Visitante: ',
|
'pt': 'Entrou: ',
|
||||||
'en': 'Visitor:',
|
'en': 'Access:',
|
||||||
},
|
},
|
||||||
'gq3pp39j': {
|
'd13i2fmk': {
|
||||||
'pt': 'Início em: ',
|
'pt': 'Setor',
|
||||||
'en': 'Beginning in:',
|
'en': 'Drive:',
|
||||||
},
|
},
|
||||||
'7iaxwb8o': {
|
'ch8qymga': {
|
||||||
'pt': 'Fim em: ',
|
'pt': 'Histórico de Acesso',
|
||||||
'en': 'End in:',
|
'en': 'Access History',
|
||||||
},
|
},
|
||||||
'5uzkio93': {
|
'5uzkio93': {
|
||||||
'pt': 'Home',
|
'pt': 'Home',
|
||||||
|
@ -518,6 +506,29 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'en': 'Email',
|
'en': 'Email',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// optModal
|
||||||
|
{
|
||||||
|
'0enrtljz': {
|
||||||
|
'pt': 'Label here...',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
'l7tw8b92': {
|
||||||
|
'pt': 'Tipo de Pessoa',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
'dkvmdln1': {
|
||||||
|
'pt': 'Title',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
'pepv7gl9': {
|
||||||
|
'pt': 'Tipo de Acesso',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
'qos4r9fy': {
|
||||||
|
'pt': 'Title',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
},
|
||||||
// throwException
|
// throwException
|
||||||
{
|
{
|
||||||
'e58xxxiq': {
|
'e58xxxiq': {
|
||||||
|
@ -995,6 +1006,37 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'en': '',
|
'en': '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// accessNotificationModalTemplateComponent
|
||||||
|
{
|
||||||
|
'dvag09pq': {
|
||||||
|
'pt': 'Nome',
|
||||||
|
'en': 'Name',
|
||||||
|
},
|
||||||
|
'h3s0r1he': {
|
||||||
|
'pt': 'Tipo',
|
||||||
|
'en': 'Type',
|
||||||
|
},
|
||||||
|
'vjd9uwla': {
|
||||||
|
'pt': 'Identificador',
|
||||||
|
'en': 'Identifier',
|
||||||
|
},
|
||||||
|
's3nix1ot': {
|
||||||
|
'pt': '',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
'jveeqpdz': {
|
||||||
|
'pt': 'Acesso',
|
||||||
|
'en': 'Access',
|
||||||
|
},
|
||||||
|
'9jdmuak2': {
|
||||||
|
'pt': 'Acionamento',
|
||||||
|
'en': 'Drive',
|
||||||
|
},
|
||||||
|
'5qdmkvw3': {
|
||||||
|
'pt': '',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
},
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
{
|
{
|
||||||
'i5smty81': {
|
'i5smty81': {
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
// ignore_for_file: close_sinks
|
||||||
|
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:rxdart/rxdart.dart';
|
||||||
|
import 'package:rxdart/subjects.dart';
|
||||||
|
|
||||||
|
class FutureRequestManager<T> {
|
||||||
|
FutureRequestManager([this.cacheLimit = 10]);
|
||||||
|
|
||||||
|
final int cacheLimit;
|
||||||
|
final Map<String, Future<T>> _requests = {};
|
||||||
|
Future<T> performRequest({
|
||||||
|
String? uniqueQueryKey,
|
||||||
|
bool? overrideCache,
|
||||||
|
required Future<T> Function() requestFn,
|
||||||
|
}) {
|
||||||
|
uniqueQueryKey = _requestKey(uniqueQueryKey);
|
||||||
|
overrideCache ??= false;
|
||||||
|
|
||||||
|
// If we don't want to use the cache, clear it for this request.
|
||||||
|
if (overrideCache) {
|
||||||
|
clearRequest(uniqueQueryKey);
|
||||||
|
}
|
||||||
|
// Remove the first cached result if we have reached the specified limit,
|
||||||
|
// since we will be adding another.
|
||||||
|
if (!_requests.containsKey(uniqueQueryKey) &&
|
||||||
|
_requests.length >= cacheLimit) {
|
||||||
|
_requests.remove(_requests.keys.first);
|
||||||
|
}
|
||||||
|
// Return the cached query result or set it to the new value.
|
||||||
|
return _requests[uniqueQueryKey] ??= requestFn();
|
||||||
|
}
|
||||||
|
|
||||||
|
void clearRequest(String? key) => _requests.remove(_requestKey(key));
|
||||||
|
|
||||||
|
void clear() => _requests.keys.toList().forEach(clearRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
class StreamRequestManager<T> {
|
||||||
|
StreamRequestManager([this.cacheLimit = 10]);
|
||||||
|
|
||||||
|
final int cacheLimit;
|
||||||
|
final Map<String, BehaviorSubject<T>> _streamSubjects = {};
|
||||||
|
final Map<String, StreamSubscription<T>> _requestSubscriptions = {};
|
||||||
|
Stream<T> performRequest({
|
||||||
|
String? uniqueQueryKey,
|
||||||
|
bool? overrideCache,
|
||||||
|
required Stream<T> Function() requestFn,
|
||||||
|
}) {
|
||||||
|
uniqueQueryKey = _requestKey(uniqueQueryKey);
|
||||||
|
overrideCache ??= false;
|
||||||
|
|
||||||
|
// If we don't want to use the cache, clear it for this request.
|
||||||
|
if (overrideCache) {
|
||||||
|
clearRequest(uniqueQueryKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If this request was made previously, return its value stream.
|
||||||
|
if (_streamSubjects.containsKey(uniqueQueryKey)) {
|
||||||
|
return _streamSubjects[uniqueQueryKey]!.stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the first cached result if we have reached the specified limit,
|
||||||
|
// since we will be adding another.
|
||||||
|
if (_streamSubjects.isNotEmpty && _streamSubjects.length >= cacheLimit) {
|
||||||
|
clearRequest(_streamSubjects.keys.first);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a subscription that stores the latest result in the behavior subject.
|
||||||
|
final streamSubject = BehaviorSubject<T>();
|
||||||
|
_requestSubscriptions[uniqueQueryKey] = requestFn()
|
||||||
|
.asBroadcastStream()
|
||||||
|
.listen((result) => streamSubject.add(result));
|
||||||
|
_streamSubjects[uniqueQueryKey] = streamSubject;
|
||||||
|
|
||||||
|
return streamSubject.stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
void clearRequest(String? key) {
|
||||||
|
key = _requestKey(key);
|
||||||
|
_streamSubjects.remove(key)?.close();
|
||||||
|
_requestSubscriptions.remove(key)?.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear() => {
|
||||||
|
..._streamSubjects.keys,
|
||||||
|
..._requestSubscriptions.keys,
|
||||||
|
}.forEach(clearRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
String _requestKey(String? key) =>
|
||||||
|
key == null || key.isEmpty ? '__DEFAULT_KEY__' : key;
|
|
@ -1,4 +1,7 @@
|
||||||
|
import '/backend/api_requests/api_calls.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import '/flutter_flow/request_manager.dart';
|
||||||
|
|
||||||
import 'acess_history_page_widget.dart' show AcessHistoryPageWidget;
|
import 'acess_history_page_widget.dart' show AcessHistoryPageWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -11,6 +14,54 @@ class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
||||||
int get tabBarCurrentIndex =>
|
int get tabBarCurrentIndex =>
|
||||||
tabBarController != null ? tabBarController!.index : 0;
|
tabBarController != null ? tabBarController!.index : 0;
|
||||||
|
|
||||||
|
/// Query cache managers for this widget.
|
||||||
|
|
||||||
|
final _visitorsAcessHistoryManager = FutureRequestManager<ApiCallResponse>();
|
||||||
|
Future<ApiCallResponse> visitorsAcessHistory({
|
||||||
|
String? uniqueQueryKey,
|
||||||
|
bool? overrideCache,
|
||||||
|
required Future<ApiCallResponse> Function() requestFn,
|
||||||
|
}) =>
|
||||||
|
_visitorsAcessHistoryManager.performRequest(
|
||||||
|
uniqueQueryKey: uniqueQueryKey,
|
||||||
|
overrideCache: overrideCache,
|
||||||
|
requestFn: requestFn,
|
||||||
|
);
|
||||||
|
void clearVisitorsAcessHistoryCache() => _visitorsAcessHistoryManager.clear();
|
||||||
|
void clearVisitorsAcessHistoryCacheKey(String? uniqueKey) =>
|
||||||
|
_visitorsAcessHistoryManager.clearRequest(uniqueKey);
|
||||||
|
|
||||||
|
final _residentsAcessHistoryManager = FutureRequestManager<ApiCallResponse>();
|
||||||
|
Future<ApiCallResponse> residentsAcessHistory({
|
||||||
|
String? uniqueQueryKey,
|
||||||
|
bool? overrideCache,
|
||||||
|
required Future<ApiCallResponse> Function() requestFn,
|
||||||
|
}) =>
|
||||||
|
_residentsAcessHistoryManager.performRequest(
|
||||||
|
uniqueQueryKey: uniqueQueryKey,
|
||||||
|
overrideCache: overrideCache,
|
||||||
|
requestFn: requestFn,
|
||||||
|
);
|
||||||
|
void clearResidentsAcessHistoryCache() =>
|
||||||
|
_residentsAcessHistoryManager.clear();
|
||||||
|
void clearResidentsAcessHistoryCacheKey(String? uniqueKey) =>
|
||||||
|
_residentsAcessHistoryManager.clearRequest(uniqueKey);
|
||||||
|
|
||||||
|
final _accessHistoryManager = FutureRequestManager<ApiCallResponse>();
|
||||||
|
Future<ApiCallResponse> accessHistory({
|
||||||
|
String? uniqueQueryKey,
|
||||||
|
bool? overrideCache,
|
||||||
|
required Future<ApiCallResponse> Function() requestFn,
|
||||||
|
}) =>
|
||||||
|
_accessHistoryManager.performRequest(
|
||||||
|
uniqueQueryKey: uniqueQueryKey,
|
||||||
|
overrideCache: overrideCache,
|
||||||
|
requestFn: requestFn,
|
||||||
|
);
|
||||||
|
void clearAccessHistoryCache() => _accessHistoryManager.clear();
|
||||||
|
void clearAccessHistoryCacheKey(String? uniqueKey) =>
|
||||||
|
_accessHistoryManager.clearRequest(uniqueKey);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
@ -18,5 +69,13 @@ class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
||||||
void dispose() {
|
void dispose() {
|
||||||
unfocusNode.dispose();
|
unfocusNode.dispose();
|
||||||
tabBarController?.dispose();
|
tabBarController?.dispose();
|
||||||
|
|
||||||
|
/// Dispose query cache managers for this widget.
|
||||||
|
|
||||||
|
clearVisitorsAcessHistoryCache();
|
||||||
|
|
||||||
|
clearResidentsAcessHistoryCache();
|
||||||
|
|
||||||
|
clearAccessHistoryCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,7 @@
|
||||||
import '/backend/api_requests/api_calls.dart';
|
import '/backend/api_requests/api_calls.dart';
|
||||||
import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
import '/components/molecular_components/throw_exception/throw_exception_widget.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 '/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';
|
||||||
|
@ -58,110 +59,54 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
key: scaffoldKey,
|
key: scaffoldKey,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
appBar: AppBar(
|
||||||
|
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(
|
||||||
|
'cifgwfxs' /* Agendamento Provisório */,
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 16.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: const [],
|
||||||
|
centerTitle: true,
|
||||||
|
elevation: 2.0,
|
||||||
|
),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
splashColor: Colors.transparent,
|
|
||||||
focusColor: Colors.transparent,
|
|
||||||
hoverColor: Colors.transparent,
|
|
||||||
highlightColor: Colors.transparent,
|
|
||||||
onTap: () async {
|
|
||||||
_model.toggleIdx = true;
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 100.0,
|
|
||||||
height: 40.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
borderRadius: const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(0.0),
|
|
||||||
bottomRight: Radius.circular(100.0),
|
|
||||||
topLeft: Radius.circular(0.0),
|
|
||||||
topRight: Radius.circular(100.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'n7bbd202' /* Agendamento Provisório */,
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Column(
|
Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: const BoxDecoration(),
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 10.0, 0.0, 0.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(-1.0, -1.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
20.0, 20.0, 0.0, 20.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'i4xujgbn' /* Visita Provisória */,
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyLarge
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Nunito',
|
|
||||||
fontSize: 21.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey('Nunito'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Divider(
|
|
||||||
thickness: 0.5,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
Column(
|
Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
|
@ -280,10 +225,6 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
),
|
),
|
||||||
].addToEnd(const SizedBox(height: 20.0)),
|
].addToEnd(const SizedBox(height: 20.0)),
|
||||||
),
|
),
|
||||||
Divider(
|
|
||||||
thickness: 0.5,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
Column(
|
Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
|
@ -324,6 +265,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
labelText:
|
labelText:
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'8zgsw5so' /* Ínicio da Visita */,
|
'8zgsw5so' /* Ínicio da Visita */,
|
||||||
|
@ -403,7 +345,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
BorderRadius.circular(8.0),
|
BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.hourglass_top,
|
Icons.date_range,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.accent1,
|
.accent1,
|
||||||
),
|
),
|
||||||
|
@ -528,10 +470,6 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(
|
|
||||||
thickness: 0.5,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
Column(
|
Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
|
@ -577,6 +515,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
labelText:
|
labelText:
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'wehvxbz4' /* Nome do Visitante */,
|
'wehvxbz4' /* Nome do Visitante */,
|
||||||
|
@ -685,10 +624,6 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(
|
|
||||||
thickness: 0.5,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
Column(
|
Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
|
@ -730,6 +665,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
labelText:
|
labelText:
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'cw8b3tbb' /* Observações da Visita */,
|
'cw8b3tbb' /* Observações da Visita */,
|
||||||
|
@ -803,7 +739,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
BorderRadius.circular(10.0),
|
BorderRadius.circular(10.0),
|
||||||
),
|
),
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.format_color_text,
|
Icons.text_fields,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.accent1,
|
.accent1,
|
||||||
),
|
),
|
||||||
|
@ -832,11 +768,6 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Container(
|
|
||||||
width: 100.0,
|
|
||||||
height: 54.0,
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -923,7 +854,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
.addToStart(const SizedBox(height: 40.0))
|
.addToStart(const SizedBox(height: 4.0))
|
||||||
.addToEnd(const SizedBox(height: 40.0)),
|
.addToEnd(const SizedBox(height: 40.0)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue