Merge pull request #25 from FRE-Informatica/fix/fd-705
FIX: Tela de Seleções de Locais
This commit is contained in:
commit
a98d5edfbf
|
@ -379,4 +379,4 @@ SPEC CHECKSUMS:
|
||||||
|
|
||||||
PODFILE CHECKSUM: 3bb356a4513d56583f2f2461d3d8eefb4cd4c3a4
|
PODFILE CHECKSUM: 3bb356a4513d56583f2f2461d3d8eefb4cd4c3a4
|
||||||
|
|
||||||
COCOAPODS: 1.14.3
|
COCOAPODS: 1.15.2
|
||||||
|
|
|
@ -510,8 +510,6 @@ class ApiManager {
|
||||||
result = ApiCallResponse(null, {}, -1, exception: e);
|
result = ApiCallResponse(null, {}, -1, exception: e);
|
||||||
}
|
}
|
||||||
|
|
||||||
log('Params: $params');
|
|
||||||
log('JsonBody: ${result.jsonBody}');
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
import 'package:hub/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart';
|
|
||||||
|
|
||||||
import '../../../flutter_flow/flutter_flow_model.dart';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class ArrowLinkedLocalsComponentModel
|
|
||||||
extends FlutterFlowModel<ArrowLinkedLocalsComponentWidget> {
|
|
||||||
@override
|
|
||||||
void initState(BuildContext context) {}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {}
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:hub/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|
||||||
|
|
||||||
|
|
||||||
class ArrowLinkedLocalsComponentWidget extends StatefulWidget {
|
|
||||||
const ArrowLinkedLocalsComponentWidget({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<ArrowLinkedLocalsComponentWidget> createState() =>
|
|
||||||
_ArrowLinkedLocalsComponentWidgetState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ArrowLinkedLocalsComponentWidgetState
|
|
||||||
extends State<ArrowLinkedLocalsComponentWidget> {
|
|
||||||
late ArrowLinkedLocalsComponentModel _model;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void setState(VoidCallback callback) {
|
|
||||||
super.setState(callback);
|
|
||||||
_model.onUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_model = createModel(context, () => ArrowLinkedLocalsComponentModel());
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_model.maybeDispose();
|
|
||||||
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +1,14 @@
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'dart:developer';
|
||||||
|
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart';
|
import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart';
|
||||||
|
import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '/backend/api_requests/api_calls.dart';
|
import '/backend/api_requests/api_calls.dart';
|
||||||
|
@ -14,14 +19,20 @@ class BottomArrowLinkedLocalsComponentWidget extends StatefulWidget {
|
||||||
const BottomArrowLinkedLocalsComponentWidget({super.key});
|
const BottomArrowLinkedLocalsComponentWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<BottomArrowLinkedLocalsComponentWidget> createState() =>
|
State<BottomArrowLinkedLocalsComponentWidget> createState() => _BottomArrowLinkedLocalsComponentWidgetState();
|
||||||
_BottomArrowLinkedLocalsComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _BottomArrowLinkedLocalsComponentWidgetState
|
class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLinkedLocalsComponentWidget> {
|
||||||
extends State<BottomArrowLinkedLocalsComponentWidget> {
|
|
||||||
late BottomArrowLinkedLocalsComponentModel _model;
|
late BottomArrowLinkedLocalsComponentModel _model;
|
||||||
|
|
||||||
|
|
||||||
|
bool _loading = false;
|
||||||
|
bool _hasData = false;
|
||||||
|
|
||||||
|
late Future<void> _localsFuture;
|
||||||
|
List<dynamic> _localsWrap = [];
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void setState(VoidCallback callback) {
|
void setState(VoidCallback callback) {
|
||||||
super.setState(callback);
|
super.setState(callback);
|
||||||
|
@ -31,8 +42,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model =
|
_model = createModel(context, () => BottomArrowLinkedLocalsComponentModel());
|
||||||
createModel(context, () => BottomArrowLinkedLocalsComponentModel());
|
_localsFuture = _fetchLocals();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -42,248 +53,224 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showNoMoreDataSnackBar(BuildContext context) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text(
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Não há mais dados.", enText: "No more data."),
|
||||||
|
),
|
||||||
|
duration: const Duration(seconds: 3),
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<ApiCallResponse?> _fetchLocals() async {
|
||||||
|
try {
|
||||||
|
setState(() => _loading = true);
|
||||||
|
var response = await PhpGroup.getLocalsCall.call(
|
||||||
|
devUUID: AppState().devUUID,
|
||||||
|
userUUID: AppState().userUUID,
|
||||||
|
);
|
||||||
|
|
||||||
|
final List<dynamic> locals = response.jsonBody['locais'] ?? [];
|
||||||
|
|
||||||
|
if (locals != null && locals.isNotEmpty) {
|
||||||
|
setState(() {
|
||||||
|
_localsWrap.addAll(locals);
|
||||||
|
_hasData = true;
|
||||||
|
_loading = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
_showNoMoreDataSnackBar(context);
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_hasData = false;
|
||||||
|
_loading = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
return null;
|
||||||
|
} catch (e, s) {
|
||||||
|
setState(() {
|
||||||
|
_hasData = false;
|
||||||
|
_loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> _fetchResponseLink(String status, String cliID) async {
|
||||||
|
try {
|
||||||
|
var response = await PhpGroup.resopndeVinculo.call(
|
||||||
|
devUUID: AppState().devUUID,
|
||||||
|
userUUID: AppState().userUUID,
|
||||||
|
cliID: cliID,
|
||||||
|
tarefa: status
|
||||||
|
);
|
||||||
|
|
||||||
|
if (response.jsonBody['error'] == false) {
|
||||||
|
return {'error': false, 'error_msg': FFLocalizations.of(context).getVariableText(ptText: "Vinculo Ativado com Sucesso", enText: "Link Activated Successfully") };
|
||||||
|
} else {
|
||||||
|
return response.jsonBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (e, s) {
|
||||||
|
DialogUtil.errorDefault(context);
|
||||||
|
LogUtil.requestAPIFailed('responderVinculo.php', '', 'Responder Vinculo', e, s);
|
||||||
|
return {'error': true, 'error_msg': FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Falha ao efetuar operação, Tente Novamente mais tarde.",
|
||||||
|
enText: "Failed to perform operation, please try again later."
|
||||||
|
)};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _imagePath(dynamic local) {
|
||||||
|
return 'https://freaccess.com.br/freaccess/Images/Clients/${local['CLI_ID']}.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, String> _labelsHashMap(dynamic local) {
|
||||||
|
return Map<String, String>.from({
|
||||||
|
'${local['CLI_PREFIXO']}:': local['CLI_NOME'],
|
||||||
|
'${FFLocalizations.of(context).getVariableText(ptText: 'Propriedade', enText: 'Property')}:': local['CLU_OWNER_DSC']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Color> _statusHashMap(dynamic local) {
|
||||||
|
return Map<String, Color>.from({
|
||||||
|
if (local['CLU_STATUS'] == 'A')
|
||||||
|
FFLocalizations.of(context).getVariableText(ptText: 'Ativo', enText: 'Active'): FlutterFlowTheme.of(context).success
|
||||||
|
else if (local['CLU_STATUS'] == 'B')
|
||||||
|
FFLocalizations.of(context).getVariableText(ptText: 'Bloqueado', enText: 'Blocked'): FlutterFlowTheme.of(context).error
|
||||||
|
else
|
||||||
|
FFLocalizations.of(context).getVariableText(ptText: 'Pendente', enText: 'Pending'): FlutterFlowTheme.of(context).warning
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _item(BuildContext context, dynamic local) {
|
||||||
|
return CardItemTemplateComponentWidget(
|
||||||
|
imagePath: _imagePath(local),
|
||||||
|
labelsHashMap: _labelsHashMap(local),
|
||||||
|
statusHashMap: [_statusHashMap(local)],
|
||||||
|
onTapCardItemAction: () async {
|
||||||
|
|
||||||
|
if (local['CLU_STATUS'] == 'A') {
|
||||||
|
AppState().cliUUID = local['CLI_ID'];
|
||||||
|
AppState().local = local['CLI_NOME'];
|
||||||
|
AppState().ownerUUID = local['CLU_OWNER_ID'];
|
||||||
|
Navigator.pop(context);
|
||||||
|
} else if (local['CLU_STATUS'] == 'B') {
|
||||||
|
String message = FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Local Bloqueado para Acesso, Entre em Contato com Administração',
|
||||||
|
enText: 'Location Blocked for Access, Contact Administration'
|
||||||
|
);
|
||||||
|
|
||||||
|
if (local['CLU_BLK_MESSAGE'] != null && local['CLU_BLK_MESSAGE'] != '') {
|
||||||
|
message = local['CLU_BLK_MESSAGE'];
|
||||||
|
}
|
||||||
|
|
||||||
|
DialogUtil.warning(context, message);
|
||||||
|
_localsWrap = [];
|
||||||
|
_localsFuture = _fetchLocals();
|
||||||
|
} else {
|
||||||
|
String localName = local['CLI_NOME'];
|
||||||
|
showAlertDialog(
|
||||||
|
context,
|
||||||
|
FFLocalizations.of(context).getVariableText(ptText: 'Ativar VInculo', enText: 'Activate Link'),
|
||||||
|
FFLocalizations.of(context).getVariableText(ptText: 'Deseja Aceitar o Vinculo a $localName?', enText: 'Do you wish to accept the link to $localName?'),
|
||||||
|
() async {
|
||||||
|
var response = await _fetchResponseLink('A', local['CLI_ID']);
|
||||||
|
Navigator.pop(context);
|
||||||
|
if (response['error'] == true) {
|
||||||
|
DialogUtil.error(context, response['error_msg']);
|
||||||
|
} else {
|
||||||
|
DialogUtil.success(context, response['error_msg']);
|
||||||
|
_localsWrap = [];
|
||||||
|
_localsFuture = _fetchLocals();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _listItems(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
decoration: const BoxDecoration(),
|
||||||
|
padding: const EdgeInsets.only(top: 15),
|
||||||
|
child: FutureBuilder<void>(
|
||||||
|
future: _localsFuture,
|
||||||
|
builder: (context, snapshot) {
|
||||||
|
return ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const BouncingScrollPhysics(),
|
||||||
|
itemCount: _localsWrap.length,
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
final item = _localsWrap[index];
|
||||||
|
return _item(context, item);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
context.watch<AppState>();
|
context.watch<AppState>();
|
||||||
|
|
||||||
|
double height = MediaQuery.sizeOf(context).height;
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0, 1),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 150.0,
|
height: height - (height * 0.5),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(0.0),
|
topLeft: Radius.circular(25),
|
||||||
bottomRight: Radius.circular(0.0),
|
topRight: Radius.circular(25)
|
||||||
topLeft: Radius.circular(25.0),
|
|
||||||
topRight: Radius.circular(25.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
height: 150.0,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(0.0),
|
|
||||||
bottomRight: Radius.circular(0.0),
|
|
||||||
topLeft: Radius.circular(0.0),
|
|
||||||
topRight: Radius.circular(0.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 100.0,
|
|
||||||
height: 100.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.secondaryBackground,
|
|
||||||
),
|
|
||||||
child: FlutterFlowIconButton(
|
|
||||||
borderRadius: 20.0,
|
|
||||||
borderWidth: 1.0,
|
|
||||||
buttonSize: 40.0,
|
|
||||||
fillColor: FlutterFlowTheme.of(context).accent1,
|
|
||||||
icon: Icon(
|
|
||||||
Icons.add,
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
size: 24.0,
|
|
||||||
),
|
|
||||||
onPressed: () {},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: FutureBuilder<ApiCallResponse>(
|
|
||||||
future: PhpGroup.getLocalsCall.call(
|
|
||||||
devUUID: AppState().devUUID,
|
|
||||||
userUUID: AppState().userUUID,
|
|
||||||
),
|
|
||||||
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 gridViewGetLocalsResponse = snapshot.data!;
|
|
||||||
|
|
||||||
return Builder(
|
|
||||||
builder: (context) {
|
|
||||||
final eachLocals = PhpGroup.getLocalsCall
|
|
||||||
.locais(
|
|
||||||
gridViewGetLocalsResponse.jsonBody,
|
|
||||||
)
|
)
|
||||||
?.map((e) => e)
|
|
||||||
.toList()
|
|
||||||
.toList() ??
|
|
||||||
[];
|
|
||||||
|
|
||||||
return GridView.builder(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
gridDelegate:
|
|
||||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 1,
|
|
||||||
crossAxisSpacing: 10.0,
|
|
||||||
mainAxisSpacing: 0.0,
|
|
||||||
childAspectRatio: 1.0,
|
|
||||||
),
|
),
|
||||||
scrollDirection: Axis.horizontal,
|
|
||||||
itemCount: eachLocals.length,
|
|
||||||
itemBuilder: (context, eachLocalsIndex) {
|
|
||||||
final eachLocalsItem =
|
|
||||||
eachLocals[eachLocalsIndex];
|
|
||||||
return InkWell(
|
|
||||||
splashColor: Colors.transparent,
|
|
||||||
focusColor: Colors.transparent,
|
|
||||||
hoverColor: Colors.transparent,
|
|
||||||
highlightColor: Colors.transparent,
|
|
||||||
onTap: () async {
|
|
||||||
AppState().cliUUID = getJsonField(
|
|
||||||
eachLocalsItem,
|
|
||||||
r'''$.CLI_ID''',
|
|
||||||
).toString();
|
|
||||||
setState(() {});
|
|
||||||
AppState().local = getJsonField(
|
|
||||||
eachLocalsItem,
|
|
||||||
r'''$.CLI_NOME''',
|
|
||||||
).toString();
|
|
||||||
setState(() {});
|
|
||||||
AppState().ownerUUID = getJsonField(
|
|
||||||
eachLocalsItem,
|
|
||||||
r'''$.CLU_OWNER_ID''',
|
|
||||||
).toString();
|
|
||||||
setState(() {});
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 50.0,
|
|
||||||
height: double.infinity,
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
alignment: const AlignmentDirectional(
|
|
||||||
0.0, 0.0),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment:
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
MainAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
|
if (_hasData == false && _loading == false && _localsWrap.isEmpty)
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Text(FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Nenhum Local Encontrado.",
|
||||||
|
enText: "No local found")),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else if (_hasData == true && _loading == false && _localsWrap.isNotEmpty)
|
||||||
|
Expanded(child: _listItems(context)),
|
||||||
|
if (_loading == true)
|
||||||
Container(
|
Container(
|
||||||
width: 100.0,
|
padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||||
height: 100.0,
|
child: Center(
|
||||||
decoration: BoxDecoration(
|
child: CircularProgressIndicator(
|
||||||
color: FlutterFlowTheme.of(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
context)
|
FlutterFlowTheme.of(context).primary,
|
||||||
.primaryText,
|
|
||||||
borderRadius:
|
|
||||||
const BorderRadius.only(
|
|
||||||
bottomLeft:
|
|
||||||
Radius.circular(25.0),
|
|
||||||
bottomRight:
|
|
||||||
Radius.circular(25.0),
|
|
||||||
topLeft:
|
|
||||||
Radius.circular(25.0),
|
|
||||||
topRight:
|
|
||||||
Radius.circular(25.0),
|
|
||||||
),
|
|
||||||
border: Border.all(
|
|
||||||
color: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.secondaryText,
|
|
||||||
width: 3.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius:
|
|
||||||
const BorderRadius.only(
|
|
||||||
bottomLeft:
|
|
||||||
Radius.circular(25.0),
|
|
||||||
bottomRight:
|
|
||||||
Radius.circular(25.0),
|
|
||||||
topLeft:
|
|
||||||
Radius.circular(25.0),
|
|
||||||
topRight:
|
|
||||||
Radius.circular(25.0),
|
|
||||||
),
|
|
||||||
child: CachedNetworkImage(
|
|
||||||
imageUrl:
|
|
||||||
"https://freaccess.com.br/freaccess/Images/Clients/${getJsonField(
|
|
||||||
eachLocalsItem,
|
|
||||||
r'''$.CLI_ID''',
|
|
||||||
).toString()}.png",
|
|
||||||
width: double.infinity,
|
|
||||||
height: double.infinity,
|
|
||||||
fit: BoxFit.fill,
|
|
||||||
alignment: const Alignment(
|
|
||||||
0.0, 0.0),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
)
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
0.0, 10.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
|
||||||
getJsonField(
|
|
||||||
eachLocalsItem,
|
|
||||||
r'''$.CLI_NOME''',
|
|
||||||
).toString(),
|
|
||||||
style: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts
|
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
].addToStart(const SizedBox(width: 20.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -81,13 +81,14 @@ class _LocalProfileComponentWidgetState
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: const Color(0x00FFFFFF),
|
backgroundColor: const Color(0x00FFFFFF),
|
||||||
context: context,
|
context: context,
|
||||||
|
enableDrag: false,
|
||||||
|
isDismissible: false,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child: const SizedBox(
|
child: const SizedBox(
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
child:
|
child: BottomArrowLinkedLocalsComponentWidget(),
|
||||||
BottomArrowLinkedLocalsComponentWidget(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -75,20 +75,15 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
|
|
||||||
if (AppState().cliUUID.isEmpty) {
|
if (AppState().cliUUID.isEmpty) {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
isScrollControlled: false,
|
isScrollControlled: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
enableDrag: false,
|
enableDrag: false,
|
||||||
isDismissible: false,
|
isDismissible: false,
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return GestureDetector(
|
return Padding(
|
||||||
onTap: () => _model.unfocusNode.canRequestFocus
|
|
||||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
|
||||||
: FocusScope.of(context).unfocus(),
|
|
||||||
child: Padding(
|
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child: const BottomArrowLinkedLocalsComponentWidget(),
|
child: const BottomArrowLinkedLocalsComponentWidget(),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
).then((value) => safeSetState(() {}));
|
).then((value) => safeSetState(() {}));
|
||||||
|
|
|
@ -148,7 +148,7 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
||||||
Center(
|
Center(
|
||||||
child: Text(FFLocalizations.of(context).getVariableText(
|
child: Text(FFLocalizations.of(context).getVariableText(
|
||||||
ptText: "Nenhuma solicitação encontrada!",
|
ptText: "Nenhuma solicitação encontrada!",
|
||||||
enText: "No visit found")),
|
enText: "No requests found")),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
40
pubspec.lock
40
pubspec.lock
|
@ -817,18 +817,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.5"
|
version: "10.0.4"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_flutter_testing
|
name: leak_tracker_flutter_testing
|
||||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.5"
|
version: "3.0.3"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -905,10 +905,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.11.1"
|
version: "0.8.0"
|
||||||
maybe_just_nothing:
|
maybe_just_nothing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -921,10 +921,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.12.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1286,10 +1286,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: sqflite_common
|
name: sqflite_common
|
||||||
sha256: "7b41b6c3507854a159e24ae90a8e3e9cc01eb26a477c118d6dca065b5f55453e"
|
sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.5.4+2"
|
version: "2.5.4"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1342,10 +1342,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.2"
|
version: "0.7.0"
|
||||||
timeago:
|
timeago:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -1510,10 +1510,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
|
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.2.4"
|
version: "14.2.1"
|
||||||
web:
|
web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1526,10 +1526,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: webview_flutter
|
name: webview_flutter
|
||||||
sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736
|
sha256: "6869c8786d179f929144b4a1f86e09ac0eddfe475984951ea6c634774c16b522"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.9.0"
|
version: "4.8.0"
|
||||||
webview_flutter_android:
|
webview_flutter_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1550,10 +1550,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_wkwebview
|
name: webview_flutter_wkwebview
|
||||||
sha256: "1942a12224ab31e9508cf00c0c6347b931b023b8a4f0811e5dec3b06f94f117d"
|
sha256: "9c62cc46fa4f2d41e10ab81014c1de470a6c6f26051a2de32111b2ee55287feb"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.15.0"
|
version: "3.14.0"
|
||||||
win32:
|
win32:
|
||||||
dependency: "direct overridden"
|
dependency: "direct overridden"
|
||||||
description:
|
description:
|
||||||
|
@ -1595,5 +1595,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.5.0 <4.0.0"
|
dart: ">=3.4.0 <4.0.0"
|
||||||
flutter: ">=3.24.0"
|
flutter: ">=3.22.0"
|
||||||
|
|
Loading…
Reference in New Issue