Skip to content

Commit 58af202

Browse files
committed
remove dart:io dependency
1 parent c6ab48e commit 58af202

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/src/platform/dialog_helper.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import 'dart:io';
2-
31
import 'package:enough_platform_widgets/enough_platform_widgets.dart';
42
import 'package:flutter/cupertino.dart';
53
import 'package:flutter/material.dart';
@@ -24,7 +22,7 @@ class DialogHelper {
2422
bool isDangerousAction = false,
2523
String? cancelActionText,
2624
}) {
27-
if (Platform.isIOS || Platform.isMacOS) {
25+
if (PlatformInfo.isCupertino) {
2826
return showCupertinoDialog<bool>(
2927
builder: (context) => CupertinoAlertDialog(
3028
title: Text(title),
@@ -131,7 +129,7 @@ class DialogHelper {
131129
),
132130
},
133131
];
134-
if (Platform.isIOS || Platform.isMacOS) {
132+
if (PlatformInfo.isCupertino) {
135133
return showCupertinoDialog(
136134
context: context,
137135
builder: (context) => CupertinoAlertDialog(

0 commit comments

Comments
 (0)