Adds KRYZ webview\

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-29 06:43:38 +00:00
co-authored by Copilot
parent 41ab9cf360
commit 67e206846e
3 changed files with 12 additions and 0 deletions
+9
View File
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:just_audio_background/just_audio_background.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'streaming_audio_business_object.dart';
@@ -54,10 +55,14 @@ class MainPage extends StatefulWidget {
class _MainPageState extends State<MainPage> {
StreamingAudioBusinessObject get _audio => widget.audio;
late final WebViewController _webViewController;
@override
void initState() {
super.initState();
_webViewController = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..loadRequest(Uri.parse('https://kryzradio.org'));
_audio.addListener(_handleAudioStateChanged);
}
@@ -102,6 +107,10 @@ class _MainPageState extends State<MainPage> {
borderRadius: BorderRadius.circular(8),
color: Colors.white,
),
child: ClipRRect(
borderRadius: BorderRadius.circular(6),
child: WebViewWidget(controller: _webViewController),
),
),
),
),