Skip to content

Commit 9ea6533

Browse files
committed
Add compatibility with Flutter 3.10
1 parent 308f434 commit 9ea6533

17 files changed

+299
-8
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ publish-printing: format clean
137137
find printing -name pubspec.yaml -exec sed -i -e 's/^_dependency_overrides:/dependency_overrides:/g' '{}' ';'
138138
git tag $(shell grep version printing/pubspec.yaml | sed 's/version\s*:\s*/printing-/g')
139139

140+
publish-wrapper: format clean
141+
test -z "$(shell git status --porcelain)"
142+
find widget_wrapper -name pubspec.yaml -exec sed -i -e 's/^dependency_overrides:/_dependency_overrides:/g' '{}' ';'
143+
cd widget_wrapper; $(DART_BIN) pub publish -f
144+
find widget_wrapper -name pubspec.yaml -exec sed -i -e 's/^_dependency_overrides:/dependency_overrides:/g' '{}' ';'
145+
git tag $(shell grep version widget_wrapper/pubspec.yaml | sed 's/version\s*:\s*/wrapper-/g')
146+
140147
.pana:
141148
which pana || $(DART_BIN) pub global activate pana
142149
touch $@

demo/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ publish_to: "none"
44
version: 1.0.0+1
55

66
environment:
7-
sdk: ">=2.12.0 <3.0.0"
7+
sdk: ">=2.12.0 <4.0.0"
88
flutter: ">=1.16.0"
99

1010
dependencies:

pdf/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ screenshots:
99
version: 3.10.2
1010

1111
environment:
12-
sdk: ">=2.18.0 <3.0.0"
12+
sdk: ">=2.18.0 <4.0.0"
1313

1414
dependencies:
1515
archive: ^3.1.0

printing/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Fix raster crash on iOS and MacOS [Eduardo Vital Alencar Cunha]
88
- Fix wrong format in directPrintPdf [<AlhasanAlQaisi>]
99
- Add compatibility with Android Gradle Plugin 8.0 [asaarnak]
10+
- Add compatibility with Flutter 3.10
1011

1112
## 5.10.3
1213

printing/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Pdf Printing Example
44
version: 1.0.0+1
55

66
environment:
7-
sdk: ">=2.12.0 <3.0.0"
7+
sdk: ">=2.12.0 <4.0.0"
88

99
dependencies:
1010
flutter:

printing/lib/printing.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import 'package:pdf/widgets.dart';
1818

1919
import 'src/fonts/gfonts.dart';
2020

21+
export 'package:pdf_widget_wrapper/pdf_widget_wrapper.dart';
22+
2123
export 'src/asset_utils.dart';
2224
export 'src/cache.dart';
2325
export 'src/callback.dart';
@@ -28,7 +30,6 @@ export 'src/printer.dart';
2830
export 'src/printing.dart';
2931
export 'src/printing_info.dart';
3032
export 'src/raster.dart';
31-
export 'src/widget_wrapper.dart';
3233

3334
Future<void> pdfDefaultTheme() async {
3435
if (ThemeData.buildThemeData != null) {

printing/lib/src/raster.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class PdfRasterImage extends ImageProvider<PdfRaster> {
7070
return OneFrameImageStreamCompleter(_loadAsync());
7171
}
7272

73-
// Flutter 3.9
73+
// Flutter 3.10
7474
// @override
7575
// ImageStreamCompleter loadImage(PdfRaster key, ImageDecoderCallback decode) {
7676
// return OneFrameImageStreamCompleter(_loadAsync());

printing/pubspec.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ screenshots:
1212
version: 5.10.4
1313

1414
environment:
15-
sdk: ">=2.18.0 <3.0.0"
15+
sdk: ">=2.18.0 <4.0.0"
1616
flutter: ">=3.7.0"
1717

1818
dependencies:
@@ -26,6 +26,7 @@ dependencies:
2626
js: ^0.6.3
2727
meta: ">=1.3.0 <2.0.0"
2828
pdf: ^3.10.0
29+
pdf_widget_wrapper: '>=1.0.0 <2.0.0'
2930
plugin_platform_interface: ^2.1.0
3031

3132
dev_dependencies:
@@ -37,6 +38,8 @@ dev_dependencies:
3738
dependency_overrides:
3839
pdf:
3940
path: ../pdf
41+
# pdf_widget_wrapper:
42+
# path: ../widget_wrapper
4043

4144
flutter:
4245
plugin:

test/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ issue_tracker: https://github.com/DavBfr/dart_pdf/issues
66
version: 1.0.0
77

88
environment:
9-
sdk: ">=2.18.0 <3.0.0"
9+
sdk: ">=2.18.0 <4.0.0"
1010
flutter: ">=3.7.0"
1111

1212
dependencies:

widget_wrapper/.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26+
/pubspec.lock
27+
**/doc/api/
28+
.dart_tool/
29+
.packages
30+
build/

0 commit comments

Comments
 (0)