When building an app you can set its title by using MaterialApp‘s title property.
MaterialApp(
title: 'App Title',
home: MyHomePage(),
)
Using a title means you won’t be able to change it without rebuilding the entire tree. It is fine for an app. But when it is on the web, the title should change to reflect the current page’s features and to allow search engines (I haven’t confirmed this) to index content.
We have another solution.SystemChrome.setApplicationSwitcherDescription
in package:flutter/services.dart
will solve this perfectly.
Put these codes within the build method of a screen
SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription(
label: 'My current page title',
primaryColor: Theme.of(context).primaryColor.value,
));