From 7d1472bc878c6f352336655f8347b52e7aa8da02 Mon Sep 17 00:00:00 2001 From: Jon Hanson Date: Sun, 9 Oct 2022 11:18:02 -0400 Subject: [PATCH] Fixed Android 11 color issue. Fixes #429. Fix index.html getting extra blank lines. Fixes #430. Update the readme. Closes #431. --- CHANGELOG.md | 8 +++++++- README.md | 4 ++-- lib/cli_commands.dart | 4 ++-- lib/templates.dart | 10 ++++++---- pubspec.yaml | 4 ++-- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3d1de4..e41e720 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ -## [2.2.10] - (2022-Sep-25) +## [2.2.11] - (2022-Oct-09) + +- Fixed Android 11 color issue. Fixes [#429](https://github.com/jonbhanson/flutter_native_splash/issues/429). +- Fix index.html getting extra blank lines. Fixes [#430](https://github.com/jonbhanson/flutter_native_splash/issues/430). +- Update the readme. Closes [#431](https://github.com/jonbhanson/flutter_native_splash/issues/431). + +## [2.2.10+1] - (2022-Sep-25) - Update bug report template. - Package housekeeping to stay up to date with Flutter. diff --git a/README.md b/README.md index a5287e0..8e7d32c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ First, add `flutter_native_splash` as a dependency in your pubspec.yaml file. ```yaml dependencies: - flutter_native_splash: ^2.2.10 + flutter_native_splash: ^2.2.11 ``` Don't forget to `flutter pub get`. @@ -197,7 +197,7 @@ void main() { ``` -NOTE: In order to use this method, the `flutter_native_splash` dependency must be in the `dependencies` section of `pubspec.yaml`, not in the `dev_dependencies` as was the case in previous versions of this package. +NOTE: If you do not need to use the `preserve()` and `remove()` methods, you can place the `flutter_native_splash` dependency in the `dev_dependencies` section of `pubspec.yaml`. ## 4. Support the package (optional) diff --git a/lib/cli_commands.dart b/lib/cli_commands.dart index 84e6fea..c7d246a 100644 --- a/lib/cli_commands.dart +++ b/lib/cli_commands.dart @@ -151,8 +151,8 @@ void createSplashByConfig(Map config) { android12DarkBrandingImagePath: android12DarkBrandingImage, backgroundImage: backgroundImageAndroid ?? backgroundImage, darkBackgroundImage: darkBackgroundImageAndroid ?? darkBackgroundImage, - color: android12Color ?? color, - darkColor: android12DarkColor ?? darkColor, + color: color, + darkColor: darkColor, gravity: gravity, brandingGravity: brandingGravity, fullscreen: fullscreen, diff --git a/lib/templates.dart b/lib/templates.dart index 818ac77..85f0933 100644 --- a/lib/templates.dart +++ b/lib/templates.dart @@ -501,21 +501,23 @@ body { } '''; +// XML's insertBefore needs a blank line at the start and not newline at the end: const String _indexHtmlPicture = ''' + - -'''; + '''; +// XML's insertBefore needs a blank line at the start and not newline at the end: const String _indexHtmlBrandingPicture = ''' + - -'''; + '''; const String _webJS = ''' function removeSplashFromWeb() { diff --git a/pubspec.yaml b/pubspec.yaml index 659baf9..f67ad6a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,12 +1,12 @@ name: flutter_native_splash description: Customize Flutter's default white native splash screen with background color and splash image. Supports dark mode, full screen, and more. -version: 2.2.10 +version: 2.2.11 repository: https://github.com/jonbhanson/flutter_native_splash issue_tracker: https://github.com/jonbhanson/flutter_native_splash/issues environment: - sdk: '>=2.18.1 <3.0.0' + sdk: '>=2.18.0 <3.0.0' flutter: ">=2.5.0" dependencies: