import 'package:flutter/material.dart'; import 'package:webview_flutter/webview_flutter.dart'; class PrivacyPage extends StatefulWidget { const PrivacyPage({super.key}); @override State createState() => _PrivacyPageState(); } class _PrivacyPageState extends State { late final WebViewController _controller; bool _loading = true; @override void initState() { super.initState(); _controller = WebViewController() ..setJavaScriptMode(JavaScriptMode.unrestricted) ..setNavigationDelegate( NavigationDelegate( onPageFinished: (_) { setState(() => _loading = false); }, onWebResourceError: (error) { // Opcional: se quiser mostrar algo quando falhar // print('WebView error: ${error.description}'); }, ), ) ..loadRequest(Uri.parse('https://makereducacional.com.br/privacy.html')); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('PolĂ­tica de Privacidade'), centerTitle: true, backgroundColor: Colors.cyanAccent, foregroundColor: Colors.black, ), body: Stack( children: [ WebViewWidget(controller: _controller), if (_loading) const Center(child: CircularProgressIndicator()), ], ), ); } }