Add support to change title

This commit is contained in:
2023-09-14 17:48:39 +08:00
parent bc435bb567
commit a9f09ffdcd
6 changed files with 44 additions and 6 deletions

View File

@@ -169,9 +169,7 @@ class _MainApp extends State<MainApp> {
routerConfig: _router,
onGenerateTitle: (context) {
final title = AppLocalizations.of(context)!.title;
if (isDesktop) {
windowManager.setTitle(title);
}
setCurrentTitle(title, isPrefix: true);
return title;
},
locale: _lang.toLocale(),