Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ publish_to: none
version: 1.0.0+1

environment:
sdk: '>=2.17.0 <3.0.0'
sdk: ">=2.17.0 <3.0.0"

dependencies:
flutter_html:
path: ..
flutter_html_all:
path: ../packages/flutter_html_all
path: ../
flutter:
sdk: flutter

Expand All @@ -20,9 +18,8 @@ dev_dependencies:
flutter_lints: ^2.0.1

flutter:

uses-material-design: true

assets:
- assets/html5.png
- assets/mac.svg
- assets/mac.svg
24 changes: 16 additions & 8 deletions packages/flutter_html_all/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: flutter_html_all
description: All optional flutter_html widgets, bundled into a single package.
version: 3.0.0-beta.2
homepage: https://github.com/Sub6Resources/flutter_html
publish_to: none # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.12.0 <4.0.0"
Expand All @@ -10,14 +11,21 @@ environment:
dependencies:
flutter:
sdk: flutter
html: '>=0.15.0 <1.0.0'
flutter_html: ^3.0.0-beta.2
flutter_html_audio: ^3.0.0-beta.2
flutter_html_iframe: ^3.0.0-beta.2
flutter_html_math: ^3.0.0-beta.2
flutter_html_svg: ^3.0.0-beta.2
flutter_html_table: ^3.0.0-beta.2
flutter_html_video: ^3.0.0-beta.2
html: ">=0.15.0 <1.0.0"
flutter_html:
path: ../..
flutter_html_audio:
path: ../flutter_html_audio
flutter_html_iframe:
path: ../flutter_html_iframe
flutter_html_math:
path: ../flutter_html_math
flutter_html_svg:
path: ../flutter_html_svg
flutter_html_table:
path: ../flutter_html_table
flutter_html_video:
path: ../flutter_html_video

dev_dependencies:
flutter_test:
Expand Down
8 changes: 5 additions & 3 deletions packages/flutter_html_audio/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: flutter_html_audio
description: This extension package allows the <audio> tag to be rendered using the flutter_html package
version: 3.0.0-beta.2
homepage: https://github.com/Sub6Resources/flutter_html
publish_to: none # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.12.0 <4.0.0"
Expand All @@ -10,9 +11,10 @@ environment:
dependencies:
flutter:
sdk: flutter
html: '>=0.15.0 <1.0.0'
flutter_html: ^3.0.0-beta.2
video_player: '>=2.2.8 <3.0.0'
html: ">=0.15.0 <1.0.0"
flutter_html:
path: ../..
video_player: ">=2.2.8 <3.0.0"
chewie_audio: ^1.5.0

dev_dependencies:
Expand Down
13 changes: 13 additions & 0 deletions packages/flutter_html_iframe/lib/iframe_mobile.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:convert';

import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -34,6 +36,17 @@ class IframeWidget extends StatelessWidget {
final givenHeight =
double.tryParse(extensionContext.attributes['height'] ?? "");

Uri? srcUri;
if (extensionContext.attributes['srcdoc'] != null) {
srcUri = Uri.dataFromString(
extensionContext.attributes['srcdoc'] ?? '',
mimeType: 'text/html',
encoding: Encoding.getByName('utf-8'),
);
} else {
srcUri = Uri.tryParse(extensionContext.attributes['src'] ?? "") ?? Uri();
}

return SizedBox(
width: givenWidth ?? (givenHeight ?? 150) * 2,
height: givenHeight ?? (givenWidth ?? 300) / 2,
Expand Down
8 changes: 5 additions & 3 deletions packages/flutter_html_iframe/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: flutter_html_iframe
description: This extension package allows the <iframe> tag to be rendered using the flutter_html package
version: 3.0.0-beta.2
homepage: https://github.com/Sub6Resources/flutter_html
publish_to: none # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.12.0 <4.0.0"
Expand All @@ -10,9 +11,10 @@ environment:
dependencies:
flutter:
sdk: flutter
html: '>=0.15.0 <1.0.0'
flutter_html: ^3.0.0-beta.2
webview_flutter: '>=4.0.0 <5.0.0'
html: ">=0.15.0 <1.0.0"
flutter_html:
path: ../..
webview_flutter: ">=4.0.0 <5.0.0"

dev_dependencies:
flutter_test:
Expand Down
8 changes: 5 additions & 3 deletions packages/flutter_html_math/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: flutter_html_math
description: This extension package allows the <math> tag to be rendered using the flutter_html package
version: 3.0.0-beta.2
homepage: https://github.com/Sub6Resources/flutter_html
publish_to: none # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.12.0 <4.0.0"
Expand All @@ -10,9 +11,10 @@ environment:
dependencies:
flutter:
sdk: flutter
html: '>=0.15.0 <1.0.0'
flutter_html: ^3.0.0-beta.2
flutter_math_fork: '>=0.6.0 <1.0.0'
html: ">=0.15.0 <1.0.0"
flutter_html:
path: ../..
flutter_math_fork: ">=0.6.0 <1.0.0"

dev_dependencies:
flutter_test:
Expand Down
8 changes: 5 additions & 3 deletions packages/flutter_html_svg/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: flutter_html_svg
description: This extension package allows the <svg> tag and svg-based img sources to be rendered using the flutter_html package
version: 3.0.0-beta.2
homepage: https://github.com/Sub6Resources/flutter_html
publish_to: none # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.17.0 <4.0.0"
Expand All @@ -10,9 +11,10 @@ environment:
dependencies:
flutter:
sdk: flutter
html: '>=0.15.0 <1.0.0'
flutter_html: ^3.0.0-beta.2
flutter_svg: '>=1.0.0 <3.0.0'
html: ">=0.15.0 <1.0.0"
flutter_html:
path: ../..
flutter_svg: ">=1.0.0 <3.0.0"

dev_dependencies:
flutter_test:
Expand Down
8 changes: 5 additions & 3 deletions packages/flutter_html_table/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: This extension package allows the <table> tag to be rendered using

version: 3.0.0-beta.2
homepage: https://github.com/Sub6Resources/flutter_html
publish_to: none # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.17.0 <4.0.0"
Expand All @@ -11,9 +12,10 @@ environment:
dependencies:
flutter:
sdk: flutter
html: '>=0.15.0 <1.0.0'
flutter_html: ^3.0.0-beta.2
flutter_layout_grid: '>=1.0.1 <3.0.0'
html: ">=0.15.0 <1.0.0"
flutter_html:
path: ../..
flutter_layout_grid: ">=1.0.1 <3.0.0"

dev_dependencies:
flutter_test:
Expand Down
10 changes: 6 additions & 4 deletions packages/flutter_html_video/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: flutter_html_video
description: This extension package allows the <video> tag to be rendered using the flutter_html package
version: 3.0.0-beta.2
homepage: https://github.com/Sub6Resources/flutter_html
publish_to: none # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.12.0 <4.0.0"
Expand All @@ -10,10 +11,11 @@ environment:
dependencies:
flutter:
sdk: flutter
html: '>=0.15.0 <1.0.0'
flutter_html: ^3.0.0-beta.2
video_player: '>=2.2.8 <3.0.0'
chewie: '>=1.1.0 <2.0.0'
html: ">=0.15.0 <1.0.0"
flutter_html:
path: ../..
video_player: ">=2.2.8 <3.0.0"
chewie: ">=1.1.0 <2.0.0"

dev_dependencies:
flutter_test:
Expand Down