Fix package_platform

This commit is contained in:
Feodor Fitsner 2025-03-03 14:12:39 -08:00
parent 803d7c472a
commit d78e04c050
2 changed files with 7 additions and 7 deletions

View File

@ -15,16 +15,16 @@
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
{% macro get_config_platform() %} {% macro get_config_platform(package_platform) %}
{% if cookiecutter.options.package_platform == "Darwin" %} {% if package_platform == "Darwin" %}
macos macos
{% elif cookiecutter.options.package_platform == "Windows" %} {% elif package_platform == "Windows" %}
windows windows
{% elif cookiecutter.options.package_platform == "Linux" %} {% elif package_platform == "Linux" %}
linux linux
{% elif cookiecutter.options.package_platform == "iOS" %} {% elif package_platform == "iOS" %}
ios ios
{% elif cookiecutter.options.package_platform == "Android" %} {% elif package_platform == "Android" %}
android android
{% else %} {% else %}
web web

View File

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