use universal_platform

This commit is contained in:
Salvatore Giordano
2021-03-13 13:05:00 +01:00
parent 2324391cf1
commit 6c4a99adc5
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,5 @@
library country_code_picker;
import 'dart:io';
import 'package:collection/collection.dart' show IterableExtension;
import 'package:country_code_picker/country_code.dart';
import 'package:country_code_picker/country_codes.dart';
@@ -9,6 +7,7 @@ import 'package:country_code_picker/selection_dialog.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
import 'package:universal_platform/universal_platform.dart';
export 'country_code.dart';
@@ -279,7 +278,7 @@ class CountryCodePickerState extends State<CountryCodePicker> {
}
void showCountryCodePickerDialog() {
if (kIsWeb || (!Platform.isIOS && !Platform.isAndroid)) {
if (!UniversalPlatform.isAndroid && !UniversalPlatform.isIOS) {
showDialog(
barrierColor: widget.barrierColor ?? Colors.grey.withOpacity(0.5),
// backgroundColor: widget.backgroundColor ?? Colors.transparent,

View File

@@ -12,6 +12,7 @@ dependencies:
modal_bottom_sheet: ^2.0.0
collection: ^1.15.0
universal_platform: ^1.0.0-nullsafety
flutter:
assets: