test access_history_page
This commit is contained in:
parent
912632d95d
commit
04f9e64ef7
File diff suppressed because one or more lines are too long
|
@ -70,7 +70,7 @@ flutter {
|
|||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10"
|
||||
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
|
||||
// id "org.jetbrains.kotlin.android" version "1.8.10" apply false
|
||||
|
||||
implementation 'com.android.support:multidex:1.0.3' // Se necessário, adicione suporte ao multidex
|
||||
// Adicione outras dependências do seu aplicativo aqui
|
||||
|
|
|
@ -23,7 +23,7 @@ plugins {
|
|||
id "com.google.gms.google-services" version "4.3.15" apply false
|
||||
// END: FlutterFire Configuration
|
||||
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
|
||||
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
|
||||
// id "org.jetbrains.kotlin.android" version "1.8.10" apply false
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,323 +1,49 @@
|
|||
import '/flutter_flow/flutter_flow_checkbox_group.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||
import '/flutter_flow/form_field_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'opt_modal_model.dart';
|
||||
export 'opt_modal_model.dart';
|
||||
|
||||
class OptModalWidget extends StatefulWidget {
|
||||
const OptModalWidget({super.key});
|
||||
const OptModalWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<OptModalWidget> createState() => _OptModalWidgetState();
|
||||
_OptModalWidgetState createState() => _OptModalWidgetState();
|
||||
}
|
||||
|
||||
class _OptModalWidgetState extends State<OptModalWidget> {
|
||||
late OptModalModel _model;
|
||||
String selectedOption = 'T'; // Estado inicial
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => OptModalModel());
|
||||
|
||||
_model.textController ??= TextEditingController();
|
||||
_model.textFieldFocusNode ??= FocusNode();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
void setSelectedOption(String option) {
|
||||
setState(() {
|
||||
selectedOption = option;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 50.0, 20.0, 0.0),
|
||||
child: Container(
|
||||
width: 300.0,
|
||||
height: 400.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
return Container(
|
||||
// Estilize seu modal como necessário
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||
child: Icon(
|
||||
Icons.filter_list,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 24.0,
|
||||
// Botão para "Visitante"
|
||||
ElevatedButton(
|
||||
onPressed: () => setSelectedOption('E'),
|
||||
child: Text('Visitante'),
|
||||
),
|
||||
// Botão para "Morador"
|
||||
ElevatedButton(
|
||||
onPressed: () => setSelectedOption('O'),
|
||||
child: Text('Morador'),
|
||||
),
|
||||
// Botão para "Ambos ou Nenhum"
|
||||
ElevatedButton(
|
||||
onPressed: () => setSelectedOption('T'),
|
||||
child: Text('Ambos ou Nenhum'),
|
||||
),
|
||||
// Botão para confirmar a seleção e fechar o modal
|
||||
ElevatedButton(
|
||||
onPressed: () => Navigator.pop(context, selectedOption),
|
||||
child: Text('Confirmar'),
|
||||
),
|
||||
],
|
||||
),
|
||||
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' /* Pesquise aqui..... */,
|
||||
),
|
||||
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: 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),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).alternate,
|
||||
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)),
|
||||
),
|
||||
FlutterFlowCheckboxGroup(
|
||||
options: [
|
||||
FFLocalizations.of(context).getText(
|
||||
'zok7lu4w' /* Visitante */,
|
||||
),
|
||||
FFLocalizations.of(context).getText(
|
||||
'oonqk812' /* Morador */,
|
||||
)
|
||||
],
|
||||
onChanged: (val) =>
|
||||
setState(() => _model.checkboxGroupValues1 = val),
|
||||
controller: _model.checkboxGroupValueController1 ??=
|
||||
FormFieldController<List<String>>(
|
||||
List.from([
|
||||
FFLocalizations.of(context).getText(
|
||||
'yfj9pd6k' /* Visitante */,
|
||||
),
|
||||
FFLocalizations.of(context).getText(
|
||||
'svfcf5xs' /* Morador */,
|
||||
)
|
||||
] ??
|
||||
[]),
|
||||
),
|
||||
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),
|
||||
initialized: _model.checkboxGroupValues1 != null,
|
||||
),
|
||||
]
|
||||
.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)),
|
||||
),
|
||||
FlutterFlowCheckboxGroup(
|
||||
options: [
|
||||
FFLocalizations.of(context).getText(
|
||||
'580z80ct' /* Entrada */,
|
||||
),
|
||||
FFLocalizations.of(context).getText(
|
||||
'1nbwqtzs' /* Saida */,
|
||||
)
|
||||
],
|
||||
onChanged: (val) =>
|
||||
setState(() => _model.checkboxGroupValues2 = val),
|
||||
controller: _model.checkboxGroupValueController2 ??=
|
||||
FormFieldController<List<String>>(
|
||||
List.from([
|
||||
FFLocalizations.of(context).getText(
|
||||
'5zn9x69v' /* Entrada */,
|
||||
),
|
||||
FFLocalizations.of(context).getText(
|
||||
'8uf522zq' /* Saida */,
|
||||
)
|
||||
] ??
|
||||
[]),
|
||||
),
|
||||
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),
|
||||
initialized: _model.checkboxGroupValues2 != null,
|
||||
),
|
||||
]
|
||||
.addToStart(const SizedBox(height: 10.0))
|
||||
.addToEnd(const SizedBox(height: 10.0)),
|
||||
),
|
||||
FFButtonWidget(
|
||||
onPressed: () {
|
||||
print('Button pressed ...');
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'88kshkph' /* Salvar */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(height: 10.0))
|
||||
.addToStart(const SizedBox(height: 10.0))
|
||||
.addToEnd(const SizedBox(height: 10.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:f_r_e_hub/pages/acess_history_page/acess_history_page_widget.dart';
|
||||
import 'package:f_r_e_hub/pages/fast_pass_page/fast_pass_page_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -134,8 +135,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
FFRoute(
|
||||
name: 'acessHistoryPage',
|
||||
path: '/acessHistoryPage',
|
||||
builder: (context, params) => const AcessHistoryPageWidget(),
|
||||
),
|
||||
builder: (context, params) => const AcessHistoryPageWidget()),
|
||||
// FFRoute(
|
||||
// name: 'liberationHistory',
|
||||
// path: '/liberationHistory',
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'package:rxdart/rxdart.dart';
|
||||
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/components/molecular_components/opt_modal/opt_modal_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||
|
@ -18,11 +20,55 @@ class AcessHistoryPageWidget extends StatefulWidget {
|
|||
State<AcessHistoryPageWidget> createState() => _AcessHistoryPageWidgetState();
|
||||
}
|
||||
|
||||
class AccessHistoryItemWidget extends StatelessWidget {
|
||||
final dynamic
|
||||
accessHistoryItem; // Substitua dynamic pelo tipo correto conforme seu modelo de dados
|
||||
|
||||
const AccessHistoryItemWidget({Key? key, required this.accessHistoryItem})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
accessHistoryItem[
|
||||
'nomeCampo'], // Substitua 'nomeCampo' pelo campo correto do seu modelo de dados
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4.0),
|
||||
Text(
|
||||
accessHistoryItem[
|
||||
'descricaoCampo'], // Substitua 'descricaoCampo' pelo campo correto do seu modelo de dados
|
||||
style: TextStyle(fontSize: 14.0),
|
||||
),
|
||||
// Adicione mais Widgets conforme necessário
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
||||
late AcessHistoryPageModel _model;
|
||||
BehaviorSubject<String> selectedTypeSubject =
|
||||
BehaviorSubject<String>.seeded('T');
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
// Método para atualizar o estado e refazer a chamada à API
|
||||
void updateAccessHistory(String newType) {
|
||||
debugPrint('ne: $newType');
|
||||
selectedTypeSubject.add(newType); // Atualiza o tipo selecionado
|
||||
setState(() {}); // Atualiza o estado do StreamBuilder
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
@ -36,18 +82,38 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
super.dispose();
|
||||
}
|
||||
|
||||
// void updateSelectedType(String? value) {
|
||||
// setState(() {
|
||||
// selectedType.value = value;
|
||||
// });
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Scaffold(
|
||||
return Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
appBar: AppBar(
|
||||
appBar: _buildAppBar(context),
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
_buildFilterButton(context),
|
||||
Expanded(
|
||||
// Isso garante que SingleChildScrollView tenha um limite e possa rolar
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
_buildAccessHistoryList(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
PreferredSizeWidget _buildAppBar(BuildContext context) {
|
||||
return AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
automaticallyImplyLeading: false,
|
||||
leading: FlutterFlowIconButton(
|
||||
|
@ -80,24 +146,11 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
actions: const [],
|
||||
centerTitle: true,
|
||||
elevation: 0.0,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 38.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
FlutterFlowIconButton(
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildFilterButton(BuildContext context) {
|
||||
return FlutterFlowIconButton(
|
||||
borderColor: Colors.transparent,
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
|
@ -108,15 +161,14 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
size: 24.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
await showModalBottomSheet(
|
||||
await showModalBottomSheet<String>(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context)
|
||||
.requestFocus(_model.unfocusNode)
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
|
@ -124,24 +176,16 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
).then((value) => safeSetState(() {
|
||||
updateAccessHistory(value!);
|
||||
}));
|
||||
},
|
||||
),
|
||||
]
|
||||
.addToStart(const SizedBox(width: 10.0))
|
||||
.addToEnd(const SizedBox(width: 10.0)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
FutureBuilder<ApiCallResponse>(
|
||||
);
|
||||
}
|
||||
|
||||
Widget card(String selectedType) {
|
||||
debugPrint('Selected type in Card: $selectedType');
|
||||
return FutureBuilder<ApiCallResponse>(
|
||||
future: _model.accessHistory(
|
||||
requestFn: () => PhpGroup.getAccessCall.call(
|
||||
devUUID: FFAppState().devUUID,
|
||||
|
@ -150,11 +194,10 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
atividade: 'getAcessos',
|
||||
pageSize: '100',
|
||||
pageNumber: '1',
|
||||
pesTipo: 'T',
|
||||
pesTipo: selectedType,
|
||||
),
|
||||
),
|
||||
builder: (context, snapshot) {
|
||||
// Customize what your widget looks like when it's loading.
|
||||
if (!snapshot.hasData) {
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
|
@ -171,9 +214,7 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
return Builder(
|
||||
builder: (context) {
|
||||
final accessHistory = PhpGroup.getAccessCall
|
||||
.access(
|
||||
wrapGetAccessResponse.jsonBody,
|
||||
)
|
||||
.access(wrapGetAccessResponse.jsonBody)
|
||||
?.toList() ??
|
||||
[];
|
||||
return Wrap(
|
||||
|
@ -185,52 +226,43 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
runAlignment: WrapAlignment.start,
|
||||
verticalDirection: VerticalDirection.down,
|
||||
clipBehavior: Clip.none,
|
||||
children: List.generate(accessHistory.length,
|
||||
(accessHistoryIndex) {
|
||||
final accessHistoryItem =
|
||||
accessHistory[accessHistoryIndex];
|
||||
children:
|
||||
List.generate(accessHistory.length, (accessHistoryIndex) {
|
||||
final accessHistoryItem = accessHistory[accessHistoryIndex];
|
||||
debugPrint(
|
||||
'Access History Item: ${accessHistoryItem['PES_TIPO']}');
|
||||
return Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Card(
|
||||
clipBehavior:
|
||||
Clip.antiAliasWithSaveLayer,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.secondaryBackground,
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8.0),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
child: Container(
|
||||
width: 350.0,
|
||||
height: 128.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(
|
||||
10.0),
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
100.0),
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
child: Image.network(
|
||||
valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString()}&tipo=E',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
).toString()}&tipo=E",
|
||||
"https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg",
|
||||
),
|
||||
width: 60.0,
|
||||
height: 60.0,
|
||||
|
@ -239,29 +271,22 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.PES_NOME''',
|
||||
).toString(),
|
||||
style:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(
|
||||
context)
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
|
@ -270,51 +295,40 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
Container(
|
||||
width: 100.0,
|
||||
height: 25.0,
|
||||
decoration:
|
||||
BoxDecoration(
|
||||
color: functions.jsonToStr(
|
||||
getJsonField(
|
||||
decoration: BoxDecoration(
|
||||
color: functions.jsonToStr(getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.PES_TIPO''',
|
||||
)) ==
|
||||
'E'
|
||||
? FlutterFlowTheme
|
||||
.of(
|
||||
context)
|
||||
.primary
|
||||
: FlutterFlowTheme
|
||||
.of(context)
|
||||
? FlutterFlowTheme.of(context).primary
|
||||
: FlutterFlowTheme.of(context)
|
||||
.warning,
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
24.0),
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.PES_TIPO''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(
|
||||
context)
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.info,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
|
@ -323,55 +337,42 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
],
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(
|
||||
width: 20.0))
|
||||
.addToStart(const SizedBox(
|
||||
width: 5.0))
|
||||
.addToEnd(const SizedBox(
|
||||
width: 5.0)),
|
||||
.divide(const SizedBox(width: 20.0))
|
||||
.addToStart(const SizedBox(width: 5.0))
|
||||
.addToEnd(const SizedBox(width: 5.0)),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.start,
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
FFLocalizations.of(context).getText(
|
||||
'2odgr6hg' /* Entrou: */,
|
||||
),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize:
|
||||
12.5,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.bold,
|
||||
fontSize: 12.5,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
|
@ -379,58 +380,48 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
accessHistoryItem,
|
||||
r'''$.ACE_DATAHORA''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize:
|
||||
12.5,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontSize: 12.5,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
].addToStart(
|
||||
const SizedBox(
|
||||
width: 10.0)),
|
||||
].addToStart(const SizedBox(width: 10.0)),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.start,
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
FFLocalizations.of(context).getText(
|
||||
'zrde3fke' /* Setor */,
|
||||
),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize:
|
||||
12.5,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.bold,
|
||||
fontSize: 12.5,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
|
@ -438,36 +429,30 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
accessHistoryItem,
|
||||
r'''$.ACI_DESCRICAO''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize:
|
||||
12.5,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontSize: 12.5,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
].addToStart(
|
||||
const SizedBox(
|
||||
width: 10.0)),
|
||||
].addToStart(const SizedBox(width: 10.0)),
|
||||
),
|
||||
].divide(const SizedBox(
|
||||
height: 3.0)),
|
||||
].divide(const SizedBox(height: 3.0)),
|
||||
),
|
||||
),
|
||||
]
|
||||
.addToStart(const SizedBox(
|
||||
width: 5.0))
|
||||
.addToEnd(const SizedBox(
|
||||
width: 5.0)),
|
||||
.addToStart(const SizedBox(width: 5.0))
|
||||
.addToEnd(const SizedBox(width: 5.0)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -479,16 +464,21 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
|||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
].addToStart(const SizedBox(height: 5.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildAccessHistoryList(BuildContext context) {
|
||||
return StreamBuilder<String>(
|
||||
stream: selectedTypeSubject.stream,
|
||||
builder: (context, snapshot) {
|
||||
if (!snapshot.hasData) {
|
||||
// Você pode mostrar um widget de carregamento ou qualquer outro widget aqui
|
||||
return Center(child: CircularProgressIndicator());
|
||||
}
|
||||
final selectedType = snapshot.data!;
|
||||
// Aqui você chama o método que constrói o card, passando o selectedType
|
||||
return card(selectedType);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,458 @@
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
appBar: AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
automaticallyImplyLeading: false,
|
||||
leading: FlutterFlowIconButton(
|
||||
borderColor: Colors.transparent,
|
||||
borderRadius: 30.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 60.0,
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
size: 30.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
context.pop();
|
||||
},
|
||||
),
|
||||
title: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ch8qymga' /* Histórico de Acesso */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 18.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||
),
|
||||
),
|
||||
actions: const [],
|
||||
centerTitle: true,
|
||||
elevation: 0.0,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 38.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
FlutterFlowIconButton(
|
||||
borderColor: Colors.transparent,
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(
|
||||
Icons.filter_list,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
await showModalBottomSheet<String>(
|
||||
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(() {
|
||||
updateSelectedType(value);
|
||||
debugPrint('Selected type: $value');
|
||||
}));
|
||||
},
|
||||
),
|
||||
]
|
||||
.addToStart(const SizedBox(width: 10.0))
|
||||
.addToEnd(const SizedBox(width: 10.0)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
FutureBuilder<ApiCallResponse>(
|
||||
future: _model.accessHistory(
|
||||
requestFn: () => PhpGroup.getAccessCall.call(
|
||||
devUUID: FFAppState().devUUID,
|
||||
userUUID: FFAppState().userUUID,
|
||||
cliID: FFAppState().cliUUID,
|
||||
atividade: 'getAcessos',
|
||||
pageSize: '100',
|
||||
pageNumber: '1',
|
||||
pesTipo: selectedType,
|
||||
),
|
||||
),
|
||||
builder: (context, snapshot) {
|
||||
// Customize what your widget looks like when it's loading.
|
||||
if (!snapshot.hasData) {
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
child: SpinKitCircle(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 50.0,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
final wrapGetAccessResponse = snapshot.data!;
|
||||
return Builder(
|
||||
builder: (context) {
|
||||
final accessHistory = PhpGroup.getAccessCall
|
||||
.access(
|
||||
wrapGetAccessResponse.jsonBody,
|
||||
)
|
||||
?.toList() ??
|
||||
[];
|
||||
return Wrap(
|
||||
spacing: 2.0,
|
||||
runSpacing: 1.0,
|
||||
alignment: WrapAlignment.start,
|
||||
crossAxisAlignment: WrapCrossAlignment.start,
|
||||
direction: Axis.horizontal,
|
||||
runAlignment: WrapAlignment.start,
|
||||
verticalDirection: VerticalDirection.down,
|
||||
clipBehavior: Clip.none,
|
||||
children: List.generate(accessHistory.length,
|
||||
(accessHistoryIndex) {
|
||||
final accessHistoryItem =
|
||||
accessHistory[accessHistoryIndex];
|
||||
return Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Card(
|
||||
clipBehavior:
|
||||
Clip.antiAliasWithSaveLayer,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.secondaryBackground,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8.0),
|
||||
),
|
||||
child: Container(
|
||||
width: 350.0,
|
||||
height: 128.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(
|
||||
10.0),
|
||||
child: ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
100.0),
|
||||
child: Image.network(
|
||||
valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString()}&tipo=E',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
width: 60.0,
|
||||
height: 60.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Text(
|
||||
getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.PES_NOME''',
|
||||
).toString(),
|
||||
style:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 100.0,
|
||||
height: 25.0,
|
||||
decoration:
|
||||
BoxDecoration(
|
||||
color: functions.jsonToStr(
|
||||
getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.PES_TIPO''',
|
||||
)) ==
|
||||
'E'
|
||||
? FlutterFlowTheme
|
||||
.of(
|
||||
context)
|
||||
.primary
|
||||
: FlutterFlowTheme
|
||||
.of(context)
|
||||
.warning,
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
24.0),
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Text(
|
||||
getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.PES_TIPO''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.info,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(
|
||||
width: 20.0))
|
||||
.addToStart(const SizedBox(
|
||||
width: 5.0))
|
||||
.addToEnd(const SizedBox(
|
||||
width: 5.0)),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'2odgr6hg' /* Entrou: */,
|
||||
),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize:
|
||||
12.5,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.bold,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.ACE_DATAHORA''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize:
|
||||
12.5,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
].addToStart(
|
||||
const SizedBox(
|
||||
width: 10.0)),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize:
|
||||
MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'zrde3fke' /* Setor */,
|
||||
),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize:
|
||||
12.5,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.bold,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
getJsonField(
|
||||
accessHistoryItem,
|
||||
r'''$.ACI_DESCRICAO''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize:
|
||||
12.5,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
].addToStart(
|
||||
const SizedBox(
|
||||
width: 10.0)),
|
||||
),
|
||||
].divide(const SizedBox(
|
||||
height: 3.0)),
|
||||
),
|
||||
),
|
||||
]
|
||||
.addToStart(const SizedBox(
|
||||
width: 5.0))
|
||||
.addToEnd(const SizedBox(
|
||||
width: 5.0)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
].addToStart(const SizedBox(height: 5.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue