Skip to content

Commit

Permalink
fix: add !kIsWeb check to fix web (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-Zimmerman authored Feb 11, 2025
1 parent bc29ad5 commit 0edb4c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/fluttertoast.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

Expand Down Expand Up @@ -90,10 +91,10 @@ class Fluttertoast {
gravityToast = "bottom";
}

if (backgroundColor == null && Platform.isIOS) {
if (backgroundColor == null && !kIsWeb && Platform.isIOS) {
backgroundColor = Colors.black;
}
if (textColor == null && Platform.isIOS) {
if (textColor == null && !kIsWeb && Platform.isIOS) {
textColor = Colors.white;
}
final Map<String, dynamic> params = <String, dynamic>{
Expand Down

0 comments on commit 0edb4c7

Please sign in to comment.