From 66bc5ee5a9a79e0504a9dae1e8e42d52f9656f1c Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Sat, 19 Jun 2021 12:17:32 +0200 Subject: [PATCH] polish latest pr --- lib/country_code_picker.dart | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/country_code_picker.dart b/lib/country_code_picker.dart index 1d56969..c979e12 100644 --- a/lib/country_code_picker.dart +++ b/lib/country_code_picker.dart @@ -80,9 +80,9 @@ class CountryCodePicker extends StatefulWidget { /// [BoxDecoration] for the flag image final Decoration? flagDecoration; - /// An optional argument for inject list of countries + /// An optional argument for injecting a list of countries /// with customized codes. - final List> countryList; + final List> countryList; CountryCodePicker({ this.onChanged, @@ -123,11 +123,10 @@ class CountryCodePicker extends StatefulWidget { @override State createState() { - List jsonList = countryList; + List> jsonList = countryList; - List elements = jsonList - .map((json) => CountryCode.fromJson(json as Map)) - .toList(); + List elements = + jsonList.map((json) => CountryCode.fromJson(json)).toList(); if (comparator != null) { elements.sort(comparator);