This commit is contained in:
2025-06-30 12:30:20 +02:00
parent 9a19818056
commit d040ed2a35
3 changed files with 11 additions and 4 deletions

View File

@@ -28,6 +28,7 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
final TextEditingController _fromAmountController = TextEditingController();
final TextEditingController _toAmountController = TextEditingController();
late Future<List<String>> availableCurrencies;
MihBannerAd _bannerAd = MihBannerAd();
Future<void> submitForm() async {
String fromCurrencyCode = _fromCurrencyController.text.split(" - ")[0];
@@ -65,6 +66,9 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
fullscreen: false,
windowTitle: "Calculation Results",
onWindowTapClose: () {
setState(() {
_bannerAd = MihBannerAd();
});
Navigator.pop(context);
},
windowBody: Column(
@@ -154,7 +158,7 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
],
),
SizedBox(height: 10),
MihBannerAd(),
SizedBox(child: _bannerAd),
],
),
),

View File

@@ -29,6 +29,7 @@ class _TipCalcState extends State<TipCalc> {
final ValueNotifier<String> splitValue = ValueNotifier("");
late bool splitPosition;
final _formKey = GlobalKey<FormState>();
MihBannerAd _bannerAd = MihBannerAd();
String tip = "";
String total = "";
String amountPerPerson = "";
@@ -96,6 +97,9 @@ class _TipCalcState extends State<TipCalc> {
fullscreen: false,
windowTitle: "Calculation Results",
onWindowTapClose: () {
setState(() {
_bannerAd = MihBannerAd();
});
Navigator.pop(context);
},
windowBody: Column(
@@ -223,7 +227,7 @@ class _TipCalcState extends State<TipCalc> {
),
),
SizedBox(height: 10),
MihBannerAd(),
SizedBox(child: _bannerAd),
// if (splitBillController.text == "Yes") const Divider(),
],
),

View File

@@ -41,7 +41,7 @@ class _MihCardsState extends State<MihCards> {
final FocusNode searchFocusNode = FocusNode();
final _formKey = GlobalKey<FormState>();
late Future<List<MIHLoyaltyCard>> cardList;
late MihBannerAd _bannerAd;
MihBannerAd _bannerAd = MihBannerAd();
List<MIHLoyaltyCard> listOfCards = [];
//bool showSelectedCardType = false;
final ValueNotifier<String> shopName = ValueNotifier("");
@@ -311,7 +311,6 @@ class _MihCardsState extends State<MihCards> {
@override
void initState() {
_bannerAd = MihBannerAd();
cardList = MIHMzansiWalletApis.getLoyaltyCards(widget.signedInUser.app_id);
shopController.addListener(shopSelected);
cardSearchController.addListener(searchShop);