Skip to content

Commit

Permalink
fix: webview onLoaded call (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinenerio authored Nov 26, 2023
1 parent 915f779 commit ed1b216
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/espressocash_app/lib/ui/web_view_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ class _WebViewScreenState extends State<WebViewScreen> {
String? _title;

Future<void> _handleLoaded(InAppWebViewController controller) async {
widget.onLoaded?.call(controller);

if (widget.title != null) return;

final title = await controller.getTitle();
if (!mounted) return;

setState(() => _title = title ?? '');
widget.onLoaded?.call(controller);
}

Future<PermissionResponse?> _handlePermissionRequest(
Expand Down

0 comments on commit ed1b216

Please sign in to comment.