diff --git a/packages/webview_flutter/CHANGELOG.md b/packages/webview_flutter/CHANGELOG.md index 9c54b4cc207d..b3218e296d98 100644 --- a/packages/webview_flutter/CHANGELOG.md +++ b/packages/webview_flutter/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.0-nullsafety.5 + +* Add section to the wiki explaining how to use Material components. + ## 2.0.0-nullsafety.4 * Update integration test to workaround an iOS 14 issue with `evaluateJavascript`. diff --git a/packages/webview_flutter/README.md b/packages/webview_flutter/README.md index df554eb5123c..6902443b77db 100644 --- a/packages/webview_flutter/README.md +++ b/packages/webview_flutter/README.md @@ -14,8 +14,6 @@ You can now include a WebView widget in your widget tree. See the [WebView](https://pub.dev/documentation/webview_flutter/latest/webview_flutter/WebView-class.html) widget's Dartdoc for more details on how to use the widget. - - ## Android Platform Views The WebView is relying on [Platform Views](https://flutter.dev/docs/development/platform-integration/platform-views) to embed @@ -68,3 +66,24 @@ android { } } ``` + +#### Enable Material Components for Android + +To use Material Components when the user interacts with input elements, +follow the steps described in the [Getting Started guide for Android](https://material.io/develop/android/docs/getting-started). For example: + +1. Add the dependency on Android's Material in `/android/app/build.gradle`: + ```groovy +dependencies { + // ... + implementation 'com.google.android.material:material:' + // ... +} +``` +To find out the latest version, visit [Google Maven](https://maven.google.com/web/index.html#com.google.android.material:material). + +2. Set the theme in `/android/app/src/main/res/values/styles.xml`: +```diff +-