Skip to content

Commit

Permalink
V2.0.24
Browse files Browse the repository at this point in the history
Merge pull request #139 from Daniel-Ioannou/v2.0.24
  • Loading branch information
Daniel-Ioannou authored Jan 29, 2024
2 parents 11f3756 + 18151bd commit f2891e0
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 18 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 2.0.24
* Add option for bottom sheet Width.
```Dart
showCountryPicker(
context: context,
countryListTheme: CountryListThemeData(
bottomSheetWidth: 500, // Optional. Country list modal Width
),
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
```
* Add `emojiFontFamilyFallback`

## 2.0.23
* Export `CustomFlagBuilder`
* Add parameter `useRootNavigator`
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
6 changes: 3 additions & 3 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -369,7 +369,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -418,7 +418,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.0.23"
version: "2.0.24"
fake_async:
dependency: transitive
description:
Expand Down
2 changes: 0 additions & 2 deletions lib/country_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ void showCountryPicker({
bool showWorldWide = false,
bool showSearch = true,
bool useSafeArea = false,
List<String>? emojiFontFamilyFallback,
bool useRootNavigator = false,
}) {
assert(
Expand All @@ -79,7 +78,6 @@ void showCountryPicker({
showWorldWide: showWorldWide,
showSearch: showSearch,
useSafeArea: useSafeArea,
emojiFontFamilyFallback: emojiFontFamilyFallback,
useRootNavigator: useRootNavigator,
);
}
4 changes: 0 additions & 4 deletions lib/src/country_list_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ void showCountryListBottomSheet({
bool showWorldWide = false,
bool showSearch = true,
bool useSafeArea = false,
List<String>? emojiFontFamilyFallback,
bool useRootNavigator = false,
}) {
showModalBottomSheet(
Expand All @@ -38,7 +37,6 @@ void showCountryListBottomSheet({
searchAutofocus,
showWorldWide,
showSearch,
emojiFontFamilyFallback,
customFlagBuilder,
),
).whenComplete(() {
Expand All @@ -57,7 +55,6 @@ Widget _builder(
bool searchAutofocus,
bool showWorldWide,
bool showSearch,
List<String>? emojiFontFamilyFallback,
CustomFlagBuilder? customFlagBuilder,
) {
final device = MediaQuery.of(context).size.height;
Expand Down Expand Up @@ -100,7 +97,6 @@ Widget _builder(
searchAutofocus: searchAutofocus,
showWorldWide: showWorldWide,
showSearch: showSearch,
emojiFontFamilyFallback: emojiFontFamilyFallback,
customFlagBuilder: customFlagBuilder,
),
);
Expand Down
4 changes: 4 additions & 0 deletions lib/src/country_list_theme_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ class CountryListThemeData {
/// If null, set to 25
final double? flagSize;

///Custom emoji font family fallback for flags icons
final List<String>? emojiFontFamilyFallback;

///The decoration used for the search field
///
/// It defaults to a basic outline-bordered input decoration
Expand Down Expand Up @@ -58,5 +61,6 @@ class CountryListThemeData {
this.bottomSheetWidth,
this.padding,
this.margin,
this.emojiFontFamilyFallback,
});
}
8 changes: 2 additions & 6 deletions lib/src/country_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ class CountryListView extends StatefulWidget {
/// An optional argument for hiding the search bar
final bool showSearch;

///Custom emoji fontfamily fallback for flags icons
final List<String>? emojiFontFamilyFallback;

/// Custom builder function for flag widget
final CustomFlagBuilder? customFlagBuilder;

Expand All @@ -63,7 +60,6 @@ class CountryListView extends StatefulWidget {
this.showWorldWide = false,
this.showSearch = true,
this.customFlagBuilder,
this.emojiFontFamilyFallback,
}) : assert(
exclude == null || countryFilter == null,
'Cannot provide both exclude and countryFilter',
Expand Down Expand Up @@ -251,7 +247,7 @@ class _CountryListViewState extends State<CountryListView> {
: Utils.countryCodeToEmoji(country.countryCode),
style: TextStyle(
fontSize: widget.countryListTheme?.flagSize ?? 25,
fontFamilyFallback: widget.emojiFontFamilyFallback,
fontFamilyFallback: widget.countryListTheme?.emojiFontFamilyFallback,
),
);

Expand All @@ -272,4 +268,4 @@ class _CountryListViewState extends State<CountryListView> {
}

TextStyle get _defaultTextStyle => const TextStyle(fontSize: 16);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: country_picker
description: A flutter package to select a country from a list of countries.

version: 2.0.23
version: 2.0.24

homepage: https://github.com/Daniel-Ioannou
repository: https://github.com/Daniel-Ioannou/flutter_country_picker
Expand Down

0 comments on commit f2891e0

Please sign in to comment.