Browser Title in tab #226
-
In Flutter to set the browser title in the tab I have to add inside the widget build method: SystemChrome.setApplicationSwitcherDescription(
ApplicationSwitcherDescription(
label: 'The title',
primaryColor: Theme.of(context).primaryColor.value,
)); This set the title in the browser. What's the approach for Jaspr? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I figured out. I think in Flutter should work in the same way. In Jaspr, we have to import After that we can use |
Beta Was this translation helpful? Give feedback.
I figured out. I think in Flutter should work in the same way.
In Jaspr, we have to import
dart:html
and for Flutter, we may import the same library or import the new onepackage:web/web.dart
. This last one won't work for us in Jaspr because of if we have theText
component will be marked as an ambiguous import because is imported in 'package:jaspr/src/framework/framework.dart' and 'package:web/src/dom/dom.dart', both imported in 'package:jaspr/jaspr.dart'.After that we can use
document.title = 'The title'
in each page build method before the yield or return statement.