world_countries 0.2.1
world_countries: ^0.2.1 copied to clipboard
Sealed world data in form of Flutter widgets (country, phone, currency pickers, etc.).
import "package:flutter/foundation.dart";
import "package:flutter/widgets.dart";
import "package:world_countries/world_countries.dart";
import "my_app.dart";
Future<void> main() async {
const serbia = CountrySrb();
final countryCode = PlatformDispatcher.instance.locale.countryCode;
final country = WorldCountry.maybeFromValue(
countryCode ?? serbia.codeShort,
where: (expectedCountry) => expectedCountry.codeShort,
);
return runApp(MyApp(country: country ?? serbia));
}