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 {
|
dependencies {
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10"
|
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
|
implementation 'com.android.support:multidex:1.0.3' // Se necessário, adicione suporte ao multidex
|
||||||
// Adicione outras dependências do seu aplicativo aqui
|
// 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
|
id "com.google.gms.google-services" version "4.3.15" apply false
|
||||||
// END: FlutterFire Configuration
|
// END: FlutterFire Configuration
|
||||||
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
|
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,322 +1,48 @@
|
||||||
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:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'opt_modal_model.dart';
|
|
||||||
export 'opt_modal_model.dart';
|
|
||||||
|
|
||||||
class OptModalWidget extends StatefulWidget {
|
class OptModalWidget extends StatefulWidget {
|
||||||
const OptModalWidget({super.key});
|
const OptModalWidget({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<OptModalWidget> createState() => _OptModalWidgetState();
|
_OptModalWidgetState createState() => _OptModalWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _OptModalWidgetState extends State<OptModalWidget> {
|
class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
late OptModalModel _model;
|
String selectedOption = 'T'; // Estado inicial
|
||||||
|
|
||||||
@override
|
void setSelectedOption(String option) {
|
||||||
void setState(VoidCallback callback) {
|
setState(() {
|
||||||
super.setState(callback);
|
selectedOption = option;
|
||||||
_model.onUpdate();
|
});
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_model = createModel(context, () => OptModalModel());
|
|
||||||
|
|
||||||
_model.textController ??= TextEditingController();
|
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_model.maybeDispose();
|
|
||||||
|
|
||||||
super.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Align(
|
return Container(
|
||||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
// Estilize seu modal como necessário
|
||||||
child: Padding(
|
child: Column(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 50.0, 20.0, 0.0),
|
children: [
|
||||||
child: Container(
|
// Botão para "Visitante"
|
||||||
width: 300.0,
|
ElevatedButton(
|
||||||
height: 400.0,
|
onPressed: () => setSelectedOption('E'),
|
||||||
decoration: BoxDecoration(
|
child: Text('Visitante'),
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
borderRadius: BorderRadius.circular(24.0),
|
|
||||||
),
|
),
|
||||||
child: Padding(
|
// Botão para "Morador"
|
||||||
padding: const EdgeInsets.all(4.0),
|
ElevatedButton(
|
||||||
child: Column(
|
onPressed: () => setSelectedOption('O'),
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: Text('Morador'),
|
||||||
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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
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)),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
// 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'),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:f_r_e_hub/pages/acess_history_page/acess_history_page_widget.dart';
|
||||||
import 'package:f_r_e_hub/pages/fast_pass_page/fast_pass_page_widget.dart';
|
import 'package:f_r_e_hub/pages/fast_pass_page/fast_pass_page_widget.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -132,10 +133,9 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
||||||
builder: (context, params) => const PeopleOnThePropertyPageWidget(),
|
builder: (context, params) => const PeopleOnThePropertyPageWidget(),
|
||||||
),
|
),
|
||||||
FFRoute(
|
FFRoute(
|
||||||
name: 'acessHistoryPage',
|
name: 'acessHistoryPage',
|
||||||
path: '/acessHistoryPage',
|
path: '/acessHistoryPage',
|
||||||
builder: (context, params) => const AcessHistoryPageWidget(),
|
builder: (context, params) => const AcessHistoryPageWidget()),
|
||||||
),
|
|
||||||
// FFRoute(
|
// FFRoute(
|
||||||
// name: 'liberationHistory',
|
// name: 'liberationHistory',
|
||||||
// path: '/liberationHistory',
|
// path: '/liberationHistory',
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'package:rxdart/rxdart.dart';
|
||||||
|
|
||||||
import '/backend/api_requests/api_calls.dart';
|
import '/backend/api_requests/api_calls.dart';
|
||||||
import '/components/molecular_components/opt_modal/opt_modal_widget.dart';
|
import '/components/molecular_components/opt_modal/opt_modal_widget.dart';
|
||||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
|
@ -18,11 +20,55 @@ class AcessHistoryPageWidget extends StatefulWidget {
|
||||||
State<AcessHistoryPageWidget> createState() => _AcessHistoryPageWidgetState();
|
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> {
|
class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
||||||
late AcessHistoryPageModel _model;
|
late AcessHistoryPageModel _model;
|
||||||
|
BehaviorSubject<String> selectedTypeSubject =
|
||||||
|
BehaviorSubject<String>.seeded('T');
|
||||||
|
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
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
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
@ -36,459 +82,403 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// void updateSelectedType(String? value) {
|
||||||
|
// setState(() {
|
||||||
|
// selectedType.value = value;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
context.watch<FFAppState>();
|
return Scaffold(
|
||||||
|
key: scaffoldKey,
|
||||||
return GestureDetector(
|
appBar: _buildAppBar(context),
|
||||||
onTap: () => _model.unfocusNode.canRequestFocus
|
body: SafeArea(
|
||||||
? 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(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
_buildFilterButton(context),
|
||||||
children: [
|
Expanded(
|
||||||
Container(
|
// Isso garante que SingleChildScrollView tenha um limite e possa rolar
|
||||||
width: double.infinity,
|
child: SingleChildScrollView(
|
||||||
height: 38.0,
|
child: Column(
|
||||||
decoration: BoxDecoration(
|
children: [
|
||||||
color: FlutterFlowTheme.of(context).secondaryBackground,
|
_buildAccessHistoryList(context),
|
||||||
),
|
],
|
||||||
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(
|
|
||||||
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(() {}));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.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: 'T',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
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)),
|
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferredSizeWidget _buildAppBar(BuildContext context) {
|
||||||
|
return AppBar(
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
leading: FlutterFlowIconButton(
|
||||||
|
borderColor: Colors.transparent,
|
||||||
|
borderRadius: 30.0,
|
||||||
|
borderWidth: 1.0,
|
||||||
|
buttonSize: 60.0,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.keyboard_arrow_left,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
size: 30.0,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
context.pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'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,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildFilterButton(BuildContext context) {
|
||||||
|
return 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(() {
|
||||||
|
updateAccessHistory(value!);
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget card(String selectedType) {
|
||||||
|
debugPrint('Selected type in Card: $selectedType');
|
||||||
|
return 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) {
|
||||||
|
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];
|
||||||
|
debugPrint(
|
||||||
|
'Access History Item: ${accessHistoryItem['PES_TIPO']}');
|
||||||
|
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)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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