@@ -1141,6 +1141,7 @@ def setup_template_data(self):
11411141 "ios_team_id" : ios_team_id ,
11421142 "options" : {
11431143 "package_platform" : self .package_platform ,
1144+ "config_platform" : self .config_platform ,
11441145 "target_arch" : (
11451146 target_arch
11461147 if isinstance (target_arch , list )
@@ -1586,21 +1587,44 @@ def customize_splash_images(self):
15861587 )
15871588
15881589 # splash colors
1589- splash_color = self .options .splash_color or self .get_pyproject (
1590- "tool.flet.splash.color"
1590+ splash_color = (
1591+ self .options .splash_color
1592+ or self .get_pyproject (f"tool.flet.{ self .config_platform } .splash.color" )
1593+ or self .get_pyproject ("tool.flet.splash.color" )
15911594 )
15921595 if splash_color :
15931596 pubspec ["flutter_native_splash" ]["color" ] = splash_color
15941597 pubspec ["flutter_native_splash" ]["android_12" ]["color" ] = splash_color
1595- splash_dark_color = self .options .splash_dark_color or self .get_pyproject (
1596- "tool.flet.splash.dark_color"
1598+
1599+ splash_dark_color = (
1600+ self .options .splash_dark_color
1601+ or self .get_pyproject (f"tool.flet.{ self .config_platform } .splash.dark_color" )
1602+ or self .get_pyproject ("tool.flet.splash.dark_color" )
15971603 )
15981604 if splash_dark_color :
15991605 pubspec ["flutter_native_splash" ]["color_dark" ] = splash_dark_color
16001606 pubspec ["flutter_native_splash" ]["android_12" ][
16011607 "color_dark"
16021608 ] = splash_dark_color
16031609
1610+ splash_icon_bgcolor = self .get_pyproject (
1611+ f"tool.flet.{ self .config_platform } .splash.icon_bgcolor"
1612+ ) or self .get_pyproject ("tool.flet.splash.icon_bgcolor" )
1613+
1614+ if splash_icon_bgcolor :
1615+ pubspec ["flutter_native_splash" ]["android_12" ][
1616+ "icon_background_color"
1617+ ] = splash_icon_bgcolor
1618+
1619+ splash_icon_dark_bgcolor = self .get_pyproject (
1620+ f"tool.flet.{ self .config_platform } .splash.icon_dark_bgcolor"
1621+ ) or self .get_pyproject ("tool.flet.splash.icon_dark_bgcolor" )
1622+
1623+ if splash_icon_dark_bgcolor :
1624+ pubspec ["flutter_native_splash" ]["android_12" ][
1625+ "icon_background_color_dark"
1626+ ] = splash_icon_dark_bgcolor
1627+
16041628 # enable/disable splashes
16051629 pubspec ["flutter_native_splash" ]["web" ] = (
16061630 not self .options .no_web_splash
@@ -1784,8 +1808,10 @@ def package_python_app(self):
17841808 # exclude
17851809 exclude_list = ["build" ]
17861810
1787- app_exclude = self .options .exclude or self .get_pyproject (
1788- "tool.flet.app.exclude"
1811+ app_exclude = (
1812+ self .options .exclude
1813+ or self .get_pyproject (f"tool.flet.{ self .config_platform } .app.exclude" )
1814+ or self .get_pyproject ("tool.flet.app.exclude" )
17891815 )
17901816 if app_exclude :
17911817 exclude_list .extend (app_exclude )
0 commit comments