offer and discount, do not show if api have issue.

master_eventActivity
Sikander Saleem 9 months ago
parent 9362859013
commit c35074576a

@ -9,9 +9,9 @@ class ApiConsts {
// static String baseUrl = "https://webservices.hmg.com"; // PreProd
// static String baseUrl = "https://hmgwebservices.com"; // Live server
// static String baseUrl = "https://mohemm.hmg.com"; // New Live server
static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
static String baseUrl = "https://mohemm.hmg.com"; // New Live server
//
// static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "http://10.20.200.111:1010/";
// static String baseUrl = "https://webservices.hmg.com"; // PreProd

@ -253,8 +253,10 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
notifyListeners();
} catch (ex) {
// Utils.hideLoading(context);
getOffersList=[];
isOffersLoading = false;
notifyListeners();
Utils.handleException(ex, context, null);
// Utils.handleException(ex, context, null);
}
}

@ -3,7 +3,6 @@ import 'dart:io';
import 'dart:ui' as ui;
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -421,7 +420,11 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
),
],
).paddingOnly(left: 21, right: 21, top: 7, bottom: 21),
Column(
Consumer<DashboardProviderModel>(builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
if (!model.isOffersLoading && model.getOffersList.isEmpty) {
return const SizedBox();
}
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -517,7 +520,8 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
},
),
],
),
);
}),
Container(
width: double.infinity,
padding: const EdgeInsets.only(top: 31),

Loading…
Cancel
Save