fix platform specific code not working on web
This commit is contained in:
parent
281ea863e8
commit
5135629b33
11 changed files with 29 additions and 14 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
|
|
@ -159,7 +160,7 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
|
|||
),
|
||||
SizedBox(height: 10),
|
||||
Consumer(builder: (context, bannerAdDisplay, child) {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
|
||||
return MihBannerAd();
|
||||
} else {
|
||||
return const SizedBox(height: 0);
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ class _TipCalcState extends State<TipCalc> {
|
|||
),
|
||||
SizedBox(height: 10),
|
||||
Consumer(builder: (context, bannerAdDisplay, child) {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
|
||||
return MihBannerAd();
|
||||
} else {
|
||||
return const SizedBox(height: 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue