Refactor visit request template component logic
This commit is contained in:
parent
c323260c6c
commit
450e0823a6
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,6 @@
|
|||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:f_r_e_hub/app_state.dart';
|
||||
import 'package:f_r_e_hub/backend/api_requests/api_calls.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -18,6 +19,7 @@ class PushNotificationService {
|
|||
|
||||
PushNotificationService() {
|
||||
_initializeLocalNotifications(_context);
|
||||
_createNotificationChannels();
|
||||
}
|
||||
|
||||
Future<void> initialize(BuildContext context) async {
|
||||
|
@ -116,18 +118,31 @@ class PushNotificationService {
|
|||
}
|
||||
},
|
||||
);
|
||||
_createNotificationChannel();
|
||||
}
|
||||
|
||||
void _createNotificationChannel() {
|
||||
void _createNotificationChannels() {
|
||||
List<String> actions = [
|
||||
'visit_request',
|
||||
'visit_response',
|
||||
'access',
|
||||
'mensagem',
|
||||
'enroll_cond',
|
||||
'miscellaneous'
|
||||
];
|
||||
for (String action in actions) {
|
||||
_createNotificationChannel(action, "Channel for $action");
|
||||
}
|
||||
}
|
||||
|
||||
void _createNotificationChannel(String channelId, String channelName) {
|
||||
_flutterLocalNotificationsPlugin
|
||||
.resolvePlatformSpecificImplementation<
|
||||
AndroidFlutterLocalNotificationsPlugin>()
|
||||
?.createNotificationChannel(
|
||||
AndroidNotificationChannel(
|
||||
'channelID',
|
||||
'channelName',
|
||||
description: 'Channel Description',
|
||||
channelId, // Use o click_action como ID do canal
|
||||
channelName, // Nome descritivo baseado no click_action
|
||||
description: 'Channel for $channelName notifications',
|
||||
importance: Importance.max,
|
||||
),
|
||||
);
|
||||
|
@ -181,7 +196,7 @@ class PushNotificationService {
|
|||
|
||||
final NotificationSettings settings =
|
||||
await _requestNotificationPermission();
|
||||
await _fetchAndLogApnsToken(settings);
|
||||
if (Platform.isIOS) await _fetchAndLogApnsToken(settings);
|
||||
|
||||
final String? deviceToken = await _firebaseMessaging.getToken();
|
||||
if (deviceToken != null) {
|
||||
|
@ -222,11 +237,32 @@ class PushNotificationService {
|
|||
return PhpGroup.updToken.error((response?.jsonBody ?? '')) == false;
|
||||
}
|
||||
|
||||
String _getChannelIdBasedOnClickAction(String clickAction) {
|
||||
// Retorna o ID do canal com base no click_action
|
||||
// Exemplo simples, pode ser expandido conforme necessário
|
||||
switch (clickAction) {
|
||||
case 'visit_request':
|
||||
return 'visit_request';
|
||||
case '':
|
||||
return 'visit_response';
|
||||
case 'access':
|
||||
return 'access';
|
||||
case 'mensagem':
|
||||
return 'mensagem';
|
||||
case 'enroll_cond':
|
||||
return 'enroll_cond';
|
||||
default:
|
||||
return 'miscellaneous';
|
||||
}
|
||||
}
|
||||
|
||||
void _showNotification(RemoteMessage message) async {
|
||||
String channelId =
|
||||
_getChannelIdBasedOnClickAction(message.data['click_action']);
|
||||
var androidDetails = AndroidNotificationDetails(
|
||||
'channelID',
|
||||
'channelName',
|
||||
channelDescription: 'Channel Description',
|
||||
channelId,
|
||||
'Channel Name for $channelId',
|
||||
channelDescription: 'Channel Description for $channelId',
|
||||
importance: Importance.max,
|
||||
priority: Priority.high,
|
||||
);
|
||||
|
@ -274,10 +310,20 @@ class NotificationHandler {
|
|||
switch (message['click_action']) {
|
||||
case 'visit_request':
|
||||
_showVisitRequestDialog(message, context);
|
||||
|
||||
break;
|
||||
case 'visit_response':
|
||||
case '':
|
||||
debugPrint('visit_response');
|
||||
break;
|
||||
case 'access':
|
||||
debugPrint('access');
|
||||
break;
|
||||
case 'mensagem':
|
||||
debugPrint('mensagem');
|
||||
break;
|
||||
case 'enroll_cond':
|
||||
debugPrint('enroll_cond');
|
||||
break;
|
||||
default:
|
||||
debugPrint('Notification type not recognized');
|
||||
}
|
||||
|
@ -285,6 +331,7 @@ class NotificationHandler {
|
|||
|
||||
void _showVisitRequestDialog(
|
||||
Map<String, dynamic> message, BuildContext context) {
|
||||
debugPrint('Showing visit request dialog');
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||
import '/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
|
||||
|
@ -45,6 +47,20 @@ class ViewVisitDetailWidget extends StatefulWidget {
|
|||
State<ViewVisitDetailWidget> createState() => _ViewVisitDetailWidgetState();
|
||||
}
|
||||
|
||||
List<dynamic>? findVisitorById(List<dynamic>? jsonList, String? id) {
|
||||
if (jsonList == null || id == null) return null;
|
||||
try {
|
||||
var foundItem = jsonList.firstWhere(
|
||||
(item) => item["VAW_ID"] == id,
|
||||
orElse: () => null,
|
||||
);
|
||||
return foundItem != null ? [foundItem] : null;
|
||||
} catch (e) {
|
||||
print("Error searching item: $e");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||
late ViewVisitDetailModel _model;
|
||||
|
||||
|
@ -61,14 +77,16 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
|
||||
// On component load action.
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
_model.visitStatusColor = await action_blocks.manageStatusColorAction(
|
||||
context,
|
||||
visitStatusStr: widget.visitStatusStr,
|
||||
);
|
||||
if (widget.visitStatusStr != null) {
|
||||
_model.visitStatusColor = await action_blocks.manageStatusColorAction(
|
||||
context,
|
||||
visitStatusStr: widget.visitStatusStr!,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
_model.textController1 ??= TextEditingController(
|
||||
text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr);
|
||||
_model.textController1 = TextEditingController(
|
||||
text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? '');
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
||||
_model.textController2 ??=
|
||||
|
@ -99,6 +117,9 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var filteredVisitorJsonList =
|
||||
findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null';
|
||||
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return Padding(
|
||||
|
@ -135,8 +156,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
child: Align(
|
||||
alignment: const AlignmentDirectional(1.0, 0.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 15.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 15.0, 0.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
|
@ -165,8 +186,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 20.0, 20.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 20.0, 20.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
decoration: const BoxDecoration(),
|
||||
|
@ -200,8 +221,10 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 500),
|
||||
fadeOutDuration: const Duration(milliseconds: 500),
|
||||
fadeInDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
fadeOutDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
imageUrl: valueOrDefault<String>(
|
||||
widget.visitorImgPath,
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
|
@ -220,8 +243,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
Container(
|
||||
decoration: const BoxDecoration(),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 10.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 8.0, 10.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController1,
|
||||
focusNode: _model.textFieldFocusNode1,
|
||||
|
@ -296,8 +319,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 10.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
@ -482,8 +505,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 10.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
@ -670,8 +693,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
Container(
|
||||
decoration: const BoxDecoration(),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 8.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController6,
|
||||
focusNode: _model.textFieldFocusNode6,
|
||||
|
@ -751,7 +774,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 6.0, 0.0, 0.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 6.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 35.0,
|
||||
|
@ -889,7 +913,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
ParamType.String,
|
||||
),
|
||||
'visitorJsonList': serializeParam(
|
||||
widget.visitorJsonList,
|
||||
filteredVisitorJsonList,
|
||||
ParamType.JSON,
|
||||
isList: true,
|
||||
),
|
||||
|
|
|
@ -72,7 +72,6 @@ class VisitRequestTemplateComponentModel
|
|||
(visitRequest.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
Navigator.pop(context);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -557,8 +557,7 @@ class _VisitRequestTemplateComponentWidgetState
|
|||
),
|
||||
onPressed: () async {
|
||||
var shouldSetState = false;
|
||||
_model.blockVisitRequest =
|
||||
await _model.visitRequestComponentAction(
|
||||
await _model.visitRequestComponentAction(
|
||||
context,
|
||||
actionValue: 'B',
|
||||
refUUID: widget.vawRef,
|
||||
|
@ -566,13 +565,10 @@ class _VisitRequestTemplateComponentWidgetState
|
|||
vteUUID: widget.vteUUID,
|
||||
);
|
||||
shouldSetState = true;
|
||||
if (_model.blockVisitRequest == true) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
if (shouldSetState) setState(() {});
|
||||
return;
|
||||
}
|
||||
|
||||
// Verifica se o widget ainda está montado antes de tomar qualquer ação baseada no contexto
|
||||
if (!mounted) return;
|
||||
Navigator.pop(context);
|
||||
if (shouldSetState) setState(() {});
|
||||
},
|
||||
),
|
||||
|
@ -588,8 +584,7 @@ class _VisitRequestTemplateComponentWidgetState
|
|||
),
|
||||
onPressed: () async {
|
||||
var shouldSetState = false;
|
||||
_model.approveVisitRequest =
|
||||
await _model.visitRequestComponentAction(
|
||||
await _model.visitRequestComponentAction(
|
||||
context,
|
||||
actionValue: 'L',
|
||||
refUUID: widget.vawRef,
|
||||
|
@ -597,13 +592,9 @@ class _VisitRequestTemplateComponentWidgetState
|
|||
vteUUID: widget.vteUUID,
|
||||
);
|
||||
shouldSetState = true;
|
||||
if (_model.approveVisitRequest == true) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
if (shouldSetState) setState(() {});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mounted) return;
|
||||
Navigator.pop(context);
|
||||
if (shouldSetState) setState(() {});
|
||||
},
|
||||
),
|
||||
|
|
|
@ -62,7 +62,9 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
FFRoute(
|
||||
name: '_initialize',
|
||||
path: '/',
|
||||
builder: (context, _) => const OnBoardingPageWidget(),
|
||||
builder: (context, _) => FFAppState().isLogged
|
||||
? const HomePageWidget()
|
||||
: const OnBoardingPageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'homePage',
|
||||
|
|
|
@ -52,6 +52,10 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
extends State<ScheduleCompleteVisitPageWidget>
|
||||
with TickerProviderStateMixin {
|
||||
late ScheduleCompleteVisitPageModel _model;
|
||||
int _visitHistoryLoadingIdx = 0;
|
||||
final int _visitHistoryLoadingCount = 10;
|
||||
List<dynamic> _visitHistoryList = [];
|
||||
ScrollController _visitHistoryController = ScrollController();
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
|
@ -99,6 +103,28 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
_model.textFieldFocusNode3 ??= FocusNode();
|
||||
}
|
||||
|
||||
void _loadMoreVisitHistory() async {
|
||||
final total = List.generate(
|
||||
100, (index) => "Item $index"); // Exemplo de lista total de itens
|
||||
final int start = _visitHistoryLoadingIdx * _visitHistoryLoadingCount;
|
||||
final int end = start + _visitHistoryLoadingCount > total.length
|
||||
? total.length
|
||||
: start + _visitHistoryLoadingCount;
|
||||
if (start < total.length) {
|
||||
final List<dynamic> newItems = total.sublist(start, end);
|
||||
_visitHistoryList.addAll(newItems);
|
||||
_visitHistoryLoadingIdx++;
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
||||
void_scrollListener() {
|
||||
if (_visitHistoryController.position.pixels ==
|
||||
_visitHistoryController.position.maxScrollExtent) {
|
||||
_loadMoreVisitHistory();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.dispose();
|
||||
|
@ -215,10 +241,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(-1.0, 0.0),
|
||||
const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
20.0, 30.0, 0.0, 30.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
|
@ -255,7 +283,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
.map((e) => e)
|
||||
.toList();
|
||||
return ListView.separated(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
padding:
|
||||
const EdgeInsets.fromLTRB(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -267,7 +296,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
itemCount:
|
||||
visitorListView.length,
|
||||
separatorBuilder: (_, __) =>
|
||||
const SizedBox(height: 5.0),
|
||||
const SizedBox(
|
||||
height: 5.0),
|
||||
itemBuilder: (context,
|
||||
visitorListViewIndex) {
|
||||
final visitorListViewItem =
|
||||
|
@ -413,8 +443,10 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
],
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(
|
||||
width: 30.0))
|
||||
.divide(
|
||||
const SizedBox(
|
||||
width:
|
||||
30.0))
|
||||
.addToStart(
|
||||
const SizedBox(
|
||||
width:
|
||||
|
@ -429,11 +461,13 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
0.01, 0.0),
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
0.01, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 20.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
|
@ -508,18 +542,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
height: 80.0,
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0),
|
||||
.fromSTEB(0.0,
|
||||
0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
14.0,
|
||||
0.0,
|
||||
0.0,
|
||||
20.0),
|
||||
.fromSTEB(14.0,
|
||||
0.0, 0.0, 20.0),
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryBackground,
|
||||
|
@ -558,11 +586,13 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 50.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(
|
||||
|
@ -570,7 +600,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
.width *
|
||||
0.8,
|
||||
height: 20.0,
|
||||
decoration: const BoxDecoration(),
|
||||
decoration:
|
||||
const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
|
@ -614,10 +645,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(-1.0, 0.0),
|
||||
const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
20.0, 24.0, 0.0, 24.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
|
@ -650,13 +683,15 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
20.0, 0.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 40.0,
|
||||
decoration: const BoxDecoration(),
|
||||
decoration:
|
||||
const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
|
@ -692,7 +727,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
child: Container(
|
||||
width: 100.0,
|
||||
height: 40.0,
|
||||
decoration: const BoxDecoration(),
|
||||
decoration:
|
||||
const BoxDecoration(),
|
||||
child: SizedBox(
|
||||
height: double.infinity,
|
||||
child: Stack(
|
||||
|
@ -701,10 +737,10 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
10.0,
|
||||
0.0,
|
||||
24.0,
|
||||
0.0),
|
||||
10.0,
|
||||
0.0,
|
||||
24.0,
|
||||
0.0),
|
||||
child: TextFormField(
|
||||
controller: _model
|
||||
.textController1,
|
||||
|
@ -844,10 +880,10 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
10.0,
|
||||
0.0,
|
||||
24.0,
|
||||
0.0),
|
||||
10.0,
|
||||
0.0,
|
||||
24.0,
|
||||
0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors
|
||||
.transparent,
|
||||
|
@ -1044,13 +1080,15 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
20.0, 0.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 40.0,
|
||||
decoration: const BoxDecoration(),
|
||||
decoration:
|
||||
const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
|
@ -1086,7 +1124,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
child: Container(
|
||||
width: 100.0,
|
||||
height: 40.0,
|
||||
decoration: const BoxDecoration(),
|
||||
decoration:
|
||||
const BoxDecoration(),
|
||||
child: SizedBox(
|
||||
height: double.infinity,
|
||||
child: Stack(
|
||||
|
@ -1095,10 +1134,10 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
10.0,
|
||||
0.0,
|
||||
24.0,
|
||||
0.0),
|
||||
10.0,
|
||||
0.0,
|
||||
24.0,
|
||||
0.0),
|
||||
child: TextFormField(
|
||||
controller: _model
|
||||
.textController2,
|
||||
|
@ -1238,10 +1277,10 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
10.0,
|
||||
0.0,
|
||||
24.0,
|
||||
0.0),
|
||||
10.0,
|
||||
0.0,
|
||||
24.0,
|
||||
0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors
|
||||
.transparent,
|
||||
|
@ -1441,10 +1480,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(-1.0, 0.0),
|
||||
const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
20.0, 24.0, 0.0, 24.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
|
@ -1477,13 +1518,15 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
20.0, 0.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 42.0,
|
||||
decoration: const BoxDecoration(),
|
||||
decoration:
|
||||
const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
|
@ -1517,13 +1560,15 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 24.0, 0.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 40.0,
|
||||
decoration: const BoxDecoration(),
|
||||
decoration:
|
||||
const BoxDecoration(),
|
||||
child: FutureBuilder<
|
||||
ApiCallResponse>(
|
||||
future: PhpGroup
|
||||
|
@ -1630,10 +1675,10 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
margin:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
16.0,
|
||||
0.0,
|
||||
16.0,
|
||||
0.0),
|
||||
16.0,
|
||||
0.0,
|
||||
16.0,
|
||||
0.0),
|
||||
hidesUnderline: true,
|
||||
isOverButton: true,
|
||||
isSearchable: false,
|
||||
|
@ -1650,13 +1695,15 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
20.0, 0.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 42.0,
|
||||
decoration: const BoxDecoration(),
|
||||
decoration:
|
||||
const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(
|
||||
|
@ -1690,13 +1737,15 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 24.0, 0.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 40.0,
|
||||
decoration: const BoxDecoration(),
|
||||
decoration:
|
||||
const BoxDecoration(),
|
||||
child: FutureBuilder<
|
||||
ApiCallResponse>(
|
||||
future: PhpGroup
|
||||
|
@ -1803,10 +1852,10 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
margin:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
16.0,
|
||||
0.0,
|
||||
16.0,
|
||||
0.0),
|
||||
16.0,
|
||||
0.0,
|
||||
16.0,
|
||||
0.0),
|
||||
hidesUnderline: true,
|
||||
isOverButton: true,
|
||||
isSearchable: false,
|
||||
|
@ -1826,10 +1875,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(-1.0, 0.0),
|
||||
const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
20.0, 24.0, 0.0, 24.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
|
@ -1859,9 +1910,9 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
30.0, 0.0, 30.0, 20.0),
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
30.0, 0.0, 30.0, 20.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
|
@ -1874,7 +1925,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0,
|
||||
130.0, 0.0),
|
||||
130.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
|
@ -1936,10 +1987,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
children: [
|
||||
Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(-1.0, 0.0),
|
||||
const AlignmentDirectional(
|
||||
-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
20.0, 0.0, 0.0, 24.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
|
@ -1969,9 +2022,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
|
@ -2650,10 +2702,10 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
10.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0),
|
||||
10.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0),
|
||||
child: Container(
|
||||
width: 200.0,
|
||||
height: 27.0,
|
||||
|
@ -2786,10 +2838,14 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
BorderRadius.circular(
|
||||
0.0),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(
|
||||
milliseconds: 500),
|
||||
fadeOutDuration: const Duration(
|
||||
milliseconds: 500),
|
||||
fadeInDuration:
|
||||
const Duration(
|
||||
milliseconds:
|
||||
500),
|
||||
fadeOutDuration:
|
||||
const Duration(
|
||||
milliseconds:
|
||||
500),
|
||||
imageUrl: valueOrDefault<
|
||||
String>(
|
||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
|
|
Loading…
Reference in New Issue