fix bug fcm web

This commit is contained in:
ManhNTX
2022-12-15 16:48:38 +07:00
committed by Dat H. Pham
parent 6897a0fac9
commit e85a573a12
+2
View File
@@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart';
class AppConfig { class AppConfig {
@@ -17,6 +18,7 @@ class AppConfig {
static bool get fcmAvailable { static bool get fcmAvailable {
final supportedOtherPlatform = dotenv.get('FCM_AVAILABLE', fallback: 'unsupported'); final supportedOtherPlatform = dotenv.get('FCM_AVAILABLE', fallback: 'unsupported');
final supportedIOSPlatform = dotenv.get('IOS_FCM', fallback: 'unsupported'); final supportedIOSPlatform = dotenv.get('IOS_FCM', fallback: 'unsupported');
if (kIsWeb) return supportedOtherPlatform == 'supported';
if (Platform.isIOS) { if (Platform.isIOS) {
return supportedIOSPlatform == 'supported'; return supportedIOSPlatform == 'supported';
} else { } else {