use universal_platform
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
library country_code_picker;
|
library country_code_picker;
|
||||||
|
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:collection/collection.dart' show IterableExtension;
|
import 'package:collection/collection.dart' show IterableExtension;
|
||||||
import 'package:country_code_picker/country_code.dart';
|
import 'package:country_code_picker/country_code.dart';
|
||||||
import 'package:country_code_picker/country_codes.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/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
||||||
|
import 'package:universal_platform/universal_platform.dart';
|
||||||
|
|
||||||
export 'country_code.dart';
|
export 'country_code.dart';
|
||||||
|
|
||||||
@@ -279,7 +278,7 @@ class CountryCodePickerState extends State<CountryCodePicker> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showCountryCodePickerDialog() {
|
void showCountryCodePickerDialog() {
|
||||||
if (kIsWeb || (!Platform.isIOS && !Platform.isAndroid)) {
|
if (!UniversalPlatform.isAndroid && !UniversalPlatform.isIOS) {
|
||||||
showDialog(
|
showDialog(
|
||||||
barrierColor: widget.barrierColor ?? Colors.grey.withOpacity(0.5),
|
barrierColor: widget.barrierColor ?? Colors.grey.withOpacity(0.5),
|
||||||
// backgroundColor: widget.backgroundColor ?? Colors.transparent,
|
// backgroundColor: widget.backgroundColor ?? Colors.transparent,
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ dependencies:
|
|||||||
|
|
||||||
modal_bottom_sheet: ^2.0.0
|
modal_bottom_sheet: ^2.0.0
|
||||||
collection: ^1.15.0
|
collection: ^1.15.0
|
||||||
|
universal_platform: ^1.0.0-nullsafety
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
assets:
|
assets:
|
||||||
|
|||||||
Reference in New Issue
Block a user