Skip to content

Commit 0edb4c7

Browse files
fix: add !kIsWeb check to fix web (#549)
1 parent bc29ad5 commit 0edb4c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/fluttertoast.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'dart:async';
22
import 'dart:io';
33

4+
import 'package:flutter/foundation.dart';
45
import 'package:flutter/material.dart';
56
import 'package:flutter/services.dart';
67

@@ -90,10 +91,10 @@ class Fluttertoast {
9091
gravityToast = "bottom";
9192
}
9293

93-
if (backgroundColor == null && Platform.isIOS) {
94+
if (backgroundColor == null && !kIsWeb && Platform.isIOS) {
9495
backgroundColor = Colors.black;
9596
}
96-
if (textColor == null && Platform.isIOS) {
97+
if (textColor == null && !kIsWeb && Platform.isIOS) {
9798
textColor = Colors.white;
9899
}
99100
final Map<String, dynamic> params = <String, dynamic>{

0 commit comments

Comments
 (0)