File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/espressocash_app/lib/ui Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -69,12 +69,10 @@ class _WebViewScreenState extends State<WebViewScreen> {
69
69
Future <void > _handleLoaded (InAppWebViewController controller) async {
70
70
widget.onLoaded? .call (controller);
71
71
72
- if (widget.title != null ) return ;
73
-
74
- final title = await controller.getTitle ();
72
+ final title = widget.title ?? await controller.getTitle () ?? '' ;
75
73
if (! mounted) return ;
76
74
77
- setState (() => _title = title ?? '' );
75
+ setState (() => _title = title);
78
76
}
79
77
80
78
Future <PermissionResponse ?> _handlePermissionRequest (
@@ -100,7 +98,7 @@ class _WebViewScreenState extends State<WebViewScreen> {
100
98
theme: theme,
101
99
child: Scaffold (
102
100
appBar: CpAppBar (
103
- title: Text (widget.title ?? _title ?? context.l10n.loading),
101
+ title: Text (_title ?? context.l10n.loading),
104
102
),
105
103
body: InAppWebView (
106
104
initialUrlRequest: URLRequest (url: WebUri .uri (widget.url)),
You can’t perform that action at this time.
0 commit comments