diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist
index 6b4c0f7..4f8d4d2 100644
--- a/example/ios/Flutter/AppFrameworkInfo.plist
+++ b/example/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 8.0
+ 11.0
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index ffec437..3c5000f 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@@ -140,7 +140,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1020;
+ LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -184,6 +184,7 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -198,6 +199,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -286,7 +288,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -365,7 +367,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -414,7 +416,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index a28140c..3db53b6 100644
--- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
UIViewControllerBasedStatusBarAppearance
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 6c80671..110c7fd 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -110,7 +110,6 @@ class _MyHomePageState extends State {
FlagPicker(
width: 50,
height: 300,
- preCache: displayFlagPicker!,
),
],
),
@@ -121,12 +120,14 @@ class _MyHomePageState extends State {
}
class FlagPicker extends StatefulWidget {
- const FlagPicker({Key? key, this.width, this.height, this.preCache = false})
- : super(key: key);
+ const FlagPicker({
+ Key? key,
+ this.width,
+ this.height,
+ }) : super(key: key);
final double? width;
final double? height;
- final bool preCache;
@override
_FlagPicker createState() => _FlagPicker();
@@ -145,14 +146,6 @@ class _FlagPicker extends State {
);
}
- @override
- void didChangeDependencies() {
- super.didChangeDependencies();
- if (widget.preCache) {
- Flag.preloadFlag(context: context);
- }
- }
-
@override
void dispose() {
_controller.dispose();
diff --git a/lib/flag_widget.dart b/lib/flag_widget.dart
index 49cdefe..d5aad42 100644
--- a/lib/flag_widget.dart
+++ b/lib/flag_widget.dart
@@ -133,18 +133,4 @@ class Flag extends StatelessWidget {
return returnWidget;
}
}
-
- static Future preloadFlag({
- required BuildContext context,
- List flagList = flagsCode,
- }) async {
- for (final flag in flagList) {
- await precachePicture(
- ExactAssetPicture(
- SvgPicture.svgStringDecoderBuilder,
- 'packages/flag/res/4x3/$flag.svg',
- ),
- context);
- }
- }
}
diff --git a/lib/flags_widget.dart b/lib/flags_widget.dart
index 935de07..7971066 100644
--- a/lib/flags_widget.dart
+++ b/lib/flags_widget.dart
@@ -15,7 +15,7 @@ class Flags extends StatelessWidget {
/// The flag to display. Enum value for `FlagsCode`.
///
/// This value listed in https://github.com/LunaGao/flag_flutter/blob/master/un_members.txt.
- final List countiyCodes;
+ final List countryCodes;
/// Requires the child to have exactly this height.
///
@@ -61,7 +61,7 @@ class Flags extends StatelessWidget {
///
/// The [country] parameter must not be null.
const Flags.fromCode(
- this.countiyCodes, {
+ this.countryCodes, {
Key? key,
this.height = 300,
this.width = 400,
@@ -69,7 +69,7 @@ class Flags extends StatelessWidget {
this.flagSize = FlagSize.size_4x3,
this.borderRadius,
}) : assert(
- countiyCodes.length == 2,
+ countryCodes.length == 2,
'countiyCodes count must be 2.',
),
this.counties = const [],
@@ -92,16 +92,16 @@ class Flags extends StatelessWidget {
counties.length == 2,
'counties count must be 2.',
),
- this.countiyCodes = const [],
+ this.countryCodes = const [],
super(key: key);
@override
Widget build(BuildContext context) {
List countryNames =
this.counties.map((e) => e.toLowerCase()).toList();
- if (this.countiyCodes.isNotEmpty) {
+ if (this.countryCodes.isNotEmpty) {
countryNames = this
- .countiyCodes
+ .countryCodes
.map((e) => EnumToString.convertToString(e).toLowerCase())
.toList();
}
@@ -149,17 +149,15 @@ class Flags extends StatelessWidget {
}
}
- Widget returnWidget = Stack(
- children: flagWidgets,
- );
+ Widget buildChild() => Stack(children: flagWidgets);
if (borderRadius != null) {
return ClipRRect(
borderRadius: BorderRadius.circular(borderRadius!),
- child: returnWidget,
+ child: buildChild(),
);
} else {
- return returnWidget;
+ return buildChild();
}
}
}
diff --git a/pubspec.lock b/pubspec.lock
index 0fbbfc8..166447e 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -1,62 +1,70 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.0"
async:
dependency: transitive
description:
name: async
- url: "https://pub.dartlang.org"
+ sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+ url: "https://pub.dev"
source: hosted
- version: "2.8.2"
+ version: "2.11.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
- url: "https://pub.dartlang.org"
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.2.0"
- charcode:
- dependency: transitive
- description:
- name: charcode
- url: "https://pub.dartlang.org"
+ sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+ url: "https://pub.dev"
source: hosted
- version: "1.3.1"
+ version: "1.3.0"
clock:
dependency: transitive
description:
name: clock
- url: "https://pub.dartlang.org"
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
- url: "https://pub.dartlang.org"
+ sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
+ url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.17.1"
enum_to_string:
dependency: "direct main"
description:
name: enum_to_string
- url: "https://pub.dartlang.org"
+ sha256: bd9e83a33b754cb43a75b36a9af2a0b92a757bfd9847d2621ca0b1bed45f8e7a
+ url: "https://pub.dev"
source: hosted
version: "2.0.1"
fake_async:
dependency: transitive
description:
name: fake_async
- url: "https://pub.dartlang.org"
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ url: "https://pub.dev"
source: hosted
- version: "1.3.0"
+ version: "1.3.1"
flutter:
dependency: "direct main"
description: flutter
@@ -66,63 +74,71 @@ packages:
dependency: "direct main"
description:
name: flutter_svg
- url: "https://pub.dartlang.org"
+ sha256: "6ff8c902c8056af9736de2689f63f81c42e2d642b9f4c79dbf8790ae48b63012"
+ url: "https://pub.dev"
source: hosted
- version: "1.1.1+1"
+ version: "2.0.6"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.7"
matcher:
dependency: transitive
description:
name: matcher
- url: "https://pub.dartlang.org"
+ sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+ url: "https://pub.dev"
source: hosted
- version: "0.12.11"
+ version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- url: "https://pub.dartlang.org"
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ url: "https://pub.dev"
source: hosted
- version: "0.1.4"
+ version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
- url: "https://pub.dartlang.org"
+ sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
+ url: "https://pub.dev"
source: hosted
- version: "1.7.0"
+ version: "1.9.1"
path:
dependency: transitive
description:
name: path
- url: "https://pub.dartlang.org"
+ sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
+ url: "https://pub.dev"
source: hosted
- version: "1.8.1"
- path_drawing:
- dependency: transitive
- description:
- name: path_drawing
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.0"
+ version: "1.8.3"
path_parsing:
dependency: transitive
description:
name: path_parsing
- url: "https://pub.dartlang.org"
+ sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
+ url: "https://pub.dev"
source: hosted
- version: "1.0.0"
+ version: "1.0.1"
petitparser:
dependency: transitive
description:
name: petitparser
- url: "https://pub.dartlang.org"
+ sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
+ url: "https://pub.dev"
source: hosted
- version: "5.0.0"
+ version: "5.4.0"
sky_engine:
dependency: transitive
description: flutter
@@ -132,58 +148,90 @@ packages:
dependency: transitive
description:
name: source_span
- url: "https://pub.dartlang.org"
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ url: "https://pub.dev"
source: hosted
- version: "1.8.2"
+ version: "1.9.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
- url: "https://pub.dartlang.org"
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
source: hosted
- version: "1.10.0"
+ version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
- url: "https://pub.dartlang.org"
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
- url: "https://pub.dartlang.org"
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
source: hosted
- version: "1.1.0"
+ version: "1.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
- url: "https://pub.dartlang.org"
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
- url: "https://pub.dartlang.org"
+ sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.1"
+ vector_graphics:
+ dependency: transitive
+ description:
+ name: vector_graphics
+ sha256: b96f10cbdfcbd03a65758633a43e7d04574438f059b1043104b5d61b23d38a4f
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.6"
+ vector_graphics_codec:
+ dependency: transitive
+ description:
+ name: vector_graphics_codec
+ sha256: "57a8e6e24662a3bdfe3b3d61257db91768700c0b8f844e235877b56480f31c69"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.6"
+ vector_graphics_compiler:
+ dependency: transitive
+ description:
+ name: vector_graphics_compiler
+ sha256: "7430f5d834d0db4560d7b19863362cd892f1e52b43838553a3c5cdfc9ab28e5b"
+ url: "https://pub.dev"
source: hosted
- version: "0.4.9"
+ version: "1.1.6"
vector_math:
dependency: transitive
description:
name: vector_math
- url: "https://pub.dartlang.org"
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.2"
+ version: "2.1.4"
xml:
dependency: transitive
description:
name: xml
- url: "https://pub.dartlang.org"
+ sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
+ url: "https://pub.dev"
source: hosted
- version: "6.1.0"
+ version: "6.3.0"
sdks:
- dart: ">=2.17.0 <3.0.0"
- flutter: ">=2.11.0-0.1.pre"
+ dart: ">=3.0.0-0 <4.0.0"
+ flutter: ">=3.7.0-0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 909311b..cafff7c 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
- flutter_svg: ^1.0.3
+ flutter_svg: ^2.0.6
enum_to_string: ^2.0.1
dev_dependencies: