Skip to content

Commit

Permalink
Added a check of kIsWeb before Platform.isAndroid due to this bug in …
Browse files Browse the repository at this point in the history
  • Loading branch information
thelukewalton committed Feb 5, 2024
1 parent de1da26 commit fbcc842
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/components/banners/system_banner.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../../../zeta_flutter.dart';
Expand Down Expand Up @@ -38,10 +39,10 @@ class ZetaSystemBanner extends MaterialBanner {
builder: (context) {
final backgroundColor = _backgroundColorFromType(context, type);
final foregroundColor = backgroundColor.onColor;
if (context.mounted) {
if (!kIsWeb && Platform.isAndroid && context.mounted) {
// ignore: invalid_use_of_visible_for_testing_member
final statusBarColor = SystemChrome.latestStyle?.statusBarColor;
if (Platform.isAndroid && statusBarColor != backgroundColor) {
if (statusBarColor != backgroundColor) {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
statusBarColor: backgroundColor,
Expand Down

0 comments on commit fbcc842

Please sign in to comment.