Skip to content

Commit

Permalink
bug: Added a check of kIsWeb before Platform.isAndroid due to this bu…
Browse files Browse the repository at this point in the history
…g in flutter: flutter/flutter#50845 (#12)
  • Loading branch information
thelukewalton authored Feb 6, 2024
1 parent de1da26 commit 96de89d
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 96de89d

Please sign in to comment.