import 'dart:html' as html; import 'dart:ui_web' as ui; import 'package:flutter/material.dart'; class IntroScreenPlatform extends StatefulWidget { const IntroScreenPlatform({super.key, this.onStartChat}); final VoidCallback? onStartChat; @override State createState() => _IntroScreenPlatformState(); } class _IntroScreenPlatformState extends State { static int _nextViewId = 0; late final String _viewType; @override void initState() { super.initState(); final currentId = _nextViewId; _nextViewId += 1; _viewType = 'intro-screen-web-$currentId'; ui.platformViewRegistry.registerViewFactory(_viewType, (int viewId) { final frame = html.IFrameElement() ..srcdoc = _introHtmlContent ..style.width = '100%' ..style.height = '100%' ..style.border = '0'; return frame; }); } @override Widget build(BuildContext context) { return Scaffold( body: SizedBox.expand( child: HtmlElementView(viewType: _viewType), ), ); } } const String _introHtmlContent = '''

Intro experience coming soon

We're building a richer onboarding journey to learn about your goals, milestones, and day-to-day needs. For now, head over to the chat sidebar to start a conversation with Sure and let us know where you are in your financial journey.

''';