Dart Webview with notes

import 'dart:async'; import 'package:flutter/material.dart'; import 'package:webview_flutter/webview_flutter.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { // This widget is the root of your application. final Completer<WebViewController> _controller = Completer<WebViewController>(); @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( backgroundColor: Colors.black, body: Padding( padding: const EdgeInsets.fromLTRB(0, 30.0, 0, 0), child: WebView( initialUrl: "https://yoururl.com", javascriptMode: JavascriptMode.unrestricted, onWebViewCreated: (WebViewController webViewController) { _controller.complete(webViewController); }), ), ), ); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.black, body: Center(), ); } }
For long play I would recommend adding the following to the android manifest:
<uses-permission android:name="android.permission.WAKE_LOCK" />

And I am also including a shoutcast audio stream from http so you will need to include this to the iOS plist:

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.