Restructure folders (#184)

* Split up `video_chat.dart`

* Restructure home folder

* Restructure settings folder

* Restructure channel folder

* More restructuring
This commit is contained in:
Tommy Chow 2022-08-31 14:11:45 -04:00 • committed by GitHub
parent c07fe5337c
commit 53fabd067a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 451 additions and 440 deletions

View file

@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
import 'package:frosty/screens/channel/video/video_store.dart';
import 'package:webview_flutter/webview_flutter.dart';
/// Creates a [WebView] widget that shows a channel's video stream.
class Video extends StatelessWidget {
final VideoStore videoStore;
const Video({
Key? key,
required this.videoStore,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return WebView(
backgroundColor: Colors.black,
initialUrl: videoStore.videoUrl,
javascriptMode: JavascriptMode.unrestricted,
allowsInlineMediaPlayback: true,
initialMediaPlaybackPolicy: AutoMediaPlaybackPolicy.always_allow,
onWebViewCreated: (controller) => videoStore.controller = controller,
onPageFinished: (string) => videoStore.initVideo(),
navigationDelegate: videoStore.handleNavigation,
javascriptChannels: videoStore.javascriptChannels,
);
}
}