How to render a local HTML file with flutter dart webview

I’m using the webview_flutter plugin from the Flutter Team. Steps Add the dependency to pubspec.yaml: dependencies: webview_flutter: ^4.2.1 Put an html file in the assets folder (see this). I’ll call it help.html. Declare it in your pubspec.yaml file: flutter: assets: – assets/help.html Use it in your code: import ‘package:flutter/material.dart’; import ‘package:webview_flutter/webview_flutter.dart’; class HelpScreen extends StatefulWidget … Read more

Swift Open Link in Safari

It’s not “baked in to Swift”, but you can use standard UIKit methods to do it. Take a look at UIApplication’s openUrl(_:) (deprecated) and open(_:options:completionHandler:). Swift 4 + Swift 5 (iOS 10 and above) guard let url = URL(string: “https://stackoverflow.com”) else { return } UIApplication.shared.open(url) Swift 3 (iOS 9 and below) guard let url = … Read more