From 13761c972a768f6dbf97e4733808a856baac5c56 Mon Sep 17 00:00:00 2001 From: Saif Allah Khaled Date: Mon, 11 Nov 2019 10:36:32 +0200 Subject: [PATCH 1/7] Update Deps --- CHANGELOG.md | 7 +++++++ README.md | 2 +- pubspec.yaml | 9 ++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa2b755..ba38b0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.6.0] + +- updated Dependencies: + - cached_network_image: ^1.1.3 + - flutter_markdown: ^0.5.0 + - html: ^0.14.0+3 + ## [0.5.12] - add support to change style #93 diff --git a/README.md b/README.md index c691330..665d6c3 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Flutter has no default support to render html so this package helps you to rende ```yaml dependencies: - flutter_html_view: ^0.5.11 + flutter_html_view: ^0.6.0 ``` ```dart diff --git a/pubspec.yaml b/pubspec.yaml index 8acabd5..8444d90 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_html_view description: Flutter Plugin to render html, Flutter has no default support to render html so this package helps you to render your html to native widgets -version: 0.5.12 +version: 0.6.0 author: Karthik Ponnam homepage: https://github.com/PonnamKarthik/FlutterHtmlView @@ -8,11 +8,10 @@ dependencies: flutter: sdk: flutter flutter_custom_tabs: ^0.6.0 - html: ^0.13.3+3 + html: ^0.14.0+3 video_player: 0.10.0+2 - cached_network_image: ^0.7.0 - - flutter_markdown: ^0.2.0 + cached_network_image: ^1.1.3 + flutter_markdown: ^0.5.0 html2md: ^0.3.0 environment: From a487fb724a6b0836e7cab67f91d7e970a53a2a28 Mon Sep 17 00:00:00 2001 From: Saif Allah Khaled Date: Mon, 11 Nov 2019 10:41:23 +0200 Subject: [PATCH 2/7] Update Deps --- CHANGELOG.md | 2 +- example/pubspec.yaml | 40 +------------------------------------- lib/flutter_html_text.dart | 13 +++++++++---- lib/flutter_html_view.dart | 20 +++++++++---------- lib/html_parser.dart | 7 ++++++- pubspec.yaml | 6 +++--- 6 files changed, 30 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba38b0b..70830d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ - updated Dependencies: - cached_network_image: ^1.1.3 - - flutter_markdown: ^0.5.0 + - flutter_markdown: ^0.3.0 - html: ^0.14.0+3 ## [0.5.12] diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 32cb046..bd835a9 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,54 +1,16 @@ name: flutter_html_view_example -description: Demonstrates how to use the flutter_html_textview plugin. +description: Demonstrates how to use the flutter_html_view plugin. dependencies: flutter: sdk: flutter - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 dev_dependencies: flutter_test: sdk: flutter - flutter_html_view: path: ../ -# For information on the generic Dart part of this file, see the -# following page: https://www.dartlang.org/tools/pub/pubspec - -# The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.io/assets-and-images/#resolution-aware. - # For details regarding adding assets from package dependencies, see - # https://flutter.io/assets-and-images/#from-packages - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.io/custom-fonts/#from-packages diff --git a/lib/flutter_html_text.dart b/lib/flutter_html_text.dart index 6bb982e..a117265 100644 --- a/lib/flutter_html_text.dart +++ b/lib/flutter_html_text.dart @@ -12,7 +12,13 @@ class HtmlText extends StatelessWidget { BuildContext ctx; - HtmlText({this.data, this.style, this.onLaunchFail, this.overflow, this.maxLines}); + HtmlText({ + this.data, + this.style, + this.onLaunchFail, + this.overflow, + this.maxLines, + }); void _launchURL(String url) async { try { @@ -62,7 +68,6 @@ class HtmlText extends StatelessWidget { TextSpan span = this._stackToTextSpan(nodes, context); - RichText contents; if (overflow != null && maxLines != null) { contents = new RichText( @@ -520,8 +525,8 @@ class HtmlParser { break; case 'font-size': - fontSize = double.parse(value); - + fontSize = double.parse(value); + break; case 'text-decoration': diff --git a/lib/flutter_html_view.dart b/lib/flutter_html_view.dart index 81fd78f..efe23a3 100644 --- a/lib/flutter_html_view.dart +++ b/lib/flutter_html_view.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; - -import 'package:html2md/html2md.dart' as html2md; -import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:flutter_custom_tabs/flutter_custom_tabs.dart' as cTab; +import 'package:flutter_markdown/flutter_markdown.dart'; +import 'package:html2md/html2md.dart' as html2md; import 'package:url_launcher/url_launcher.dart'; class HtmlView extends StatelessWidget { @@ -16,13 +15,14 @@ class HtmlView extends StatelessWidget { /// If [scrollable] is set to false then you must handle scrolling outside of this widget. /// This can be acheived by using a [SingleChildScrollView]. - HtmlView( - {this.data, - this.stylingOptions, - this.onLaunchFail, - this.scrollable = true, - this.padding, - this.styleSheet = null}); + HtmlView({ + this.data, + this.stylingOptions, + this.onLaunchFail, + this.scrollable = true, + this.padding, + this.styleSheet, + }); @override Widget build(BuildContext context) { diff --git a/lib/html_parser.dart b/lib/html_parser.dart index 3a13ce7..6f22552 100644 --- a/lib/html_parser.dart +++ b/lib/html_parser.dart @@ -70,7 +70,12 @@ class HtmlParser { } else if (!e.outerHtml.contains(" 0) e.children.forEach((e) => _parseChildren(e, widgetList)); } diff --git a/pubspec.yaml b/pubspec.yaml index 8444d90..bb59e90 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,10 +9,10 @@ dependencies: sdk: flutter flutter_custom_tabs: ^0.6.0 html: ^0.14.0+3 - video_player: 0.10.0+2 + video_player: 0.10.0+5 cached_network_image: ^1.1.3 - flutter_markdown: ^0.5.0 - html2md: ^0.3.0 + flutter_markdown: ^0.3.0 + html2md: ^0.5.0 environment: sdk: ">=2.0.0-dev.28.0 <3.0.0" From 9721186f70860db8140b2a8b9e799f745520f20e Mon Sep 17 00:00:00 2001 From: Saif Allah Khaled Date: Mon, 11 Nov 2019 10:43:42 +0200 Subject: [PATCH 3/7] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70830d0..a5bf3fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ ## [0.6.0] - updated Dependencies: - - cached_network_image: ^1.1.3 - - flutter_markdown: ^0.3.0 - - html: ^0.14.0+3 + - html: ^0.14.0+3 + - video_player: 0.10.0+5 + - cached_network_image: ^1.1.3 + - flutter_markdown: ^0.3.0 + - html2md: ^0.5.0 ## [0.5.12] From a72cfcc090b15bf777da6141f2ed594d1266521a Mon Sep 17 00:00:00 2001 From: Saif Allah Khaled Date: Wed, 19 Feb 2020 15:37:49 +0200 Subject: [PATCH 4/7] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5bf3fa..788cf44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ - updated Dependencies: - html: ^0.14.0+3 - - video_player: 0.10.0+5 - - cached_network_image: ^1.1.3 + - video_player: 0.10.6 + - cached_network_image: ^2.0.0 - flutter_markdown: ^0.3.0 - html2md: ^0.5.0 From 2ecc08bea01a84fa258bb2a4d80f8edfc246c96f Mon Sep 17 00:00:00 2001 From: Saif Allah Khaled Date: Wed, 19 Feb 2020 15:38:51 +0200 Subject: [PATCH 5/7] Update pubspec.yaml --- pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index bb59e90..7f2c1c2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,8 +9,8 @@ dependencies: sdk: flutter flutter_custom_tabs: ^0.6.0 html: ^0.14.0+3 - video_player: 0.10.0+5 - cached_network_image: ^1.1.3 + video_player: ^0.10.7 + cached_network_image: ^2.0.0 flutter_markdown: ^0.3.0 html2md: ^0.5.0 From 5065bc0effb4bc25e7005279a6d6fd28a561e6a8 Mon Sep 17 00:00:00 2001 From: Saif Allah Khaled Date: Wed, 19 Feb 2020 15:41:35 +0200 Subject: [PATCH 6/7] Update pubspec.yaml --- pubspec.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 7f2c1c2..4632165 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,9 +11,9 @@ dependencies: html: ^0.14.0+3 video_player: ^0.10.7 cached_network_image: ^2.0.0 - flutter_markdown: ^0.3.0 - html2md: ^0.5.0 + flutter_markdown: ^0.3.3 + html2md: ^0.5.1 environment: - sdk: ">=2.0.0-dev.28.0 <3.0.0" - flutter: ">=0.1.4 <2.0.0" + sdk: ">=2.2.2 <3.0.0" + flutter: ">=1.10.7 <2.0.0" From a04e1198823d28df82c00cf8758a2805657de8de Mon Sep 17 00:00:00 2001 From: Saif Allah Khaled Date: Wed, 19 Feb 2020 15:43:09 +0200 Subject: [PATCH 7/7] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 788cf44..2d72a66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,11 @@ ## [0.6.0] -- updated Dependencies: +- updated Dependencies: [#99](https://github.com/PonnamKarthik/FlutterHtmlView/pull/99). - html: ^0.14.0+3 - - video_player: 0.10.6 + - video_player: 0.10.7 - cached_network_image: ^2.0.0 - - flutter_markdown: ^0.3.0 - - html2md: ^0.5.0 + - flutter_markdown: ^0.3.3 + - html2md: ^0.5.1 ## [0.5.12]