get_config_platform()

This commit is contained in:
Feodor Fitsner 2025-03-03 14:10:16 -08:00
parent 165dd66998
commit 803d7c472a
2 changed files with 18 additions and 0 deletions

View File

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

View File

@ -17,6 +17,8 @@ import "python.dart";
/* /*
{% import "_macros.jinja2" as macros %} {% import "_macros.jinja2" as macros %}
{% set config_platform = macros.get_config_platform() | trim %}
{{ 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 %}
*/ */