Setting the topic for the mini program container
The topic must be set before mini program startup. You can choose light mode, dark mode, or using default settings.
Future<void> setTheme(MiniTheme theme)
Sample code:
_tcmppFlutterPlugin.setTheme(MiniTheme.dark);
Localization setting for the mini program
It must be set before the mini program startup.
language: The language used in the mini program. The ISO 639 alpha-2 or alpha-3 language code should be used. The ISO 3166 alpha-2 country code should be used.
variant: An arbitrary value used to represent a variant of the local language.
Future<void> setLocale(String language,
{String? region, String? variant})
Sample code:
_tcmppFlutterPlugin.setLocale("en", region: "us");
Was this page helpful?