Skip to content

Release 3.0.0-alpha.5 with fixed link taps and fixed hot reload #1085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [3.0.0-alpha.5] - June 9, 2022:
* Fixed hot reloads, thanks @arjenmels
* Fixed link taps not working
* Improvements in README

## [3.0.0-alpha.3] - April 14, 2022:
* Fixed styling not being applied to list item markers
* [video] Fixed crash when iframe or video tags used unsupported/incorrect height or width
Expand Down
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ A Flutter widget for rendering HTML and CSS as Flutter widgets.
Add the following to your `pubspec.yaml` file:

dependencies:
flutter_html: ^3.0.0-alpha.3
flutter_html: ^3.0.0-alpha.5
// Or flutter_html_all: ^3.0.0-alpha.5 to include table, video, audio, iframe...

## Currently Supported HTML Tags:
| | | | | | | | | | | |
Expand Down Expand Up @@ -566,6 +567,11 @@ The package considers the attributes `controls`, `loop`, `src`, `autoplay`, `wid

#### Registering the `CustomRender`:

Add the dependency to your pubspec.yaml:

dependencies:
flutter_html_audio: ^3.0.0-alpha.3

```dart
Widget html = Html(
customRenders: {
Expand All @@ -584,6 +590,11 @@ Sandbox controls the JavaScript mode of the webview - a value of `null` or `allo

#### Registering the `CustomRender`:

Add the dependency to your pubspec.yaml:

dependencies:
flutter_html_iframe: ^3.0.0-alpha.3

```dart
Widget html = Html(
customRenders: {
Expand Down Expand Up @@ -620,6 +631,11 @@ Because this package is parsing MathML to Tex, it may not support some functiona

#### Registering the `CustomRender`:

Add the dependency to your pubspec.yaml:

dependencies:
flutter_html_math: ^3.0.0-alpha.3

```dart
Widget html = Html(
customRenders: {
Expand Down Expand Up @@ -688,6 +704,11 @@ The package also exposes a few ways to render SVGs within an `<img>` tag, specif

#### Registering the `CustomRender`:

Add the dependency to your pubspec.yaml:

dependencies:
flutter_html_svg: ^3.0.0-alpha.3

```dart
Widget html = Html(
customRenders: {
Expand All @@ -707,6 +728,11 @@ When rendering table elements, the package tries to calculate the best fit for e

#### Registering the `CustomRender`:

Add the dependency to your pubspec.yaml:

dependencies:
flutter_html_table: ^3.0.0-alpha.3

```dart
Widget html = Html(
customRenders: {
Expand All @@ -723,6 +749,11 @@ The package considers the attributes `controls`, `loop`, `src`, `autoplay`, `pos

#### Registering the `CustomRender`:

Add the dependency to your pubspec.yaml:

dependencies:
flutter_html_video: ^3.0.0-alpha.3

```dart
Widget html = Html(
customRenders: {
Expand Down Expand Up @@ -750,7 +781,8 @@ Widget row = Row(
```

## Migration Guides
- For Version 1.0 - [Guide](https://github.com/Sub6Resources/flutter_html/wiki/1.0.0-Migration-Guide)
- For Version 1.0/2.0 - [Guide](https://github.com/Sub6Resources/flutter_html/wiki/1.0.0-Migration-Guide)
- For Version 3.0 - **TODO**

## Contribution Guide
> Coming soon!
Expand Down
1 change: 1 addition & 0 deletions example/lib/generated_plugin_registrant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: directives_ordering
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: depend_on_referenced_packages

import 'package:video_player_web/video_player_web.dart';
import 'package:wakelock_web/wakelock_web.dart';
Expand Down
12 changes: 12 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ const htmlData = r"""
<p id='bottom'><a href='#top'>Scroll to top</a></p>
""";

final staticAnchorKey = GlobalKey();

class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
Expand All @@ -249,8 +251,18 @@ class _MyHomePageState extends State<MyHomePage> {
title: Text('flutter_html Example'),
centerTitle: true,
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.arrow_downward),
onPressed: () {
final anchorContext = AnchorKey.forId(staticAnchorKey, "bottom")?.currentContext;
if (anchorContext != null) {
Scrollable.ensureVisible(anchorContext);
}
},
),
body: SingleChildScrollView(
child: Html(
anchorKey: staticAnchorKey,
data: htmlData,
style: {
"table": Style(
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_html_all/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_html_all
description: All optional flutter_html widgets, bundled into a single package.
version: 3.0.0-alpha.3
version: 3.0.0-alpha.5
homepage: https://github.com/Sub6Resources/flutter_html

environment:
Expand All @@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter
html: '>=0.15.0 <1.0.0'
flutter_html: '>=3.0.0-alpha.3 <4.0.0'
flutter_html: '>=3.0.0-alpha.5 <4.0.0'
flutter_html_audio: '>=3.0.0-alpha.3 <4.0.0'
flutter_html_iframe: '>=3.0.0-alpha.3 <4.0.0'
flutter_html_math: '>=3.0.0-alpha.3 <4.0.0'
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_html
description: A Flutter widget rendering static HTML and CSS as Flutter widgets.
version: 3.0.0-alpha.3
version: 3.0.0-alpha.5
homepage: https://github.com/Sub6Resources/flutter_html

environment:
Expand Down