add macOS support for ad loading and improve timestamp handling
Some checks failed
Build Android App / build (push) Failing after 49s
Some checks failed
Build Android App / build (push) Failing after 49s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'dart:io' show Platform;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:quotegen_client/pages/home/page.dart';
|
||||
@@ -7,8 +8,8 @@ import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
// Initialize mobile ads (AdMob) only on mobile platforms
|
||||
if (!kIsWeb) {
|
||||
// Initialize mobile ads (AdMob) only on mobile platforms (not web or macOS)
|
||||
if (!kIsWeb && !Platform.isMacOS) {
|
||||
await MobileAds.instance.initialize();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user