Skip to content

Commit

Permalink
Tree-shake platform specific code
Browse files Browse the repository at this point in the history
  • Loading branch information
FauconSpartiate committed Jun 28, 2024
1 parent be6a0c6 commit 1273934
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/ui/utilities/misc_utilities.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Dart imports:
import "dart:io" show Platform;

// Flutter imports:
import "package:flutter/foundation.dart";
import "package:flutter/material.dart";
Expand Down Expand Up @@ -85,8 +82,8 @@ Future<void> launchURL(Link type) async {
}
}

bool isAndroid = !kIsWeb && Platform.isAndroid;
bool isiOS = !kIsWeb && Platform.isIOS;
bool isAndroid = !kIsWeb && defaultTargetPlatform == TargetPlatform.android;
bool isiOS = !kIsWeb && defaultTargetPlatform == TargetPlatform.iOS;
bool isWeb = kIsWeb;

String? thresholdValidator(String? value, {int threshold = 0, bool inclusive = true}) {
Expand Down

0 comments on commit 1273934

Please sign in to comment.