10000 chore: Update dependency versions · Sub6Resources/flutter_html@d8eabdc · GitHub
[go: up one dir, main page]

Skip to content

Commit d8eabdc

Browse files
committed
chore: Update dependency versions
1 parent 6bccb32 commit d8eabdc

File tree

34 files changed

+166
-150
lines changed

34 files changed

+166
-150
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
file: coverage_report/lcov.info
3535
- run:
3636
name: Run flutter analyze
37-
command: melos run analyze
37+
command: melos analyze --fatal-infos
3838
- run:
3939
name: Check That Flutter Code is Formatted Correctly
4040
command: dart format -o none --set-exit-if-changed .

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These are supported funding model platforms
22

3-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
3+
github: Sub6Resources
44
patreon: # Replace with a single Patreon username
55
open_collective: flutter_html
66
ko_fi: # Replace with a single Ko-fi username
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
//
4+
// Generated file. Do not edit.
5+
//
6+
7+
import PackageDescription
8+
9+
let package = Package(
10+
name: "FlutterGeneratedPluginSwiftPackage",
11+
platforms: [
12+
.iOS("12.0")
13+
],
14+
products: [
15+
.library(name: "FlutterGeneratedPluginSwiftPackage", type: .static, targets: ["FlutterGeneratedPluginSwiftPackage"])
16+
],
17+
dependencies: [
18+
.package(name: "video_player_avfoundation", path: "/Users/matthewwhitaker/.pub-cache/hosted/pub.dev/video_player_avfoundation-2.6.7/darwin/video_player_avfoundation")
19+
],
20+
targets: [
21+
.target(
22+
name: "FlutterGeneratedPluginSwiftPackage",
23+
dependencies: [
24+
.product(name: "video-player-avfoundation", package: "video_player_avfoundation")
25+
]
26+
)
27+
]
28+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//
2+
// Generated file. Do not edit.
3+
//

example/lib/main.dart

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ const htmlData = r"""
6262
6363
<h4>Margin Auto on Image</h4>
6464
<p>display:inline-block; margin: auto; (should not center):</p>
65-
<img alt='' style="margin: auto;" width="100" src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png">
65+
<img alt='' style="margin: auto;" width="100" src="https://placehold.co/600x400/000000/FFF?text=img.png">
6666
<p>display:block margin: auto; (should center):</p>
67-
<img alt='' style="display: block; margin: auto;" width="100" src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png">
67+
<img alt='' style="display: block; margin: auto;" width="100" src="https://placehold.co/600x400/000000/FFF?text=img.png">
6868
6969
<h2>Support for <code>sub</code>/<code>sup</code></h2>
7070
Solve for <var>x<sub>n</sub></var>: log<sub>2</sub>(<var>x</var><sup>2</sup>+<var>n</var>) = 9<sup>3</sup>
@@ -84,26 +84,26 @@ const htmlData = r"""
8484
8585
8686
<h2>Table support (With custom styling!):</h2>
87-
<table>
88-
<colgroup>
89-
<col width="200" />
90-
<col span="2" width="150" />
91-
</colgroup>
92-
<thead>
93-
<tr><th>One</th><th>Two</th><th>Three</th></tr>
94-
</thead>
95-
<tbody>
96-
<tr>
97-
<td rowspan='2'>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan</td><td>Data</td><td>Data</td>
98-
</tr>
99-
<tr>
100-
<td colspan="2"><img width="175" alt='xkcd' src='https://imgs.xkcd.com/comics/commemorative_plaque.png' /></td>
101-
</tr>
102-
</tbody>
103-
<tfoot>
104-
<tr><td>fData</td><td>fData</td><td>fData</td></tr>
105-
</tfoot>
106-
</table>
87+
<!-- <table>-->
88+
<!-- <colgroup>-->
89+
<!-- <col width="200" />-->
90+
<!-- <col span="2" width="150" />-->
91+
<!-- </colgroup>-->
92+
<!-- <thead>-->
93+
<!-- <tr><th>One</th><th>Two</th><th>Three</th></tr>-->
94+
<!-- </thead>-->
95+
<!-- <tbody>-->
96+
<!-- <tr>-->
97+
<!-- <td rowspan='2'>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan<br>Rowspan</td><td>Data</td><td>Data</td>-->
98+
<!-- </tr>-->
99+
<!-- <tr>-->
100+
<!-- <td colspan="2"><img width="175" alt='xkcd' src='https://imgs.xkcd.com/comics/commemorative_plaque.png' /></td>-->
101+
<!-- </tr>-->
102+
<!-- </tbody>-->
103+
<!-- <tfoot>-->
104+
<!-- <tr><td>fData</td><td>fData</td><td>fData</td></tr>-->
105+
<!-- </tfoot>-->
106+
<!-- </table>-->
107107
108108
<h2>List support:</h2>
109109
<ol>
@@ -137,20 +137,20 @@ const htmlData = r"""
137137
Linking to <a href='https://github.com'>websites</a> has never been easier.
138138
</p>
139139
140-
<h2>Image support:</h2>
141-
142-
<table class="second-table">
143-
<tr><td>Network png</td><td><img width="200" alt='xkcd' src='https://imgs.xkcd.com/comics/commemorative_plaque.png' /></td></tr>
144-
<tr><td>Local asset png</td><td><img src='asset:assets/html5.png' width='100' /></td></tr>
145-
<tr><td>Local asset svg</td><td><img src='asset:assets/mac.svg' width='100' /></td></tr>
146-
<tr><td>Data uri (with base64 support)</td>
147-
<td><img alt='Red dot (png)' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==' />
148-
<img alt='Green dot (base64 svg)' src='data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMzAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjE1IiBjeT0iMTAiIHI9IjEwIiBmaWxsPSJncmVlbiIvPgo8L3N2Zz4=' />
149-
<img alt='Green dot (plain svg)' src='data:image/svg+xml,%3C?xml version="1.0" encoding="UTF-8"?%3E%3Csvg viewBox="0 0 30 20" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="15" cy="10" r="10" fill="yellow"/%3E%3C/svg%3E' />
150-
</td></tr>
151-
<tr><td>Custom image render</td><td><img src='https://flutter.dev/images/flutter-mono-81x100.png' /></td></tr>
152-
<tr><td>Broken network image</td><td><img alt='Broken network image alt text' src='https://www.example.com/image.png' /></td></tr>
153-
</table>
140+
<!-- <h2>Image support:</h2>-->
141+
<!-- -->
142+
<!-- <table class="second-table">-->
143+
<!-- <tr><td>Network png</td><td><img width="200" alt='xkcd' src='https://imgs.xkcd.com/comics/commemorative_plaque.png' /></td></tr>-->
144+
<!-- <tr><td>Local asset png</td><td><img src='asset:assets/html5.png' width='100' /></td></tr>-->
145+
<!-- <tr><td>Local asset svg</td><td><img src='asset:assets/mac.svg' width='100' /></td></tr>-->
146+
<!-- <tr><td>Data uri (with base64 support)</td>-->
147+
<!-- <td><img alt='Red dot (png)' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==' />-->
148+
<!-- <img alt='Green dot (base64 svg)' src='data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMzAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjE1IiBjeT0iMTAiIHI9IjEwIiBmaWxsPSJncmVlbiIvPgo8L3N2Zz4=' />-->
149+
<!-- <img alt='Green dot (plain svg)' src='data:image/svg+xml,%3C?xml version="1.0" encoding="UTF-8"?%3E%3Csvg viewBox="0 0 30 20" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="15" cy="10" r="10" fill="yellow"/%3E%3C/svg%3E' />-->
150+
<!-- </td></tr>-->
151+
<!-- <tr><td>Custom image render</td><td><img src='https://flutter.dev/images/flutter-mono-81x100.png' /></td></tr>-->
152+
<!-- <tr><td>Broken network image</td><td><img alt='Broken network image alt text' src='https://www.example.com/image.png' /></td></tr>-->
153+
<!-- </table>-->
154154
155155
<h2 id='middle'>SVG support:</h2>
156156
<svg id='svg1' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'>

example/macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
import FlutterMacOS
66
import Foundation
77

8-
import wakelock_macos
8+
import package_info_plus
9+
import video_player_avfoundation
10+
import wakelock_plus
911

1012
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
11-
WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin"))
13+
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
14+
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
15+
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
1216
}

lib/flutter_html.dart

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
library flutter_html;
1+
library;
22

33
import 'package:flutter/material.dart';
44
import 'package:flutter_html/src/html_parser.dart';
@@ -48,7 +48,7 @@ class Html extends StatefulWidget {
4848
/// **style** Pass in the style information for the Html here.
4949
/// See [its wiki page](https://github.com/Sub6Resources/flutter_html/wiki/Style) for more info.
5050
Html({
51-
Key? key,
51+
super.key,
5252
GlobalKey? anchorKey,
5353
required this.data,
5454
this.onLinkTap,
@@ -61,13 +61,12 @@ class Html extends StatefulWidget {
6161
this.style = const {},
6262
}) : documentElement = null,
6363
assert(data != null),
64-
_anchorKey = anchorKey ?? GlobalKey(),
65-
super(key: key);
64+
_anchorKey = anchorKey ?? GlobalKey();
6665

6766
Html.fromDom({
68-
Key? key,
67+
super.key,
6968
GlobalKey? anchorKey,
70-
@required dom.Document? document,
69+
required dom.Document? document,
7170
this.onLinkTap,
7271
this.onAnchorTap,
7372
this.extensions = const [],
@@ -79,13 +78,12 @@ class Html extends StatefulWidget {
7978
}) : data = null,
8079
assert(document != null),
8180
documentElement = document!.documentElement,
82-
_anchorKey = anchorKey ?? GlobalKey(),
83-
super(key: key);
81+
_anchorKey = anchorKey ?? GlobalKey();
8482

8583
Html.fromElement({
86-
Key? key,
84+
super.key,
8785
GlobalKey? anchorKey,
88-
@required this.documentElement,
86+
required this.documentElement,
8987
this.onLinkTap,
9088
this.onAnchorTap,
9189
this.extensions = const [],
@@ -96,8 +94,7 @@ class Html extends StatefulWidget {
9694
this.style = const {},
9795
}) : data = null,
9896
assert(documentElement != null),
99-
_anchorKey = anchorKey ?? GlobalKey(),
100-
super(key: key);
97+
_anchorKey = anchorKey ?? GlobalKey();
10198

10299
/// A unique key for this Html widget to ensure uniqueness of anchors
103100
final GlobalKey _anchorKey;
@@ -127,7 +124,7 @@ class Html extends StatefulWidget {
127124

128125
/// A set of the only HTML tags that should be rendered by this widget.
129126
///
130-
/// Note that the html parser wraps your html in an <html> and <body> tag
127+
/// Note that the html parser wraps your html in an `<html>` and `<body>` tag
131128
/// by default, so you should include those in this set if you want any
132129
/// of your html to render.
133130
final Set<String>? onlyRenderTheseTags;

lib/src/css_box_widget.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CssBoxWidget extends StatelessWidget {
8181
child: top
8282
? child
8383
: MediaQuery(
84-
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
84+
data: MediaQuery.of(context).copyWith(textScaler: TextScaler.linear(1.0)),
8585
child: child,
8686
),
8787
),
@@ -176,8 +176,7 @@ class CssBoxWidget extends StatelessWidget {
176176
}
177177

178178
class _CSSBoxRenderer extends MultiChildRenderObjectWidget {
179-
_CSSBoxRenderer({
180-
Key? key,
179+
const _CSSBoxRenderer({
181180
required super.children,
182181
required this.display,
183182
required this.margins,
@@ -189,7 +188,7 @@ class _CSSBoxRenderer extends MultiChildRenderObjectWidget {
189188
required this.childIsReplaced,
190189
required this.emValue,
191190
required this.shrinkWrap,
192-
}) : super(key: key);
191+
});
193192

194193
/// The Display type of the element
195194
final Display display;
@@ -797,7 +796,7 @@ extension Normalize on Dimension {
797796

798797
double _calculateEmValue(Style style, BuildContext buildContext) {
799798
return (style.fontSize?.emValue ?? 16) *
800-
MediaQuery.textScaleFactorOf(buildContext) *
799+
(MediaQuery.maybeTextScalerOf(buildContext)?.scale(style.fontSize?.emValue ?? 16) ?? 1.0) *
801800
MediaQuery.of(buildContext).devicePixelRatio;
802801
}
803802

lib/src/css_parser.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import 'dart:ui';
2-
31
import 'package:collection/collection.dart';
42
import 'package:csslib/visitor.dart' as css;
53
import 'package:csslib/parser.dart' as cssparser;

lib/src/style.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import 'dart:ui';
2-
31
import 'package:flutter/material.dart';
42
import 'package:flutter_html/flutter_html.dart';
53
import 'package:flutter_html/src/css_parser.dart';

0 commit comments

Comments
 (0)
0