├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── io │ │ │ │ └── github │ │ │ │ └── ponnamkarthik │ │ │ │ └── flutterhtmltextviewexample │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── flutter_html_textview_example.iml ├── flutter_html_textview_example_android.iml ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ └── contents.xcworkspacedata │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── main.m ├── lib │ └── main.dart ├── pubspec.yaml └── test │ └── widget_test.dart ├── flutter_html_view.iml ├── lib ├── flutter_html_text.dart ├── flutter_html_video.dart ├── flutter_html_view.dart └── html_parser.dart ├── pubspec.yaml └── res └── values └── strings_en.arb /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .dart_tool/ 4 | .idea 5 | .packages 6 | .pub/ 7 | build/ 8 | ios/.generated/ 9 | packages 10 | pubspec.lock 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.5.12] 2 | 3 | - add support to change style #93 4 | - Change flutter_cutom_tabs to 0.6.0 to support AndroidX #91 5 | - cached_network_image to 0.7.0 #89 6 | 7 | ## [0.5.11] 8 | 9 | - Overflow and maxLines completed #68 by RoughIndustries was merged 10 | - Update flutter_html_view.dart #67 by RoughIndustries was merged 11 | - Update flutter_html_text.dart #66 by RoughIndustries was merged 12 | - htmltext support to change font-size #63 by ZhongJianpeng was merged 13 | - fixed html image not shown #61 by The-Redhat was merged 14 | 15 | ## [0.5.10] 16 | 17 | - Version update of dependencies [Pullrequest #56](https://github.com/PonnamKarthik/FlutterHtmlView/pull/56) 18 | - added onLaunchFail paramete [Pullrequest #58](https://github.com/PonnamKarthik/FlutterHtmlView/pull/58) 19 | 20 | ## [0.5.9] 21 | 22 | - add base URL to class constructor to support some Html created by online editor. 23 | 24 | ## [0.5.8] 25 | 26 | - cache image network dependency import fixed 27 | - [Issue #44](https://github.com/PonnamKarthik/FlutterHtmlView/issues/44) Removed print 28 | 29 | ## [0.5.7] 30 | 31 | - cache image network dependency crash fixed 32 | 33 | ## [0.5.5] 34 | 35 | - Video -> Source tag Now Supported 36 | - flutter_custom_tabs Fixed 37 | - Updated latest dependencies 38 | 39 | ## [0.5.4] 40 | 41 | - video_player dependencies to ^0.6.4 42 | - [Pullrequest #28](https://github.com/PonnamKarthik/FlutterHtmlView/pull/28) Merged 43 | - [Pullrequest #29](https://github.com/PonnamKarthik/FlutterHtmlView/pull/29) Merged 44 | 45 | ## [0.5.3] 46 | 47 | - Bug fixes 48 | 49 | ## [0.5.2] 50 | 51 | - support for data:image parsing for inline base64 images added 52 | 53 | ## [0.5.1] 54 | 55 | - Bug Fixes 56 | 57 | ## [0.5.0] 58 | 59 | - Video tag is not supported 60 | 61 | ## [0.4.0] 62 | 63 | - Links are clickable now 64 | 65 | ## [0.3.0] 66 | 67 | - Initial release 68 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter_html_view 2 | 3 | Flutter Plugin to render html as a Widget, 4 | 5 | > [Refer this for full support of inline webview for android and iOS](https://github.com/PonnamKarthik/FlutterWebView) 6 | 7 | Flutter has no default support to render html so this package helps you to render your html to native widgets 8 | 9 | - Video tag support added 10 | - Links are clickable now 11 | 12 | ## Supported Tags 13 | 14 | - p 15 | - em 16 | - b 17 | - img 18 | - video 19 | - h1, h2, h3, h4, h5, h6 20 | 21 | > **Note** 22 | > 23 | > - This plugin converts some of the html tags to flutter widgets 24 | > - This plugin does't support rendering full html code (there is no built in support for web rendering in flutter) 25 | 26 | ## How to Use 27 | 28 | ```yaml 29 | dependencies: 30 | flutter_html_view: ^0.5.11 31 | ``` 32 | 33 | ```dart 34 | 35 | import 'package:flutter_html_view/flutter_html_view.dart'; 36 | 37 | String html = 'Hello world! HTML5 rocks!'; 38 | 39 | new HtmlView( 40 | data: html, 41 | baseURL: "", // optional, type String 42 | onLaunchFail: (url) { // optional, type Function 43 | print("launch $url failed"); 44 | }, 45 | scrollable: false, //false to use MarksownBody and true to use Marksown 46 | ) 47 | ``` 48 | 49 | ## MarkdownStyleSheet 50 | 51 | ``` 52 | styleSheet: MarkdownStyleSheet( 53 | 54 | ), 55 | ``` 56 | 57 | ### styleOptions 58 | 59 | The default and available style options: 60 | 61 | | Name | Default | Options | 62 | | ------------------ | :--------: | ------------------------------: | 63 | | headingStyle | "setext" | "setext", "atx" | 64 | | hr | "\* \* \*" | "\* \* \*", "- - -", "\_ \_ \_" | 65 | | bulletListMarker | "\*" | "\*", "-", "\_" | 66 | | codeBlockStyle | "indented" | "indented", "fenced" | 67 | | fence | "\`\`\`" | "\`\`\`", "~~~" | 68 | | emDelimiter | "\_" | "\_", "\*" | 69 | | strongDelimiter | "\*\*" | "\*\*", "\_\_" | 70 | | linkStyle | "inlined" | "inlined", "referenced" | 71 | | linkReferenceStyle | "full" | "full", "collapsed", "shortcut" | 72 | 73 | ### iOS 74 | 75 | Warning: The video player is not functional on iOS simulators. An iOS device must be used during development/testing. 76 | 77 | Add the following entry to your _Info.plist_ file, located in `/ios/Runner/Info.plist`: 78 | 79 | ```xml 80 | NSAppTransportSecurity 81 | 82 | NSAllowsArbitraryLoads 83 | 84 | 85 | ``` 86 | 87 | This entry allows your app to access video files by URL. 88 | 89 | ### Android 90 | 91 | Ensure the following permission is present in your Android Manifest file, located in `/android/app/src/main/AndroidManifest.xml: 92 | 93 | ```xml 94 | 95 | ``` 96 | 97 | # Thanks to 98 | 99 | [@Katran](https://github.com/Katarn) 100 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .dart_tool/ 4 | .idea 5 | .vscode/ 6 | .packages 7 | .pub/ 8 | build/ 9 | ios/.generated/ 10 | packages 11 | .flutter-plugins 12 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: b397406561f5e7a9c94e28f58d9e49fca0dd58b7 8 | channel: beta 9 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # flutter_html_textview_example 2 | 3 | Demonstrates how to use the flutter_html_textview plugin. 4 | 5 | ## Getting Started 6 | 7 | For help getting started with Flutter, view our online 8 | [documentation](https://flutter.io/). 9 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | apply plugin: 'com.android.application' 15 | apply plugin: 'kotlin-android' 16 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 17 | 18 | android { 19 | compileSdkVersion 28 20 | 21 | sourceSets { 22 | main.java.srcDirs += 'src/main/kotlin' 23 | } 24 | 25 | lintOptions { 26 | disable 'InvalidPackage' 27 | } 28 | 29 | defaultConfig { 30 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 31 | applicationId "io.github.ponnamkarthik.flutterhtmltextviewexample" 32 | minSdkVersion 16 33 | targetSdkVersion 28 34 | versionCode 1 35 | versionName "1.0" 36 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 37 | } 38 | 39 | buildTypes { 40 | release { 41 | // TODO: Add your own signing config for the release build. 42 | // Signing with the debug keys for now, so `flutter run --release` works. 43 | signingConfig signingConfigs.debug 44 | } 45 | } 46 | } 47 | 48 | flutter { 49 | source '../..' 50 | } 51 | 52 | dependencies { 53 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 54 | testImplementation 'junit:junit:4.12' 55 | androidTestImplementation 'androidx.test:runner:1.1.0-alpha4' 56 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4' 57 | } 58 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/io/github/ponnamkarthik/flutterhtmltextviewexample/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package io.github.ponnamkarthik.flutterhtmltextviewexample 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity(): FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.21' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.3.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | android.enableJetifier=true 2 | android.useAndroidX=true 3 | org.gradle.jvmargs=-Xmx1536M 4 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /example/flutter_html_textview_example.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /example/flutter_html_textview_example_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | *.pbxuser 16 | *.mode1v3 17 | *.mode2v3 18 | *.perspectivev3 19 | 20 | !default.pbxuser 21 | !default.mode1v3 22 | !default.mode2v3 23 | !default.perspectivev3 24 | 25 | xcuserdata 26 | 27 | *.moved-aside 28 | 29 | *.pyc 30 | *sync/ 31 | Icon? 32 | .tags* 33 | 34 | /Flutter/app.flx 35 | /Flutter/app.zip 36 | /Flutter/flutter_assets/ 37 | /Flutter/App.framework 38 | /Flutter/Flutter.framework 39 | /Flutter/Generated.xcconfig 40 | /ServiceDefinitions.json 41 | 42 | Pods/ 43 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; 19 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 20 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 46 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 48 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 9740EEB11CF90186004384FC /* Flutter */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 78 | 3B80C3931E831B6300D905FE /* App.framework */, 79 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 80 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 81 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 82 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 83 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 84 | ); 85 | name = Flutter; 86 | sourceTree = ""; 87 | }; 88 | 97C146E51CF9000F007C117D = { 89 | isa = PBXGroup; 90 | children = ( 91 | 9740EEB11CF90186004384FC /* Flutter */, 92 | 97C146F01CF9000F007C117D /* Runner */, 93 | 97C146EF1CF9000F007C117D /* Products */, 94 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 97C146EF1CF9000F007C117D /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146EE1CF9000F007C117D /* Runner.app */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | 97C146F01CF9000F007C117D /* Runner */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 110 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 111 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 112 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 113 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 114 | 97C147021CF9000F007C117D /* Info.plist */, 115 | 97C146F11CF9000F007C117D /* Supporting Files */, 116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 118 | ); 119 | path = Runner; 120 | sourceTree = ""; 121 | }; 122 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 97C146F21CF9000F007C117D /* main.m */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | /* End PBXGroup section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | 97C146ED1CF9000F007C117D /* Runner */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 136 | buildPhases = ( 137 | 9740EEB61CF901F6004384FC /* Run Script */, 138 | 97C146EA1CF9000F007C117D /* Sources */, 139 | 97C146EB1CF9000F007C117D /* Frameworks */, 140 | 97C146EC1CF9000F007C117D /* Resources */, 141 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 142 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0910; 160 | ORGANIZATIONNAME = "The Chromium Authors"; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 168 | compatibilityVersion = "Xcode 3.2"; 169 | developmentRegion = English; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | Base, 174 | ); 175 | mainGroup = 97C146E51CF9000F007C117D; 176 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 177 | projectDirPath = ""; 178 | projectRoot = ""; 179 | targets = ( 180 | 97C146ED1CF9000F007C117D /* Runner */, 181 | ); 182 | }; 183 | /* End PBXProject section */ 184 | 185 | /* Begin PBXResourcesBuildPhase section */ 186 | 97C146EC1CF9000F007C117D /* Resources */ = { 187 | isa = PBXResourcesBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 191 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 194 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 195 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 196 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | /* End PBXResourcesBuildPhase section */ 201 | 202 | /* Begin PBXShellScriptBuildPhase section */ 203 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 204 | isa = PBXShellScriptBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | ); 208 | inputPaths = ( 209 | ); 210 | name = "Thin Binary"; 211 | outputPaths = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 216 | }; 217 | 9740EEB61CF901F6004384FC /* Run Script */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | ); 224 | name = "Run Script"; 225 | outputPaths = ( 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 230 | }; 231 | /* End PBXShellScriptBuildPhase section */ 232 | 233 | /* Begin PBXSourcesBuildPhase section */ 234 | 97C146EA1CF9000F007C117D /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 239 | 97C146F31CF9000F007C117D /* main.m in Sources */, 240 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | /* End PBXSourcesBuildPhase section */ 245 | 246 | /* Begin PBXVariantGroup section */ 247 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 97C146FB1CF9000F007C117D /* Base */, 251 | ); 252 | name = Main.storyboard; 253 | sourceTree = ""; 254 | }; 255 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 256 | isa = PBXVariantGroup; 257 | children = ( 258 | 97C147001CF9000F007C117D /* Base */, 259 | ); 260 | name = LaunchScreen.storyboard; 261 | sourceTree = ""; 262 | }; 263 | /* End PBXVariantGroup section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | 97C147031CF9000F007C117D /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_ANALYZER_NONNULL = YES; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_MODULES = YES; 275 | CLANG_ENABLE_OBJC_ARC = YES; 276 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_COMMA = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 281 | CLANG_WARN_EMPTY_BODY = YES; 282 | CLANG_WARN_ENUM_CONVERSION = YES; 283 | CLANG_WARN_INFINITE_RECURSION = YES; 284 | CLANG_WARN_INT_CONVERSION = YES; 285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 286 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 287 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 288 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 289 | CLANG_WARN_STRICT_PROTOTYPES = YES; 290 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 291 | CLANG_WARN_UNREACHABLE_CODE = YES; 292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 293 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 294 | COPY_PHASE_STRIP = NO; 295 | DEBUG_INFORMATION_FORMAT = dwarf; 296 | ENABLE_STRICT_OBJC_MSGSEND = YES; 297 | ENABLE_TESTABILITY = YES; 298 | GCC_C_LANGUAGE_STANDARD = gnu99; 299 | GCC_DYNAMIC_NO_PIC = NO; 300 | GCC_NO_COMMON_BLOCKS = YES; 301 | GCC_OPTIMIZATION_LEVEL = 0; 302 | GCC_PREPROCESSOR_DEFINITIONS = ( 303 | "DEBUG=1", 304 | "$(inherited)", 305 | ); 306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 308 | GCC_WARN_UNDECLARED_SELECTOR = YES; 309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 310 | GCC_WARN_UNUSED_FUNCTION = YES; 311 | GCC_WARN_UNUSED_VARIABLE = YES; 312 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 313 | MTL_ENABLE_DEBUG_INFO = YES; 314 | ONLY_ACTIVE_ARCH = YES; 315 | SDKROOT = iphoneos; 316 | TARGETED_DEVICE_FAMILY = "1,2"; 317 | }; 318 | name = Debug; 319 | }; 320 | 97C147041CF9000F007C117D /* Release */ = { 321 | isa = XCBuildConfiguration; 322 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 323 | buildSettings = { 324 | ALWAYS_SEARCH_USER_PATHS = NO; 325 | CLANG_ANALYZER_NONNULL = YES; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_COMMA = YES; 333 | CLANG_WARN_CONSTANT_CONVERSION = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 343 | CLANG_WARN_STRICT_PROTOTYPES = YES; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNREACHABLE_CODE = YES; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 348 | COPY_PHASE_STRIP = NO; 349 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 350 | ENABLE_NS_ASSERTIONS = NO; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_NO_COMMON_BLOCKS = YES; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 361 | MTL_ENABLE_DEBUG_INFO = NO; 362 | SDKROOT = iphoneos; 363 | TARGETED_DEVICE_FAMILY = "1,2"; 364 | VALIDATE_PRODUCT = YES; 365 | }; 366 | name = Release; 367 | }; 368 | 97C147061CF9000F007C117D /* Debug */ = { 369 | isa = XCBuildConfiguration; 370 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 371 | buildSettings = { 372 | ARCHS = arm64; 373 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 374 | CURRENT_PROJECT_VERSION = 1; 375 | ENABLE_BITCODE = NO; 376 | FRAMEWORK_SEARCH_PATHS = ( 377 | "$(inherited)", 378 | "$(PROJECT_DIR)/Flutter", 379 | ); 380 | INFOPLIST_FILE = Runner/Info.plist; 381 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 382 | LIBRARY_SEARCH_PATHS = ( 383 | "$(inherited)", 384 | "$(PROJECT_DIR)/Flutter", 385 | ); 386 | PRODUCT_BUNDLE_IDENTIFIER = io.github.ponnamkarthik.flutterHtmlTextviewExample; 387 | PRODUCT_NAME = "$(TARGET_NAME)"; 388 | VERSIONING_SYSTEM = "apple-generic"; 389 | }; 390 | name = Debug; 391 | }; 392 | 97C147071CF9000F007C117D /* Release */ = { 393 | isa = XCBuildConfiguration; 394 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 395 | buildSettings = { 396 | ARCHS = arm64; 397 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 398 | CURRENT_PROJECT_VERSION = 1; 399 | ENABLE_BITCODE = NO; 400 | FRAMEWORK_SEARCH_PATHS = ( 401 | "$(inherited)", 402 | "$(PROJECT_DIR)/Flutter", 403 | ); 404 | INFOPLIST_FILE = Runner/Info.plist; 405 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 406 | LIBRARY_SEARCH_PATHS = ( 407 | "$(inherited)", 408 | "$(PROJECT_DIR)/Flutter", 409 | ); 410 | PRODUCT_BUNDLE_IDENTIFIER = io.github.ponnamkarthik.flutterHtmlTextviewExample; 411 | PRODUCT_NAME = "$(TARGET_NAME)"; 412 | VERSIONING_SYSTEM = "apple-generic"; 413 | }; 414 | name = Release; 415 | }; 416 | /* End XCBuildConfiguration section */ 417 | 418 | /* Begin XCConfigurationList section */ 419 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 420 | isa = XCConfigurationList; 421 | buildConfigurations = ( 422 | 97C147031CF9000F007C117D /* Debug */, 423 | 97C147041CF9000F007C117D /* Release */, 424 | ); 425 | defaultConfigurationIsVisible = 0; 426 | defaultConfigurationName = Release; 427 | }; 428 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 429 | isa = XCConfigurationList; 430 | buildConfigurations = ( 431 | 97C147061CF9000F007C117D /* Debug */, 432 | 97C147071CF9000F007C117D /* Release */, 433 | ); 434 | defaultConfigurationIsVisible = 0; 435 | defaultConfigurationName = Release; 436 | }; 437 | /* End XCConfigurationList section */ 438 | }; 439 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 440 | } 441 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 7 | [GeneratedPluginRegistrant registerWithRegistry:self]; 8 | // Override point for customization after application launch. 9 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_html_textview_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_html_view/flutter_html_view.dart'; 3 | 4 | import 'package:flutter_markdown/flutter_markdown.dart'; 5 | 6 | void main() => runApp(new MyApp()); 7 | 8 | class MyApp extends StatefulWidget { 9 | @override 10 | _MyAppState createState() => new _MyAppState(); 11 | } 12 | 13 | class _MyAppState extends State { 14 | @override 15 | initState() { 16 | super.initState(); 17 | } 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | String html = ''' 22 |

This is  heading 1

23 |

This is heading 2

24 |

This is heading 3

25 |

This is heading 4

26 |
This is heading 5
27 |
This is heading 6
28 |
Google 29 |
30 | Test Image 31 |
32 | 33 |
34 | Go Google 35 |
36 | Mail to me 37 |
38 | 41 | 42 | 43 | '''; 44 | 45 | return new MaterialApp( 46 | home: new Scaffold( 47 | appBar: new AppBar( 48 | title: new Text('Plugin example app'), 49 | ), 50 | body: new Container( 51 | child: new HtmlView( 52 | data: html, 53 | stylingOptions: null, 54 | styleSheet: MarkdownStyleSheet(), 55 | ), 56 | ), 57 | ), 58 | ); 59 | 60 | // return new MaterialApp( 61 | // home: new Scaffold( 62 | // appBar: new AppBar( 63 | // title: new Text('Plugin example app'), 64 | // ), 65 | // body: new SingleChildScrollView( 66 | // child: new Center( 67 | // child: new HtmlView( 68 | // data: html, 69 | // baseURL: "https://images.unsplash.com", 70 | // onLaunchFail: (url) { 71 | // print("launch $url failed"); 72 | // }, 73 | // ), 74 | // ), 75 | // ), 76 | // ), 77 | // ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_html_view_example 2 | description: Demonstrates how to use the flutter_html_textview plugin. 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | 8 | # The following adds the Cupertino Icons font to your application. 9 | # Use with the CupertinoIcons class for iOS style icons. 10 | cupertino_icons: ^0.1.2 11 | 12 | dev_dependencies: 13 | flutter_test: 14 | sdk: flutter 15 | 16 | flutter_html_view: 17 | path: ../ 18 | 19 | # For information on the generic Dart part of this file, see the 20 | # following page: https://www.dartlang.org/tools/pub/pubspec 21 | 22 | # The following section is specific to Flutter. 23 | flutter: 24 | # The following line ensures that the Material Icons font is 25 | # included with your application, so that you can use the icons in 26 | # the material Icons class. 27 | uses-material-design: true 28 | # To add assets to your application, add an assets section, like this: 29 | # assets: 30 | # - images/a_dot_burr.jpeg 31 | # - images/a_dot_ham.jpeg 32 | # An image asset can refer to one or more resolution-specific "variants", see 33 | # https://flutter.io/assets-and-images/#resolution-aware. 34 | # For details regarding adding assets from package dependencies, see 35 | # https://flutter.io/assets-and-images/#from-packages 36 | # To add custom fonts to your application, add a fonts section here, 37 | # in this "flutter" section. Each entry in this list should have a 38 | # "family" key with the font family name, and a "fonts" key with a 39 | # list giving the asset and other descriptors for the font. For 40 | # example: 41 | # fonts: 42 | # - family: Schyler 43 | # fonts: 44 | # - asset: fonts/Schyler-Regular.ttf 45 | # - asset: fonts/Schyler-Italic.ttf 46 | # style: italic 47 | # - family: Trajan Pro 48 | # fonts: 49 | # - asset: fonts/TrajanPro.ttf 50 | # - asset: fonts/TrajanPro_Bold.ttf 51 | # weight: 700 52 | # 53 | # For details regarding fonts from package dependencies, 54 | # see https://flutter.io/custom-fonts/#from-packages 55 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /flutter_html_view.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /lib/flutter_html_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/gestures.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_custom_tabs/flutter_custom_tabs.dart' as cTab; 4 | import 'package:url_launcher/url_launcher.dart'; 5 | 6 | class HtmlText extends StatelessWidget { 7 | final String data; 8 | final TextOverflow overflow; 9 | final Widget style; 10 | final int maxLines; 11 | final Function onLaunchFail; 12 | 13 | BuildContext ctx; 14 | 15 | HtmlText({this.data, this.style, this.onLaunchFail, this.overflow, this.maxLines}); 16 | 17 | void _launchURL(String url) async { 18 | try { 19 | await cTab.launch( 20 | url, 21 | option: new cTab.CustomTabsOption( 22 | toolbarColor: Theme.of(ctx).primaryColor, 23 | enableDefaultShare: true, 24 | enableUrlBarHiding: true, 25 | showPageTitle: true, 26 | ), 27 | ); 28 | } catch (e) { 29 | // An exception is thrown if browser app is not installed on Android device. 30 | debugPrint(e.toString()); 31 | } 32 | } 33 | 34 | void _launchOtherURL(String url) async { 35 | if (await canLaunch(url)) { 36 | await launch(url); 37 | } else { 38 | print('Could not launch $url'); 39 | 40 | if (this.onLaunchFail != null) { 41 | this.onLaunchFail(url); 42 | } 43 | } 44 | } 45 | 46 | TapGestureRecognizer recognizer(String url) { 47 | return new TapGestureRecognizer() 48 | ..onTap = () { 49 | if (url.startsWith("http://") || url.startsWith("https://")) { 50 | _launchURL(url); 51 | } else { 52 | _launchOtherURL(url); 53 | } 54 | }; 55 | } 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | ctx = context; 60 | HtmlParser parser = new HtmlParser(context); 61 | List nodes = parser.parse(this.data); 62 | 63 | TextSpan span = this._stackToTextSpan(nodes, context); 64 | 65 | 66 | RichText contents; 67 | if (overflow != null && maxLines != null) { 68 | contents = new RichText( 69 | text: span, 70 | softWrap: true, 71 | overflow: this.overflow, 72 | maxLines: this.maxLines, 73 | ); 74 | } else { 75 | contents = new RichText( 76 | text: span, 77 | softWrap: true, 78 | ); 79 | } 80 | 81 | return new Container( 82 | padding: 83 | const EdgeInsets.only(top: 2.0, left: 8.0, right: 8.0, bottom: 2.0), 84 | child: contents); 85 | } 86 | 87 | TextSpan _stackToTextSpan(List nodes, BuildContext context) { 88 | List children = []; 89 | 90 | for (int i = 0; i < nodes.length; i++) { 91 | children.add(_textSpan(nodes[i])); 92 | } 93 | 94 | return new TextSpan( 95 | text: '', 96 | style: DefaultTextStyle.of(context).style, 97 | children: children); 98 | } 99 | 100 | TextSpan _textSpan(Map node) { 101 | TextSpan span; 102 | String s = node['text']; 103 | 104 | s = s.replaceAll('\u00A0', ' '); 105 | s = s.replaceAll(' ', ' '); 106 | s = s.replaceAll('&', '&'); 107 | s = s.replaceAll('<', '<'); 108 | s = s.replaceAll('>', '>'); 109 | 110 | if (node['tag'] == 'a') { 111 | span = new TextSpan( 112 | text: s, style: node['style'], recognizer: recognizer(node['href'])); 113 | } else { 114 | span = new TextSpan( 115 | text: s, 116 | style: node['style'], 117 | ); 118 | } 119 | 120 | return span; 121 | } 122 | } 123 | 124 | class HtmlParser { 125 | // Regular Expressions for parsing tags and attributes 126 | RegExp _startTag; 127 | RegExp _endTag; 128 | RegExp _attr; 129 | RegExp _style; 130 | RegExp _color; 131 | 132 | final BuildContext context; 133 | 134 | final List _emptyTags = const [ 135 | 'area', 136 | 'base', 137 | 'basefont', 138 | 'br', 139 | 'col', 140 | 'frame', 141 | 'hr', 142 | 'img', 143 | 'input', 144 | 'isindex', 145 | 'link', 146 | 'meta', 147 | 'param', 148 | 'embed' 149 | ]; 150 | final List _blockTags = const [ 151 | 'address', 152 | 'applet', 153 | 'blockquote', 154 | 'button', 155 | 'center', 156 | 'dd', 157 | 'del', 158 | 'dir', 159 | 'div', 160 | 'dl', 161 | 'dt', 162 | 'fieldset', 163 | 'form', 164 | 'frameset', 165 | 'hr', 166 | 'iframe', 167 | 'ins', 168 | 'isindex', 169 | 'li', 170 | 'map', 171 | 'menu', 172 | 'noframes', 173 | 'noscript', 174 | 'object', 175 | 'ol', 176 | 'p', 177 | 'pre', 178 | 'script', 179 | 'table', 180 | 'tbody', 181 | 'td', 182 | 'tfoot', 183 | 'th', 184 | 'thead', 185 | 'tr', 186 | 'ul' 187 | ]; 188 | final List _inlineTags = const [ 189 | 'a', 190 | 'abbr', 191 | 'acronym', 192 | 'applet', 193 | 'b', 194 | 'basefont', 195 | 'bdo', 196 | 'big', 197 | 'br', 198 | 'button', 199 | 'cite', 200 | 'code', 201 | 'del', 202 | 'dfn', 203 | 'em', 204 | 'font', 205 | 'i', 206 | 'iframe', 207 | 'img', 208 | 'input', 209 | 'ins', 210 | 'kbd', 211 | 'label', 212 | 'map', 213 | 'object', 214 | 'q', 215 | 's', 216 | 'samp', 217 | 'script', 218 | 'select', 219 | 'small', 220 | 'span', 221 | 'strike', 222 | 'strong', 223 | 'sub', 224 | 'sup', 225 | 'textarea', 226 | 'tt', 227 | 'u', 228 | 'var' 229 | ]; 230 | final List _closeSelfTags = const [ 231 | 'colgroup', 232 | 'dd', 233 | 'dt', 234 | 'li', 235 | 'options', 236 | 'p', 237 | 'td', 238 | 'tfoot', 239 | 'th', 240 | 'thead', 241 | 'tr' 242 | ]; 243 | final List _fillAttrs = const [ 244 | 'checked', 245 | 'compact', 246 | 'declare', 247 | 'defer', 248 | 'disabled', 249 | 'ismap', 250 | 'multiple', 251 | 'nohref', 252 | 'noresize', 253 | 'noshade', 254 | 'nowrap', 255 | 'readonly', 256 | 'selected' 257 | ]; 258 | final List _specialTags = const ['script', 'style']; 259 | 260 | List _stack = []; 261 | List _result = []; 262 | 263 | Map _tag; 264 | 265 | HtmlParser(this.context) { 266 | this._startTag = new RegExp( 267 | r'^<([-A-Za-z0-9_]+)((?:\s+[-\w]+(?:\s*=\s*(?:(?:"[^"]*")' + 268 | "|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>"); 269 | this._endTag = new RegExp("^<\/([-A-Za-z0-9_]+)[^>]*>"); 270 | this._attr = new RegExp( 271 | r'([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")' + 272 | r"|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?"); 273 | this._style = new RegExp(r'([a-zA-Z\-]+)\s*:\s*([^;]*)'); 274 | this._color = new RegExp(r'^#([a-fA-F0-9]{6})$'); 275 | } 276 | 277 | List parse(String html) { 278 | String last = html; 279 | Match match; 280 | int index; 281 | bool chars; 282 | 283 | while (html.length > 0) { 284 | chars = true; 285 | 286 | // Make sure we're not in a script or style element 287 | if (this._getStackLastItem() == null || 288 | !this._specialTags.contains(this._getStackLastItem())) { 289 | // Comment 290 | if (html.indexOf(''); 292 | 293 | if (index >= 0) { 294 | html = html.substring(index + 3); 295 | chars = false; 296 | } 297 | } 298 | // End tag 299 | else if (html.indexOf(']*>'); 337 | 338 | html = html.replaceAllMapped(re, (Match match) { 339 | String text = match[0] 340 | ..replaceAll(new RegExp(''), '\$1') 341 | ..replaceAll(new RegExp(''), '\$1'); 342 | 343 | this._appendNode(text); 344 | 345 | return ''; 346 | }); 347 | 348 | this._parseEndTag(this._getStackLastItem()); 349 | } 350 | 351 | if (html == last) { 352 | throw 'Parse Error: ' + html; 353 | } 354 | 355 | last = html; 356 | } 357 | 358 | // Cleanup any remaining tags 359 | this._parseEndTag(); 360 | 361 | List result = this._result; 362 | 363 | // Cleanup internal variables 364 | this._stack = []; 365 | this._result = []; 366 | 367 | return result; 368 | } 369 | 370 | void _parseStartTag(String tag, String tagName, String rest, int unary) { 371 | tagName = tagName.toLowerCase(); 372 | 373 | if (this._blockTags.contains(tagName)) { 374 | while (this._getStackLastItem() != null && 375 | this._inlineTags.contains(this._getStackLastItem())) { 376 | this._parseEndTag(this._getStackLastItem()); 377 | } 378 | } 379 | 380 | if (this._closeSelfTags.contains(tagName) && 381 | this._getStackLastItem() == tagName) { 382 | this._parseEndTag(tagName); 383 | } 384 | 385 | if (this._emptyTags.contains(tagName)) { 386 | unary = 1; 387 | } 388 | 389 | if (unary == 0) { 390 | this._stack.add(tagName); 391 | } 392 | 393 | Map attrs = {}; 394 | 395 | Iterable matches = this._attr.allMatches(rest); 396 | 397 | if (matches != null) { 398 | for (Match match in matches) { 399 | String attribute = match[1]; 400 | String value; 401 | 402 | if (match[2] != null) { 403 | value = match[2]; 404 | } else if (match[3] != null) { 405 | value = match[3]; 406 | } else if (match[4] != null) { 407 | value = match[4]; 408 | } else if (this._fillAttrs.contains(attribute) != null) { 409 | value = attribute; 410 | } 411 | 412 | attrs[attribute] = value; 413 | } 414 | } 415 | 416 | this._appendTag(tagName, attrs); 417 | } 418 | 419 | void _parseEndTag([String tagName]) { 420 | int pos; 421 | 422 | // If no tag name is provided, clean shop 423 | if (tagName == null) { 424 | pos = 0; 425 | } 426 | // Find the closest opened tag of the same type 427 | else { 428 | for (pos = this._stack.length - 1; pos >= 0; pos--) { 429 | if (this._stack[pos] == tagName) { 430 | break; 431 | } 432 | } 433 | } 434 | 435 | if (pos >= 0) { 436 | // Remove the open elements from the stack 437 | this._stack.removeRange(pos, this._stack.length); 438 | } 439 | } 440 | 441 | TextStyle _parseStyle(String tag, Map attrs) { 442 | Iterable matches; 443 | String style = attrs['style']; 444 | String param; 445 | String value; 446 | 447 | TextStyle defaultTextStyle = DefaultTextStyle.of(context).style; 448 | 449 | double fontSize = defaultTextStyle.fontSize; 450 | Color color = defaultTextStyle.color; 451 | FontWeight fontWeight = defaultTextStyle.fontWeight; 452 | FontStyle fontStyle = defaultTextStyle.fontStyle; 453 | TextDecoration textDecoration = defaultTextStyle.decoration; 454 | 455 | switch (tag) { 456 | case 'h1': 457 | fontSize = 32.0; 458 | break; 459 | case 'h2': 460 | fontSize = 24.0; 461 | break; 462 | case 'h3': 463 | fontSize = 20.8; 464 | break; 465 | case 'h4': 466 | fontSize = 16.0; 467 | break; 468 | case 'h5': 469 | fontSize = 12.8; 470 | break; 471 | case 'h6': 472 | fontSize = 11.2; 473 | break; 474 | case 'a': 475 | textDecoration = TextDecoration.underline; 476 | color = new Color(int.parse('0xFF1965B5')); 477 | break; 478 | 479 | case 'b': 480 | case 'strong': 481 | fontWeight = FontWeight.bold; 482 | break; 483 | 484 | case 'i': 485 | case 'em': 486 | fontStyle = FontStyle.italic; 487 | break; 488 | 489 | case 'u': 490 | textDecoration = TextDecoration.underline; 491 | break; 492 | } 493 | 494 | if (style != null) { 495 | matches = this._style.allMatches(style); 496 | 497 | for (Match match in matches) { 498 | param = match[1].trim(); 499 | value = match[2].trim(); 500 | 501 | switch (param) { 502 | case 'color': 503 | if (this._color.hasMatch(value)) { 504 | value = value.replaceAll('#', '').trim(); 505 | color = new Color(int.parse('0xFF' + value)); 506 | } 507 | 508 | break; 509 | 510 | case 'font-weight': 511 | fontWeight = 512 | (value == 'bold') ? FontWeight.bold : FontWeight.normal; 513 | 514 | break; 515 | 516 | case 'font-style': 517 | fontStyle = 518 | (value == 'italic') ? FontStyle.italic : FontStyle.normal; 519 | 520 | break; 521 | 522 | case 'font-size': 523 | fontSize = double.parse(value); 524 | 525 | break; 526 | 527 | case 'text-decoration': 528 | textDecoration = (value == 'underline') 529 | ? TextDecoration.underline 530 | : TextDecoration.none; 531 | 532 | break; 533 | } 534 | } 535 | } 536 | 537 | TextStyle textStyle; 538 | 539 | if (fontSize != 0.0) { 540 | textStyle = new TextStyle( 541 | color: color, 542 | fontWeight: fontWeight, 543 | fontStyle: fontStyle, 544 | decoration: textDecoration, 545 | fontSize: fontSize); 546 | } else { 547 | textStyle = new TextStyle( 548 | color: color, 549 | fontWeight: fontWeight, 550 | fontStyle: fontStyle, 551 | decoration: textDecoration, 552 | ); 553 | } 554 | 555 | return textStyle; 556 | } 557 | 558 | void _appendTag(String tag, Map attrs) { 559 | this._tag = {'tag': tag, 'attrs': attrs}; 560 | } 561 | 562 | void _appendNode(String text) { 563 | if (this._tag == null) { 564 | this._tag = {'tag': 'p', 'attrs': {}}; 565 | } 566 | 567 | this._tag['text'] = text; 568 | this._tag['style'] = this._parseStyle(this._tag['tag'], this._tag['attrs']); 569 | this._tag['href'] = 570 | (this._tag['attrs']['href'] != null) ? this._tag['attrs']['href'] : ''; 571 | 572 | this._tag.remove('attrs'); 573 | 574 | this._result.add(this._tag); 575 | 576 | this._tag = null; 577 | } 578 | 579 | String _getStackLastItem() { 580 | if (this._stack.length <= 0) { 581 | return null; 582 | } 583 | 584 | return this._stack[this._stack.length - 1]; 585 | } 586 | } 587 | -------------------------------------------------------------------------------- /lib/flutter_html_video.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:video_player/video_player.dart'; 3 | 4 | class VideoPlayPause extends StatefulWidget { 5 | final VideoPlayerController controller; 6 | 7 | VideoPlayPause(this.controller); 8 | 9 | @override 10 | State createState() { 11 | return new _VideoPlayPauseState(); 12 | } 13 | } 14 | 15 | class _VideoPlayPauseState extends State { 16 | FadeAnimation imageFadeAnim = 17 | new FadeAnimation(child: const Icon(Icons.play_arrow, size: 100.0)); 18 | VoidCallback listener; 19 | 20 | _VideoPlayPauseState() { 21 | listener = () { 22 | setState(() {}); 23 | }; 24 | } 25 | 26 | VideoPlayerController get controller => widget.controller; 27 | 28 | @override 29 | void initState() { 30 | super.initState(); 31 | controller.addListener(listener); 32 | controller.setVolume(1.0); 33 | controller.play(); 34 | } 35 | 36 | @override 37 | void deactivate() { 38 | controller.setVolume(0.0); 39 | controller.removeListener(listener); 40 | super.deactivate(); 41 | } 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | final List children = [ 46 | new GestureDetector( 47 | child: new VideoPlayer(controller), 48 | onTap: () { 49 | if (!controller.value.initialized) { 50 | return; 51 | } 52 | if (controller.value.isPlaying) { 53 | imageFadeAnim = 54 | new FadeAnimation(child: const Icon(Icons.pause, size: 100.0)); 55 | controller.pause(); 56 | } else { 57 | imageFadeAnim = new FadeAnimation( 58 | child: const Icon(Icons.play_arrow, size: 100.0)); 59 | controller.play(); 60 | } 61 | }, 62 | ), 63 | new Align( 64 | alignment: Alignment.bottomCenter, 65 | child: new VideoProgressIndicator( 66 | controller, 67 | allowScrubbing: true, 68 | ), 69 | ), 70 | new Center(child: imageFadeAnim), 71 | ]; 72 | return new Stack( 73 | fit: StackFit.passthrough, 74 | children: children, 75 | ); 76 | } 77 | } 78 | 79 | class FadeAnimation extends StatefulWidget { 80 | final Widget child; 81 | final Duration duration; 82 | 83 | FadeAnimation({this.child, this.duration: const Duration(milliseconds: 500)}); 84 | 85 | @override 86 | _FadeAnimationState createState() => new _FadeAnimationState(); 87 | } 88 | 89 | class _FadeAnimationState extends State 90 | with SingleTickerProviderStateMixin { 91 | AnimationController animationController; 92 | 93 | @override 94 | void initState() { 95 | super.initState(); 96 | animationController = 97 | new AnimationController(duration: widget.duration, vsync: this); 98 | animationController.addListener(() { 99 | if (mounted) { 100 | setState(() {}); 101 | } 102 | }); 103 | animationController.forward(from: 0.0); 104 | } 105 | 106 | @override 107 | void deactivate() { 108 | animationController.stop(); 109 | super.deactivate(); 110 | } 111 | 112 | @override 113 | void didUpdateWidget(FadeAnimation oldWidget) { 114 | super.didUpdateWidget(oldWidget); 115 | if (oldWidget.child != widget.child) { 116 | animationController.forward(from: 0.0); 117 | } 118 | } 119 | 120 | @override 121 | void dispose() { 122 | animationController.dispose(); 123 | super.dispose(); 124 | } 125 | 126 | @override 127 | Widget build(BuildContext context) { 128 | return animationController.isAnimating 129 | ? new Opacity( 130 | opacity: 1.0 - animationController.value, 131 | child: widget.child, 132 | ) 133 | : new Container(); 134 | } 135 | } 136 | 137 | typedef Widget VideoWidgetBuilder( 138 | BuildContext context, VideoPlayerController controller); 139 | 140 | abstract class PlayerLifeCycle extends StatefulWidget { 141 | final VideoWidgetBuilder childBuilder; 142 | final String dataSource; 143 | 144 | PlayerLifeCycle(this.dataSource, this.childBuilder); 145 | } 146 | 147 | /// A widget connecting its life cycle to a [VideoPlayerController] using 148 | /// a data source from the network. 149 | class NetworkPlayerLifeCycle extends PlayerLifeCycle { 150 | NetworkPlayerLifeCycle(String dataSource, VideoWidgetBuilder childBuilder) 151 | : super(dataSource, childBuilder); 152 | 153 | @override 154 | _NetworkPlayerLifeCycleState createState() => 155 | new _NetworkPlayerLifeCycleState(); 156 | } 157 | 158 | abstract class _PlayerLifeCycleState extends State { 159 | VideoPlayerController controller; 160 | 161 | @override 162 | 163 | /// Subclasses should implement [createVideoPlayerController], which is used 164 | /// by this method. 165 | void initState() { 166 | super.initState(); 167 | controller = createVideoPlayerController(); 168 | controller.addListener(() { 169 | if (controller.value.hasError) { 170 | print(controller.value.errorDescription); 171 | } 172 | }); 173 | controller.initialize(); 174 | controller.setLooping(false); 175 | controller.play(); 176 | } 177 | 178 | @override 179 | void deactivate() { 180 | super.deactivate(); 181 | } 182 | 183 | @override 184 | void dispose() { 185 | controller.dispose(); 186 | super.dispose(); 187 | } 188 | 189 | @override 190 | Widget build(BuildContext context) { 191 | return widget.childBuilder(context, controller); 192 | } 193 | 194 | VideoPlayerController createVideoPlayerController(); 195 | } 196 | 197 | class _NetworkPlayerLifeCycleState extends _PlayerLifeCycleState { 198 | @override 199 | VideoPlayerController createVideoPlayerController() { 200 | return new VideoPlayerController.network(widget.dataSource); 201 | } 202 | } 203 | 204 | class AspectRatioVideo extends StatefulWidget { 205 | final VideoPlayerController controller; 206 | 207 | AspectRatioVideo(this.controller); 208 | 209 | @override 210 | AspectRatioVideoState createState() => new AspectRatioVideoState(); 211 | } 212 | 213 | class AspectRatioVideoState extends State { 214 | VideoPlayerController get controller => widget.controller; 215 | bool initialized = false; 216 | 217 | VoidCallback listener; 218 | 219 | @override 220 | void initState() { 221 | super.initState(); 222 | listener = () { 223 | if (!mounted) { 224 | return; 225 | } 226 | if (initialized != controller.value.initialized) { 227 | initialized = controller.value.initialized; 228 | setState(() {}); 229 | } 230 | }; 231 | controller.addListener(listener); 232 | } 233 | 234 | @override 235 | Widget build(BuildContext context) { 236 | if (initialized) { 237 | return new Center( 238 | child: new AspectRatio( 239 | aspectRatio: 16 / 9, 240 | child: new VideoPlayPause(controller), 241 | ), 242 | ); 243 | } else { 244 | return new Container( 245 | color: Colors.black, 246 | child: new AspectRatio( 247 | aspectRatio: 16 / 9, 248 | child: const Center(child: const CircularProgressIndicator()), 249 | ), 250 | ); 251 | } 252 | } 253 | } 254 | -------------------------------------------------------------------------------- /lib/flutter_html_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:html2md/html2md.dart' as html2md; 4 | import 'package:flutter_markdown/flutter_markdown.dart'; 5 | import 'package:flutter_custom_tabs/flutter_custom_tabs.dart' as cTab; 6 | import 'package:url_launcher/url_launcher.dart'; 7 | 8 | class HtmlView extends StatelessWidget { 9 | final String data; 10 | final Function onLaunchFail; 11 | final bool scrollable; 12 | final EdgeInsets padding; 13 | Map stylingOptions; 14 | BuildContext ctx; 15 | MarkdownStyleSheet styleSheet; 16 | 17 | /// If [scrollable] is set to false then you must handle scrolling outside of this widget. 18 | /// This can be acheived by using a [SingleChildScrollView]. 19 | HtmlView( 20 | {this.data, 21 | this.stylingOptions, 22 | this.onLaunchFail, 23 | this.scrollable = true, 24 | this.padding, 25 | this.styleSheet = null}); 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | ctx = context; 30 | if (scrollable) { 31 | return Markdown( 32 | data: _htmlMd(data, stylingOptions), 33 | onTapLink: (url) { 34 | if (url.startsWith("http://") || url.startsWith("https://")) { 35 | _launchURL(url); 36 | } else { 37 | _launchOtherURL(url); 38 | } 39 | }, 40 | padding: padding, 41 | styleSheet: styleSheet, 42 | ); 43 | } else { 44 | return Container( 45 | padding: padding, 46 | child: MarkdownBody( 47 | // Doesn't use a list view, hence no scrolling. 48 | data: _htmlMd(data, stylingOptions), 49 | onTapLink: (url) { 50 | if (url.startsWith("http://") || url.startsWith("https://")) { 51 | _launchURL(url); 52 | } else { 53 | _launchOtherURL(url); 54 | } 55 | }, 56 | styleSheet: styleSheet, 57 | ), 58 | ); 59 | } 60 | } 61 | 62 | String _htmlMd(String html, Map stylingOptions) { 63 | if (stylingOptions != null) { 64 | return html2md.convert(html, styleOptions: stylingOptions); 65 | } else { 66 | return html2md.convert(html); 67 | } 68 | } 69 | 70 | void _launchURL(String url) async { 71 | try { 72 | await cTab.launch( 73 | url, 74 | option: new cTab.CustomTabsOption( 75 | toolbarColor: Theme.of(ctx).primaryColor, 76 | enableDefaultShare: true, 77 | enableUrlBarHiding: true, 78 | showPageTitle: true, 79 | ), 80 | ); 81 | } catch (e) { 82 | if (this.onLaunchFail != null) { 83 | this.onLaunchFail(url); 84 | } 85 | debugPrint(e.toString()); 86 | } 87 | } 88 | 89 | void _launchOtherURL(String url) async { 90 | if (await canLaunch(url)) { 91 | await launch(url); 92 | } else { 93 | debugPrint('Could not launch $url'); 94 | if (this.onLaunchFail != null) { 95 | this.onLaunchFail(url); 96 | } 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /lib/html_parser.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_html_view/flutter_html_text.dart'; 6 | import 'package:flutter_html_view/flutter_html_video.dart'; 7 | import 'package:html/dom.dart' as dom; 8 | import 'package:html/parser.dart' show parse; 9 | import 'package:video_player/video_player.dart'; 10 | 11 | class HtmlParser { 12 | TextOverflow overflow; 13 | int maxLines; 14 | String baseUrl; 15 | Function onLaunchFail; 16 | 17 | HtmlParser({this.baseUrl, this.onLaunchFail, this.overflow, this.maxLines}); 18 | 19 | _parseChildren(dom.Element e, widgetList) { 20 | if (e.localName == "img" && e.attributes.containsKey('src')) { 21 | var src = e.attributes['src']; 22 | 23 | if (src.startsWith("http") || src.startsWith("https")) { 24 | widgetList.add(new CachedNetworkImage( 25 | imageUrl: src, 26 | fit: BoxFit.cover, 27 | )); 28 | } else if (src.startsWith('data:image')) { 29 | var exp = new RegExp(r'data:.*;base64,'); 30 | var base64Str = src.replaceAll(exp, ''); 31 | var bytes = base64.decode(base64Str); 32 | widgetList.add(new Image.memory(bytes, fit: BoxFit.cover)); 33 | } else if (baseUrl != null && baseUrl.isNotEmpty && src.startsWith("/")) { 34 | widgetList.add(new CachedNetworkImage( 35 | imageUrl: baseUrl + src, 36 | fit: BoxFit.cover, 37 | )); 38 | } 39 | } else if (e.localName == "video") { 40 | if (e.attributes.containsKey('src')) { 41 | var src = e.attributes['src']; 42 | // var videoElements = e.getElementsByTagName("video"); 43 | widgetList.add( 44 | new NetworkPlayerLifeCycle( 45 | src, 46 | (BuildContext context, VideoPlayerController controller) => 47 | new AspectRatioVideo(controller), 48 | ), 49 | ); 50 | } else { 51 | if (e.children.length > 0) { 52 | e.children.forEach((dom.Element source) { 53 | try { 54 | if (source.attributes['type'] == "video/mp4") { 55 | var src = e.children[0].attributes['src']; 56 | widgetList.add( 57 | new NetworkPlayerLifeCycle( 58 | src, 59 | (BuildContext context, VideoPlayerController controller) => 60 | new AspectRatioVideo(controller), 61 | ), 62 | ); 63 | } 64 | } catch (e) { 65 | print(e); 66 | } 67 | }); 68 | } 69 | } 70 | } else if (!e.outerHtml.contains(" 0) 75 | e.children.forEach((e) => _parseChildren(e, widgetList)); 76 | } 77 | 78 | List parseHTML(String html) { 79 | List widgetList = new List(); 80 | 81 | dom.Document document = parse(html); 82 | 83 | dom.Element docBody = document.body; 84 | 85 | List styleElements = docBody.getElementsByTagName("style"); 86 | List scriptElements = docBody.getElementsByTagName("script"); 87 | if (styleElements.length > 0) { 88 | for (int i = 0; i < styleElements.length; i++) { 89 | docBody.getElementsByTagName("style").first.remove(); 90 | } 91 | } 92 | if (scriptElements.length > 0) { 93 | for (int i = 0; i < scriptElements.length; i++) { 94 | docBody.getElementsByTagName("script").first.remove(); 95 | } 96 | } 97 | 98 | List docBodyChildren = docBody.children; 99 | if (docBodyChildren.length > 0) 100 | docBodyChildren.forEach((e) => _parseChildren(e, widgetList)); 101 | 102 | return widgetList; 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_html_view 2 | 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 3 | version: 0.5.12 4 | author: Karthik Ponnam 5 | homepage: https://github.com/PonnamKarthik/FlutterHtmlView 6 | 7 | dependencies: 8 | flutter: 9 | sdk: flutter 10 | flutter_custom_tabs: ^0.6.0 11 | html: ^0.13.3+3 12 | video_player: 0.10.0+2 13 | cached_network_image: ^0.7.0 14 | 15 | flutter_markdown: ^0.2.0 16 | html2md: ^0.3.0 17 | 18 | environment: 19 | sdk: ">=2.0.0-dev.28.0 <3.0.0" 20 | flutter: ">=0.1.4 <2.0.0" 21 | -------------------------------------------------------------------------------- /res/values/strings_en.arb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ponnamkarthik/FlutterHtmlView/de4aa429eb43df9f7b593ed8f970ad2a8e24601e/res/values/strings_en.arb --------------------------------------------------------------------------------