Skip to content

Commit

Permalink
Update documentation on Android 12. Fix web background image. Thanks …
Browse files Browse the repository at this point in the history
…Severin for PR #459.  Support more image formats.  Thanks Severin for PR #460.
  • Loading branch information
jonbhanson committed Nov 27, 2022
1 parent 2f6e090 commit c63102b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 8 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
@@ -1,8 +1,14 @@
## [2.2.16] - (2022-Nov-27)

- Update documentation on Android 12.
- Fix web background image. Thanks [Severin](https://github.com/Bungeefan) for [PR #459](https://github.com/jonbhanson/flutter_native_splash/pull/459).
- Support more image formats. Thanks [Severin](https://github.com/Bungeefan) for [PR #460](https://github.com/jonbhanson/flutter_native_splash/pull/460).

## [2.2.15] - (2022-Nov-20)

- Fix iOS background image build incorrectly when background dark image is used. Fixes [#452](https://github.com/jonbhanson/flutter_native_splash/issues/452), fixes [#439](https://github.com/jonbhanson/flutter_native_splash/issues/439).
- Correct background image/color handling on web. Fixes [#450](https://github.com/jonbhanson/flutter_native_splash/issues/450).
- Don't include dark styling in web if not specified in config. Fixes [453](https://github.com/jonbhanson/flutter_native_splash/issues/453).
- Correct background image/color handling on web. Fixes [#450](https://github.com/jonbhanson/flutter_native_splash/issues/450), fixes [324](https://github.com/jonbhanson/flutter_native_splash/issues/324).
- Don't include dark styling in web if not specified in config. Fixes [#453](https://github.com/jonbhanson/flutter_native_splash/issues/453).
- Add _Parameters class to hold parameters.

## [2.2.14] - (2022-Nov-07)
Expand Down
21 changes: 17 additions & 4 deletions README.md
Expand Up @@ -19,7 +19,7 @@ First, add `flutter_native_splash` as a dependency in your pubspec.yaml file.

```yaml
dependencies:
flutter_native_splash: ^2.2.15
flutter_native_splash: ^2.2.16
```

Don't forget to `flutter pub get`.
Expand Down Expand Up @@ -106,7 +106,7 @@ flutter_native_splash:
#web: false

# Platform specific images can be specified with the following parameters, which will override
# the respective image parameter. You may specify all, selected, or none of these parameters:
# the respective parameter. You may specify all, selected, or none of these parameters:
#color_android: "#42a5f5"
#color_dark_android: "#042a49"
#color_ios: "#42a5f5"
Expand Down Expand Up @@ -211,11 +211,24 @@ If you find this package useful, you can support it for free by giving it a thum

<p align='center'><a href="https://www.buymeacoffee.com/jonhanson"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=jonhanson&button_colour=5F7FFF&font_colour=ffffff&font_family=Cookie&outline_colour=000000&coffee_colour=FFDD00"></a></p>

# Android 12 Support
# Android 12+ Support

Android 12 has a [new method](https://developer.android.com/about/versions/12/features/splash-screen) of adding splash screens, which consists of a window background, icon, and the icon background. Note that a background image is not supported.

The package provides Android 12 support while maintaining the legacy splash screen for previous versions of Android.
<img src="https://developer.android.com/static/images/guide/topics/ui/splash-screen/splash-screen-composition.png"/>

Be aware of the following considerations regarding these elements:

1. `image` parameter. By default, the launcher icon is used:

* App icon without an icon background, as shown on the left: This should be 1152×1152 pixels, and fit within a circle 768 pixels in diameter.
* App icon with an icon background, as shown on the right: This should be 960×960 pixels, and fit within a circle 640 pixels in diameter.

2. `icon_background_color` is optional, and is useful if you need more contrast between the icon and the window background.

3. One-third of the foreground is masked.

4. `color` the window background consists of a single opaque color.

~~**_PLEASE NOTE:_** The splash screen may not appear when you launch the app from Android Studio. However, it should appear when you launch by clicking on the launch icon in Android.~~ This seems to be resolved now.

Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Expand Up @@ -169,7 +169,7 @@ flutter_native_splash:
#web: false

# Platform specific images can be specified with the following parameters, which will override
# the respective image parameter. You may specify all, selected, or none of these parameters:
# the respective parameter. You may specify all, selected, or none of these parameters:
#color_android: "#42a5f5"
#color_dark_android: "#042a49"
#color_ios: "#42a5f5"
Expand Down
8 changes: 7 additions & 1 deletion pubspec.yaml
@@ -1,7 +1,7 @@
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.15
version: 2.2.16
repository: https://github.com/jonbhanson/flutter_native_splash
issue_tracker: https://github.com/jonbhanson/flutter_native_splash/issues

Expand Down Expand Up @@ -29,6 +29,12 @@ dev_dependencies:
sdk: flutter
flutter_lints: ^2.0.1

screenshots:
- description: 'Examples of the splash screen on iOS.'
path: splash_demo.webp
- description: 'Examples of the splash screen on iOS in dark mode.'
path: splash_demo_dark.webp

flutter:
# This section identifies this Flutter project as a plugin project.
# The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
Expand Down
Binary file added splash_demo.webp
Binary file not shown.
Binary file added splash_demo_dark.webp
Binary file not shown.

0 comments on commit c63102b

Please sign in to comment.