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 %}
{% endmacro %}
{% macro get_config_platform() %}
{% if cookiecutter.options.package_platform == "Darwin" %}
{% macro get_config_platform(package_platform) %}
{% if package_platform == "Darwin" %}
macos
{% elif cookiecutter.options.package_platform == "Windows" %}
{% elif package_platform == "Windows" %}
windows
{% elif cookiecutter.options.package_platform == "Linux" %}
{% elif package_platform == "Linux" %}
linux
{% elif cookiecutter.options.package_platform == "iOS" %}
{% elif package_platform == "iOS" %}
ios
{% elif cookiecutter.options.package_platform == "Android" %}
{% elif package_platform == "Android" %}
android
{% else %}
web

View File

@ -17,7 +17,7 @@ import "python.dart";
/*
{% 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 }}
{% 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 %}