What Will I Learn?
- You will learn how to make use of the URL launcher plugin
- You will learn how to interact and interface with the webview API from flutter
- You will learn how to use the Flutter Webview Plugin plugin
- You will learn how to interact with HTML documents with flutter
Requirements
- IDEA intellij or Visual Studio Code with the Dart/Flutter Plugins
- The Dart SDK and the Flutter SDK
- A fair understanding of Mobile development and Imperative or Object Oriented Programming
Difficulty
- Intermediate
Description
In this Flutter video tutorial, we look at the Google's URL launcher plugin and a third party plugin called Flutter WebView Plugin. Both of these plugins let us interact with web pages and HTML content. The URL launcher lets us launch a URL into a browser on both iOS and Android as well as embed the URL into a WebView on either platform. The URL launcher can also create intents to open email clients, phone clients and message clients using different URL schemes.
The URL launcher plugin uses a function called canLaunch
to check to see if the device can handle the URL scheme. If you try to open a phone number scheme on a tablet, for instance, then this function will return false. We are then able to specify how we want the application to handle opening the URL. We can do this by giving it the ability to open the URL inside of the app by way of the WebView API on android and the iOS UIWebView. Android by default opens URLs in a browser where as iOS will open these URLs in the application; by modifying this behavior using the URL launcher, we can make it consistent across the two platforms. The downside to opening a WebView using the URL launcher is that we have to modify the WebView client from the native code to allow it to access certain features.
The Flutter WebView Plugin on the other hand gives us a solution that allows us to interface directly with the native WebView plugins on both iOS and Android. We enable features like JavaScript, caching and local storage directly from our flutter layer without having to modify the native code. The Flutter WebView Plugin also features some nice extensions such as a zoom widget, and the ability to change how our application scheme will be presented to the end user. We can create various widgets that sit on top of the native WebView with this plugin.
The source code for this project can be found here
Video Tutorial
Curriculum
- Dart Flutter Cross Platform Chat Application Tutorial
- Building a Multi-Page Application with Dart's Flutter Mobile Framework
- Making Http requests and Using Json in Dart's Flutter Framework
- Building Dynamic Lists with Streams in Dart's Flutter Framework
- Using GridView, Tabs, and Steppers in Dart's Flutter Framework
- Using Global Keys to get State and Validate Input in Dart's Flutter Framework
- The Basics of Animation with Dart's Flutter Framework
- Advanced Physics Based Animations in Dart's Flutter Framework
- Building a Drag and Drop Application with Dart's Flutter Framework
- Building a Hero Animation and an Application Drawer in Dart's Flutter Framework
- Building a Temperature Conversion Application using Dart's Flutter Framework
- Using Inherited Widgets and Gesture Detectors in Dart's Flutter Framework
- Using Gradients, Fractional Offsets, Page Views and Other Widgets in Dart's Flutter Framework
- Building a Calculator Layout using Dart's Flutter Framework
- Finishing our Calculator Application with Dart's Flutter Framework
- Making use of Shared Preferences, Flex Widgets and Dismissibles with Dart's Flutter framework
- Using the Different Style Widgets and Properties in Dart's Flutter Framework
- Composing Animations and Chaining Animations in Dart's Flutter Framework
- Building a Countdown Timer with a Custom Painter and Animations in Dart's Flutter Framework
- Reading and Writing Data and Files with Path Provider using Dart's Flutter Framework
Posted on Utopian.io - Rewarding Open Source Contributors