Platform-specific splash_screen

This commit is contained in:
Feodor Fitsner 2025-03-03 14:19:01 -08:00
parent d78e04c050
commit f88334bfa8
1 changed files with 5 additions and 2 deletions

View File

@ -18,8 +18,11 @@ import "python.dart";
{% import "_macros.jinja2" as macros %}
{% set config_platform = macros.get_config_platform(cookiecutter.options.package_platform) | trim %}
{{ config_platform }}
{% set splash_screen = macros.get_value(cookiecutter.pyproject, "tool.flet.splash_screen") | default(True, true) %}
{% set platform_key = "tool.flet." ~ config_platform ~ ".splash_screen" %}
{% set splash_screen = macros.get_value(cookiecutter.pyproject, platform_key)
or macros.get_value(cookiecutter.pyproject, "tool.flet.splash_screen")
or true %}
splash_screen: {{ splash_screen }}
{% set splash_screen_text = macros.get_value(cookiecutter.pyproject, "tool.flet.splash_screen_text") | trim %}
*/