Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit cc8a6c5

Browse files
author
Emmanuel Garcia
committed
Add section about Material components
1 parent 37d658e commit cc8a6c5

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

packages/webview_flutter/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.0-nullsafety.5
2+
3+
* Add section to the wiki explaining how to use Material components.
4+
15
## 2.0.0-nullsafety.4
26

37
* Update integration test to workaround an iOS 14 issue with `evaluateJavascript`.

packages/webview_flutter/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ You can now include a WebView widget in your widget tree. See the
1414
[WebView](https://pub.dev/documentation/webview_flutter/latest/webview_flutter/WebView-class.html)
1515
widget's Dartdoc for more details on how to use the widget.
1616

17-
18-
1917
## Android Platform Views
2018
The WebView is relying on
2119
[Platform Views](https://flutter.dev/docs/development/platform-integration/platform-views) to embed
@@ -68,3 +66,24 @@ android {
6866
}
6967
}
7068
```
69+
70+
#### Enable Material Components for Android
71+
72+
To use Material Components when the user interacts with input elements,
73+
follow the steps described in the [Getting Started guide for Android](https://material.io/develop/android/docs/getting-started). For example:
74+
75+
1. Add the dependency on Android's Material in `<my-app>/android/app/build.gradle`:
76+
```groovy
77+
dependencies {
78+
// ...
79+
implementation 'com.google.android.material:material:<version>'
80+
// ...
81+
}
82+
```
83+
To find out the latest version, visit [Google Maven](https://maven.google.com/web/index.html#com.google.android.material:material).
84+
85+
2. Set the theme in `<my-app>/android/app/src/main/res/values/styles.xml`:
86+
```diff
87+
-<style name="LaunchTheme" parent="Theme.AppCompat">
88+
+<style name="LaunchTheme" parent="Theme.MaterialComponents.NoActionBar">
89+
```

packages/webview_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: webview_flutter
22
description: A Flutter plugin that provides a WebView widget on Android and iOS.
3-
version: 2.0.0-nullsafety.4
3+
version: 2.0.0-nullsafety.5
44
homepage: https://github.com/flutter/plugins/tree/master/packages/webview_flutter
55

66
environment:

0 commit comments

Comments
 (0)