fix: alteracoes solicitadas pelo Daniel dia 11/13/2024
This commit is contained in:
parent
44e9e736a3
commit
29c246fe03
|
@ -133,7 +133,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
safeSetState;
|
||||
});
|
||||
if (options.contains(MenuOption.PackagesOnTheProperty))
|
||||
addMenuEntry(Icons.inventory_2_outlined, 'My Orders', 'Minhas Encomendas', () async {
|
||||
addMenuEntry(Icons.inventory_2_outlined, 'Orders', 'Encomendas', () async {
|
||||
if (await StorageHelper().get(SQLiteStorageKey.whatsapp.value, Storage.SQLiteStorage) == 'true')
|
||||
await open(context, '/packageOrder');
|
||||
else
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -182,7 +183,7 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_generateImage(),
|
||||
if (widget.imagePath != null) _generateImage(),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Column(
|
||||
|
|
|
@ -22,7 +22,7 @@ class DetailsComponentWidget extends StatefulWidget {
|
|||
final List<Map<String, Color>?> statusHashMap;
|
||||
final String? imagePath;
|
||||
final Future Function()? onTapCardItemAction;
|
||||
final List<Widget> buttons;
|
||||
final List<Widget>? buttons;
|
||||
|
||||
@override
|
||||
State<DetailsComponentWidget> createState() => _DetailsComponentWidgetState();
|
||||
|
@ -75,7 +75,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
|
||||
if (widget.imagePath != null)
|
||||
if (widget.imagePath != null && widget.imagePath != '')
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: MediaQuery.of(context).size.width * 0.3,
|
||||
|
@ -86,7 +86,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 100),
|
||||
fadeOutDuration: const Duration(milliseconds: 100),
|
||||
imageUrl: widget.imagePath ?? '',
|
||||
imageUrl: widget.imagePath!,
|
||||
fit: BoxFit.cover,
|
||||
useOldImageOnUrlChange: true,
|
||||
),
|
||||
|
@ -238,14 +238,14 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
},
|
||||
),
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
|
||||
if (widget.buttons.isNotEmpty) // Adicione este SizedBox com a altura desejada
|
||||
if (widget.buttons!.isNotEmpty || widget.buttons != null)
|
||||
OverflowBar(
|
||||
overflowAlignment: OverflowBarAlignment.center,
|
||||
alignment: MainAxisAlignment.center,
|
||||
overflowSpacing: 2,
|
||||
spacing: 2,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: widget.buttons,
|
||||
children: widget.buttons!,
|
||||
),
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
|
||||
],
|
||||
|
|
|
@ -59,7 +59,8 @@ class _AboutPropertyPageState extends State<AboutPropertyPage> with SingleTicker
|
|||
}
|
||||
|
||||
Widget _buildBody(BuildContext context) {
|
||||
return Container(
|
||||
return SingleChildScrollView(
|
||||
child: Container(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
child: wrapWithModel(
|
||||
model: _model.menuComponentModel,
|
||||
|
@ -69,6 +70,7 @@ class _AboutPropertyPageState extends State<AboutPropertyPage> with SingleTicker
|
|||
child: MenuComponentWidget(model: _model.menuComponentModel),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,11 +36,11 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
|||
List<dynamic> _orderList = [];
|
||||
|
||||
final Map<String, String> filter = {
|
||||
'adresseeType': '.*',
|
||||
'adresseeType': 'PRO',
|
||||
'status': 'notPickedUp',
|
||||
};
|
||||
|
||||
String _adresseeType = '.*';
|
||||
String _adresseeType = 'PRO';
|
||||
String _status = 'notPickedUp';
|
||||
|
||||
late BehaviorSubject<Map<String, String>> _selectedTypeSubject;
|
||||
|
@ -224,7 +224,7 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
|||
return AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(FFLocalizations.of(context).getVariableText(enText: 'My Orders', ptText: 'Minhas Encomendas'),
|
||||
title: Text(FFLocalizations.of(context).getVariableText(enText: 'Orders', ptText: 'Encomendas'),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
|
|
|
@ -38,7 +38,7 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
model = widget.model ?? createModel(context, () => PetsPageModel());
|
||||
model = widget.model ?? createModel(context, () => PetsPageModel(isInteractive: false));
|
||||
_petsFuture = _fetchVisits();
|
||||
_scrollController = ScrollController()
|
||||
..addListener(() {
|
||||
|
|
|
@ -20,6 +20,11 @@ import 'package:hub/shared/utils/limited_text_size.dart';
|
|||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
|
||||
class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
||||
PetsPageModel({
|
||||
required this.isInteractive,
|
||||
});
|
||||
late final bool isInteractive;
|
||||
|
||||
late String devUUID = '';
|
||||
late String userUUID = '';
|
||||
late String cliUUID = '';
|
||||
|
@ -393,8 +398,8 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
required PetsPageModel model,
|
||||
}) {
|
||||
return DetailsComponentWidget(
|
||||
buttons: [
|
||||
// EDIT ACTION
|
||||
buttons: isInteractive
|
||||
? [
|
||||
FFButtonWidget(
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Editar',
|
||||
|
@ -426,8 +431,6 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
// borderRadius: 12,
|
||||
),
|
||||
),
|
||||
|
||||
// DELETE ACTION
|
||||
FFButtonWidget(
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Excluir',
|
||||
|
@ -503,8 +506,8 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
// borderRadius: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
// 'MIN', 'PEQ', 'MED', 'GRA', 'GIG'
|
||||
]
|
||||
: [],
|
||||
labelsHashMap: Map<String, String>.from({
|
||||
if (item['species'] != null && item['species'] != '')
|
||||
'${FFLocalizations.of(context).getVariableText(ptText: "Espécie", enText: "Species")}:':
|
||||
|
|
|
@ -34,7 +34,7 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => PetsPageModel());
|
||||
_model = createModel(context, () => PetsPageModel(isInteractive: true));
|
||||
|
||||
_model.updateOnChange = true;
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ class _VisitsOnThePropertyState extends State<VisitsOnTheProperty> with TickerPr
|
|||
return AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(FFLocalizations.of(context).getVariableText(enText: 'Visitas em aberto', ptText: 'Opened visits'),
|
||||
title: Text(FFLocalizations.of(context).getVariableText(ptText: 'Visitas em aberto', enText: 'Opened visits'),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
|
|
Loading…
Reference in New Issue