@@ -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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user