Feat: Finalizada a tela de visita completa e de encomendas
This commit is contained in:
parent
8ce59f3f2b
commit
f543a200f1
|
@ -34,9 +34,9 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final textScaler = MediaQuery.textScalerOf(context);
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
final double baseFontSize = 10;
|
final double baseFontSize = 14;
|
||||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||||
final double limitedFontSize = scaledFontSize > 22 ? 10 : baseFontSize;
|
final double limitedFontSize = scaledFontSize > 24 ? 12 : baseFontSize;
|
||||||
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
|
|
@ -6,6 +6,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
// ignore: unused_import
|
// ignore: unused_import
|
||||||
import 'package:hub/shared/helpers/secure_storage_helper.dart';
|
import 'package:hub/shared/helpers/secure_storage_helper.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
|
|
||||||
class OrderFilterModalWidget extends StatefulWidget {
|
class OrderFilterModalWidget extends StatefulWidget {
|
||||||
|
@ -226,8 +227,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildCheckboxListTile(
|
_buildCheckboxListTile(
|
||||||
'adresseeType', adresseeTypeOptions, 14),
|
'adresseeType', adresseeTypeOptions, LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 22, 10)),
|
||||||
_buildCheckboxListTile('status', statusOptions, 14),
|
_buildCheckboxListTile('status', statusOptions, LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 22, 10)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -239,7 +240,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
foregroundColor: FlutterFlowTheme.of(context).info,
|
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
),
|
),
|
||||||
child: Text(FFLocalizations.of(context).getText('88kshkph')),
|
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: TextStyle(fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 22, 10))),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -62,7 +62,7 @@ class _LocalProfileComponentWidgetState
|
||||||
final textScaler = MediaQuery.textScalerOf(context);
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
final double baseFontSize = 14.0;
|
final double baseFontSize = 14.0;
|
||||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||||
final double limitedFontSize = scaledFontSize > 14.0 ? 9 : scaledFontSize;
|
final double limitedFontSize = scaledFontSize > 20 ? 12 : scaledFontSize;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
|
|
|
@ -54,7 +54,7 @@ class _MenuStaggeredViewComponentWidgetState
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final textScaler = MediaQuery.textScalerOf(context);
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
final double scaledFontSize = 14 * textScaler.scale(1);
|
final double scaledFontSize = 14 * textScaler.scale(1);
|
||||||
final int crossAxisCount = scaledFontSize > 20 ? 2 : 3;
|
final int crossAxisCount = scaledFontSize >= 26 ? 1 : scaledFontSize >= 18 ? 2 : 3;
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'dart:collection';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
@ -56,6 +57,8 @@ class _CardItemTemplateComponentWidgetState
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _generateLabels() {
|
List<Widget> _generateLabels() {
|
||||||
|
double limitedTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 24, 10);
|
||||||
|
|
||||||
return labelsLinkedHashMap.entries.map((entry) {
|
return labelsLinkedHashMap.entries.map((entry) {
|
||||||
final key = entry.key;
|
final key = entry.key;
|
||||||
final text = entry.value.toString();
|
final text = entry.value.toString();
|
||||||
|
@ -73,6 +76,7 @@ class _CardItemTemplateComponentWidgetState
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
|
@ -82,7 +86,7 @@ class _CardItemTemplateComponentWidgetState
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: 12.5,
|
fontSize: limitedTextSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
@ -125,21 +129,24 @@ class _CardItemTemplateComponentWidgetState
|
||||||
final text = entry.key;
|
final text = entry.key;
|
||||||
final color = entry.value;
|
final color = entry.value;
|
||||||
|
|
||||||
return Container(
|
return Tooltip(
|
||||||
padding: const EdgeInsets.all(5),
|
message: text,
|
||||||
width: MediaQuery.of(context).size.width * 0.25,
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
padding: const EdgeInsets.all(5),
|
||||||
color: color,
|
width: MediaQuery.of(context).size.width * 0.25,
|
||||||
borderRadius: BorderRadius.circular(5),
|
decoration: BoxDecoration(
|
||||||
),
|
color: color,
|
||||||
child: Center(
|
borderRadius: BorderRadius.circular(5),
|
||||||
child: Text(
|
),
|
||||||
text,
|
child: Center(
|
||||||
overflow: TextOverflow.ellipsis,
|
child: Text(
|
||||||
style: TextStyle(
|
text,
|
||||||
color: FlutterFlowTheme.of(context).info,
|
overflow: TextOverflow.ellipsis,
|
||||||
fontSize: 12,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
|
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 12, 22, 10),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -6,6 +6,7 @@ import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/components/templates_components/details_component/details_component_model.dart';
|
import 'package:hub/components/templates_components/details_component/details_component_model.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
|
|
||||||
class DetailsComponentWidget extends StatefulWidget {
|
class DetailsComponentWidget extends StatefulWidget {
|
||||||
|
@ -62,7 +63,12 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// CachedNetworkImage.evictFromCache(widget.imagePath ?? '');
|
// CachedNetworkImage.evictFromCache(widget.imagePath ?? '');
|
||||||
|
final double limitedFontSize = LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||||
|
context,
|
||||||
|
12.0,
|
||||||
|
16.0,
|
||||||
|
10.0,
|
||||||
|
);
|
||||||
return Container(
|
return Container(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
maxWidth: MediaQuery.of(context).size.width,
|
maxWidth: MediaQuery.of(context).size.width,
|
||||||
|
@ -132,7 +138,9 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.labelMediumFamily,
|
.labelMediumFamily,
|
||||||
|
|
||||||
),
|
),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
|
@ -145,6 +153,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.labelMediumFamily,
|
.labelMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
errorBorder: InputBorder.none,
|
errorBorder: InputBorder.none,
|
||||||
|
@ -162,6 +171,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -186,6 +196,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
return TextFormField(
|
return TextFormField(
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
initialValue: '$value',
|
initialValue: '$value',
|
||||||
|
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
@ -194,8 +205,11 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
|
||||||
labelText: key,
|
labelText: key,
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -216,7 +230,9 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
.override(
|
.override(
|
||||||
|
|
|
@ -14,6 +14,7 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
|
class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
|
||||||
const VisitorSearchModalTemplateComponentWidget({
|
const VisitorSearchModalTemplateComponentWidget({
|
||||||
|
@ -59,6 +60,19 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final double limitedFontSize = LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||||
|
context,
|
||||||
|
12,
|
||||||
|
16,
|
||||||
|
10
|
||||||
|
);
|
||||||
|
final double limitedHeaderFontSize = LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||||
|
context,
|
||||||
|
14,
|
||||||
|
16,
|
||||||
|
12
|
||||||
|
);
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -99,8 +113,9 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getVariableText(
|
||||||
'cjlpru1m' /* Procure pelo documento do visi... */,
|
enText: 'Document of the Visitor',
|
||||||
|
ptText: 'Documento do Visitante',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
|
@ -109,6 +124,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -170,6 +186,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
keyboardType:
|
keyboardType:
|
||||||
const TextInputType.numberWithOptions(signed: true),
|
const TextInputType.numberWithOptions(signed: true),
|
||||||
|
@ -198,6 +215,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -212,6 +230,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -311,6 +330,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.bodyLargeFamily),
|
.bodyLargeFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -382,8 +402,8 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
ptText: 'Enviar',
|
ptText: 'Enviar',
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: MediaQuery.of(context).size.width * 0.3,
|
width: MediaQuery.of(context).size.width * 0.4,
|
||||||
height: MediaQuery.of(context).size.width * 0.1,
|
height: 40,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
24.0, 0.0, 24.0, 0.0),
|
24.0, 0.0, 24.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
@ -396,6 +416,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
|
|
@ -10,6 +10,7 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
import 'package:hub/flutter_flow/internationalization.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:json_path/json_path.dart';
|
import 'package:json_path/json_path.dart';
|
||||||
import 'package:timeago/timeago.dart' as timeago;
|
import 'package:timeago/timeago.dart' as timeago;
|
||||||
|
@ -565,13 +566,19 @@ void showSnackbar(
|
||||||
|
|
||||||
void showAlertDialog(BuildContext context, String title, String content,
|
void showAlertDialog(BuildContext context, String title, String content,
|
||||||
Future<void> Function() action) {
|
Future<void> Function() action) {
|
||||||
|
double limitedTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 20, 12);
|
||||||
|
double limitedHeaderSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 20, 28, 18);
|
||||||
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
title: Text(title),
|
title: Text(title, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderSize), textAlign: TextAlign.center),
|
||||||
content: Text(content),
|
content: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(content, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedTextSize)),
|
||||||
|
),
|
||||||
actions: [
|
actions: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
@ -581,15 +588,17 @@ void showAlertDialog(BuildContext context, String title, String content,
|
||||||
onPressed: () => context.pop(), //Navigator.pop(context),
|
onPressed: () => context.pop(), //Navigator.pop(context),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: MediaQuery.of(context).size.width * 0.3,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: MediaQuery.of(context).size.height * 0.05,
|
height: 50,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: limitedTextSize
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
),
|
),
|
||||||
|
@ -604,12 +613,14 @@ void showAlertDialog(BuildContext context, String title, String content,
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: MediaQuery.of(context).size.width * 0.3,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: MediaQuery.of(context).size.height * 0.05,
|
height: 50,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: limitedTextSize
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
|
|
|
@ -97,13 +97,14 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: AutoSizeText(
|
: Text(
|
||||||
text ?? '',
|
text ?? '',
|
||||||
style:
|
style:
|
||||||
text == null ? null : widget.options.textStyle?.withoutColor(),
|
text == null ? null : widget.options.textStyle?.withoutColor(),
|
||||||
textAlign: widget.options.textAlign,
|
textAlign: widget.options.textAlign,
|
||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final onPressed = widget.onPressed != null
|
final onPressed = widget.onPressed != null
|
||||||
|
|
|
@ -10,6 +10,7 @@ import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.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/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.dart';
|
import 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
@ -178,6 +179,7 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
||||||
defaultStatus:
|
defaultStatus:
|
||||||
_selectedTypeSubject.value['status'] ??
|
_selectedTypeSubject.value['status'] ??
|
||||||
'.*',
|
'.*',
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -264,6 +266,11 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: "Nenhuma encomenda encontrada!",
|
ptText: "Nenhuma encomenda encontrada!",
|
||||||
enText: "No orders found!"),
|
enText: "No orders found!"),
|
||||||
|
style: TextStyle(
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||||
|
context, 14, 24, 12),
|
||||||
|
),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -9,6 +9,7 @@ import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/flutter_flow/request_manager.dart';
|
import 'package:hub/flutter_flow/request_manager.dart';
|
||||||
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
|
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
|
||||||
import 'package:hub/shared/mixins/status_mixin.dart';
|
import 'package:hub/shared/mixins/status_mixin.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
import 'package:share_plus/share_plus.dart';
|
import 'package:share_plus/share_plus.dart';
|
||||||
|
|
||||||
|
@ -441,6 +442,7 @@ class ScheduleCompleteVisitPageModel
|
||||||
ptText: 'Cancelar',
|
ptText: 'Cancelar',
|
||||||
enText: 'Cancel',
|
enText: 'Cancel',
|
||||||
),
|
),
|
||||||
|
|
||||||
icon: const Icon(Icons.close),
|
icon: const Icon(Icons.close),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
showAlertDialog(
|
showAlertDialog(
|
||||||
|
@ -498,17 +500,19 @@ class ScheduleCompleteVisitPageModel
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 130,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 14),
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(132, 255, 17, 0),
|
||||||
// borderRadius: 12,
|
// borderRadius: 12,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -532,17 +536,19 @@ class ScheduleCompleteVisitPageModel
|
||||||
switchTab(0);
|
switchTab(0);
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 130,
|
width: MediaQuery.of(context).size.width * 0.5,
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 14),
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(137, 134, 134, 134),
|
||||||
// borderRadius: 12,
|
// borderRadius: 12,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -566,17 +572,19 @@ URL do Convite: https://visita.freaccess.com.br/${item['VAW_ID']}/$cliUUID/${ite
|
||||||
''');
|
''');
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 130,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 14),
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(136, 97, 160, 255),
|
||||||
// borderRadius: 12,
|
// borderRadius: 12,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -19,6 +19,7 @@ import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart';
|
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart';
|
||||||
import 'package:hub/pages/schedule_complete_visit_page/visit_history_page_widget.dart';
|
import 'package:hub/pages/schedule_complete_visit_page/visit_history_page_widget.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/share_util.dart';
|
import 'package:hub/shared/utils/share_util.dart';
|
||||||
|
|
||||||
class ScheduleComplete extends StatefulWidget {
|
class ScheduleComplete extends StatefulWidget {
|
||||||
|
@ -170,10 +171,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
unselectedLabelColor: FlutterFlowTheme.of(context).primaryText,
|
unselectedLabelColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
||||||
fontSize: 13.0,
|
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||||
|
context, 12.0, 16.0, 10.0),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).titleMediumFamily),
|
FlutterFlowTheme.of(context).titleMediumFamily),
|
||||||
|
|
||||||
),
|
),
|
||||||
unselectedLabelStyle: const TextStyle(),
|
unselectedLabelStyle: const TextStyle(),
|
||||||
indicatorColor: FlutterFlowTheme.of(context).primary,
|
indicatorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -259,115 +262,112 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width * 0.85,
|
||||||
height: scaledSizedBoxSize,
|
height: scaledSizedBoxSize,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
TextFormField(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
controller: model.textController1,
|
||||||
24.0, 0.0, 24.0, 0.0),
|
readOnly: true,
|
||||||
child: TextFormField(
|
focusNode: model.textFieldFocusNode1,
|
||||||
controller: model.textController1,
|
autovalidateMode:
|
||||||
readOnly: true,
|
AutovalidateMode.onUserInteraction,
|
||||||
focusNode: model.textFieldFocusNode1,
|
autofocus: false,
|
||||||
autovalidateMode:
|
obscureText: false,
|
||||||
AutovalidateMode.onUserInteraction,
|
decoration: InputDecoration(
|
||||||
autofocus: false,
|
isDense: true,
|
||||||
obscureText: false,
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
decoration: InputDecoration(
|
.labelMedium
|
||||||
isDense: true,
|
|
||||||
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),
|
|
||||||
fontSize: limitedFontSize,
|
|
||||||
),
|
|
||||||
hintText:
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'53cbwqh9',
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
lineHeight: 1.0,
|
|
||||||
fontSize: limitedFontSize,
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.accent4,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
suffixIcon: Icon(
|
|
||||||
Icons.date_range,
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
fontFamily:
|
||||||
.bodyMediumFamily,
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.bodyMediumFamily),
|
.labelMediumFamily),
|
||||||
lineHeight: 1.8,
|
|
||||||
fontSize: limitedFontSize,
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
hintText:
|
||||||
validator: model.textController1Validator
|
FFLocalizations.of(context).getText(
|
||||||
.asValidator(context)),
|
'53cbwqh9',
|
||||||
),
|
),
|
||||||
|
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),
|
||||||
|
lineHeight: 1.0,
|
||||||
|
fontSize: limitedFontSize,
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.accent4,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primary,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.date_range,
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).accent1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
lineHeight: 1.8,
|
||||||
|
fontSize: limitedFontSize,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
validator: model.textController1Validator
|
||||||
|
.asValidator(context)),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
24.0, 0.0, 24.0, 0.0),
|
24.0, 0.0, 24.0, 0.0),
|
||||||
|
@ -522,109 +522,106 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width * 0.85,
|
||||||
height: scaledSizedBoxSize,
|
height: scaledSizedBoxSize,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
TextFormField(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
readOnly: true,
|
||||||
24.0, 0.0, 24.0, 0.0),
|
controller: model.textController2,
|
||||||
child: TextFormField(
|
focusNode: model.textFieldFocusNode2,
|
||||||
readOnly: true,
|
autovalidateMode:
|
||||||
controller: model.textController2,
|
AutovalidateMode.onUserInteraction,
|
||||||
focusNode: model.textFieldFocusNode2,
|
autofocus: false,
|
||||||
autovalidateMode:
|
obscureText: false,
|
||||||
AutovalidateMode.onUserInteraction,
|
decoration: InputDecoration(
|
||||||
autofocus: false,
|
isDense: true,
|
||||||
obscureText: false,
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
decoration: InputDecoration(
|
.labelMedium
|
||||||
isDense: true,
|
|
||||||
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),
|
|
||||||
fontSize: limitedFontSize,
|
|
||||||
),
|
|
||||||
hintText: FFLocalizations.of(context).getText(
|
|
||||||
'xpgc5e8d',
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
lineHeight: 1.0,
|
|
||||||
fontSize: limitedFontSize,
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).accent4,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
suffixIcon: Icon(
|
|
||||||
Icons.date_range,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
.bodyMediumFamily,
|
.labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.bodyMediumFamily),
|
.labelMediumFamily),
|
||||||
lineHeight: 1.8,
|
|
||||||
fontSize: limitedFontSize,
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
hintText: FFLocalizations.of(context).getText(
|
||||||
validator: model.textController2Validator
|
'xpgc5e8d',
|
||||||
.asValidator(context),
|
),
|
||||||
|
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),
|
||||||
|
lineHeight: 1.0,
|
||||||
|
fontSize: limitedFontSize,
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).accent4,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).primary,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.date_range,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
lineHeight: 1.8,
|
||||||
|
fontSize: limitedFontSize,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
validator: model.textController2Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
@ -1057,8 +1054,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
24.0, 0.0, 24.0, 0.0),
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
height: 45.0,
|
height: scaledSizedBoxSize *0.5,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: FutureBuilder<ApiCallResponse>(
|
child: FutureBuilder<ApiCallResponse>(
|
||||||
future: PhpGroup.getDadosCall.call(),
|
future: PhpGroup.getDadosCall.call(),
|
||||||
|
@ -1112,11 +1109,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.bodyMediumFamily),
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
hintText:
|
hintText:
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getVariableText(enText: 'Reason for Visit', ptText: 'Motivo da Visita'
|
||||||
'6p3e0bzr',
|
|
||||||
),
|
),
|
||||||
|
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.keyboard_arrow_down_rounded,
|
Icons.keyboard_arrow_down_rounded,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
|
@ -1148,18 +1146,22 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Expanded(
|
||||||
padding: const EdgeInsets.symmetric(
|
child: Padding(
|
||||||
horizontal: 30.0, vertical: 5.0),
|
padding: const EdgeInsets.symmetric(
|
||||||
child: Text(
|
horizontal: 30.0, vertical: 5.0),
|
||||||
FFLocalizations.of(context).getVariableText(
|
child: Text(
|
||||||
enText: 'Field is Required',
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Campo Obrigatório',
|
enText: 'Select a reason for the visit',
|
||||||
),
|
ptText: 'Selecione um motivo da visita',
|
||||||
style: TextStyle(
|
),
|
||||||
color: FlutterFlowTheme.of(context)
|
overflow: TextOverflow.ellipsis,
|
||||||
.customColor6,
|
maxLines: 2,
|
||||||
fontSize: 12.0)),
|
style: TextStyle(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.customColor6,
|
||||||
|
fontSize: limitedFontSize)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1176,7 +1178,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
24.0, 0.0, 24.0, 0.0),
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: 45.0,
|
height: scaledSizedBoxSize *0.5,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: FutureBuilder<ApiCallResponse>(
|
child: FutureBuilder<ApiCallResponse>(
|
||||||
future: PhpGroup.getDadosCall.call(),
|
future: PhpGroup.getDadosCall.call(),
|
||||||
|
@ -1227,10 +1229,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.bodyMediumFamily),
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
hintText:
|
hintText:
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
'2wun8p6c',
|
enText: 'Level of access',
|
||||||
|
ptText: 'Nível de acesso',
|
||||||
),
|
),
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.keyboard_arrow_down_rounded,
|
Icons.keyboard_arrow_down_rounded,
|
||||||
|
@ -1265,18 +1269,22 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Expanded(
|
||||||
padding: const EdgeInsets.symmetric(
|
child: Padding(
|
||||||
horizontal: 30.0, vertical: 5.0),
|
padding: const EdgeInsets.symmetric(
|
||||||
child: Text(
|
horizontal: 30.0, vertical: 5.0),
|
||||||
FFLocalizations.of(context).getVariableText(
|
child: Text(
|
||||||
enText: 'Field is Required',
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Campo Obrigatório',
|
enText: 'Select a level of access',
|
||||||
),
|
ptText: 'Selecione um nível de acesso',
|
||||||
style: TextStyle(
|
),
|
||||||
color: FlutterFlowTheme.of(context)
|
overflow: TextOverflow.ellipsis,
|
||||||
.customColor6,
|
maxLines: 2,
|
||||||
fontSize: 12.0)),
|
style: TextStyle(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.customColor6,
|
||||||
|
fontSize: limitedFontSize)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1316,30 +1324,27 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
30.0, 0.0, 30.0, 20.0),
|
30.0, 0.0, 30.0, 20.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Padding(
|
child: Text(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
FFLocalizations.of(context).getText(
|
||||||
0.0, 0.0, 130.0, 0.0),
|
'lgv0q5ht',
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'lgv0q5ht',
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Switch(
|
Switch(
|
||||||
|
@ -1444,6 +1449,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
.labelMediumFamily),
|
.labelMediumFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'w18iztdm',
|
'w18iztdm',
|
||||||
|
@ -1459,6 +1465,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
.labelMediumFamily),
|
.labelMediumFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -1503,6 +1510,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.bodyMediumFamily),
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedFontSize,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -1527,6 +1535,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
enText: 'Schedule',
|
enText: 'Schedule',
|
||||||
ptText: 'Agendar',
|
ptText: 'Agendar',
|
||||||
),
|
),
|
||||||
|
|
||||||
onPressed: model.isValid()
|
onPressed: model.isValid()
|
||||||
? () async {
|
? () async {
|
||||||
Future<void> scheduleVisit() async {
|
Future<void> scheduleVisit() async {
|
||||||
|
@ -1625,6 +1634,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.primaryText,
|
.primaryText,
|
||||||
|
fontSize: 16/ MediaQuery.textScalerOf(context).scale(1),
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
|
@ -1680,9 +1690,15 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
height: MediaQuery.of(context).size.height * 0.05,
|
height: 40,
|
||||||
width: MediaQuery.of(context).size.height * 0.2,
|
width: MediaQuery.of(context).size.width * 0.5,
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
textStyle: FlutterFlowTheme.of(context).subtitle2.override(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
fontSize: 18.0 / MediaQuery.textScalerOf(context).scale(1),
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(15.0),
|
bottomLeft: Radius.circular(15.0),
|
||||||
bottomRight: Radius.circular(15.0),
|
bottomRight: Radius.circular(15.0),
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_p
|
||||||
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
|
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
|
||||||
import 'package:hub/shared/mixins/status_mixin.dart';
|
import 'package:hub/shared/mixins/status_mixin.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.dart';
|
import 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
@ -127,6 +128,9 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget>
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
double limitedTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 24, 12);
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -140,7 +144,13 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget>
|
||||||
Center(
|
Center(
|
||||||
child: Text(FFLocalizations.of(context).getVariableText(
|
child: Text(FFLocalizations.of(context).getVariableText(
|
||||||
ptText: "Nenhuma visita encontrada!",
|
ptText: "Nenhuma visita encontrada!",
|
||||||
enText: "No visit found")),
|
enText: "No visit found"),
|
||||||
|
style: TextStyle(
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: limitedTextSize,
|
||||||
|
fontWeight: FontWeight.bold
|
||||||
|
)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class LimitedTextSizeUtil {
|
||||||
|
static double getLimitedBodyFontSize(BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) {
|
||||||
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
|
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||||
|
return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
static double getNoResizeFont(BuildContext context, double baseFontSize) {
|
||||||
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
|
final double noscaledFontSize = baseFontSize / textScaler.scale(1);
|
||||||
|
return noscaledFontSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
static double getScaledSizedBoxSize(BuildContext context, double baseFontSize, double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) {
|
||||||
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
|
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||||
|
return scaledFontSize > maxFontSize ? sizeIfExceeded : sizeIfNotExceeded;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue