Worked on the margin between flag and the country name and also ensured sound-null saftey is enabled
This commit is contained in:
@@ -26,6 +26,6 @@ subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
MyAppState createState() => MyAppState();
|
||||
@@ -107,10 +107,12 @@ class MyAppState extends State<MyApp> {
|
||||
favorite: const ['+39', 'FR'],
|
||||
countryFilter: const ['IT', 'FR'],
|
||||
showFlagDialog: false,
|
||||
comparator: (a, b) => b.name.compareTo(a.name),
|
||||
//You can set the margin between the flag and the country name to your taste.
|
||||
margin: const EdgeInsets.symmetric(horizontal: 6),
|
||||
comparator: (a, b) => b.name!.compareTo(a.name!),
|
||||
//Get the country information relevant to the initial selection
|
||||
onInit: (code) => debugPrint(
|
||||
"on init ${code.name} ${code.dialCode} ${code.name}"),
|
||||
"on init ${code?.name} ${code?.dialCode} ${code?.name}"),
|
||||
),
|
||||
CountryCodePicker(
|
||||
onChanged: print,
|
||||
|
||||
@@ -11,7 +11,7 @@ version: 1.0.0+1
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: ">=2.0.0-dev.68.0 <3.0.0"
|
||||
sdk: '>=2.17.0 <4.0.0'
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
||||
Reference in New Issue
Block a user