Skip to content

Commit 8b739ae

Browse files
Prepare null-safety migration release
1 parent b0889e2 commit 8b739ae

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.0
2+
3+
* Dart's sound null safety is now supported.
4+
15
## 0.4.0
26

37
* The PDFBoxResourceLoader is now used on Android to load PDF documents much faster than before. The fast initialization (i.e. *fastInit*) option has therefore been removed.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Add this to your package's `pubspec.yaml` file:
1818

1919
```yaml
2020
dependencies:
21-
pdf_text: ^0.4.0
21+
pdf_text: ^0.5.0
2222
```
2323
2424
## Usage
@@ -125,6 +125,7 @@ allows you not to waste time loading text that you will probably not use. When y
125125
class PDFDoc {
126126
int length; // Number of pages of the document
127127
List<PDFPage> pages; // Pages of the document
128+
PDFDocInfo info; // Info of the document
128129
Future<String> text; // Text of the document
129130
}
130131

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ packages:
232232
path: ".."
233233
relative: true
234234
source: path
235-
version: "0.4.0"
235+
version: "0.5.0"
236236
pedantic:
237237
dependency: transitive
238238
description:

example/test/utils/text_matcher.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ import 'package:flutter_test/flutter_test.dart';
22

33
import 'pdf_test_utils.dart';
44

5-
Matcher textMatches(List<String > lines) => _TextMatcher(lines);
5+
Matcher textMatches(List<String> lines) => _TextMatcher(lines);
66

77
class _TextMatcher extends Matcher {
8-
final List<String > expected;
8+
final List<String> expected;
99

1010
_TextMatcher(this.expected);
1111

1212
@override
13-
Description describe(Description description) => description.add(_expected);
13+
Description describe(Description description) => description.add(_expected);
1414

15-
String get _expected => expected.join(isIos ? " " : "\n").trim();
15+
String get _expected => expected.join(isIos ? " " : "\n").trim();
1616

1717
@override
18-
bool matches(item, Map matchState) {
18+
bool matches(item, Map matchState) {
1919
String? actual = item as String?;
2020

2121
/// For iOS (where the PDFKit is used) positioning of new lines in the text seem not to be
@@ -25,4 +25,4 @@ class _TextMatcher extends Matcher {
2525
? actual!.replaceAll(RegExp("\n"), " ").trim() == _expected
2626
: actual!.trim() == _expected;
2727
}
28-
}
28+
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pdf_text
22
description: This plugin for Flutter allows you to read the text content of PDF documents and convert it into strings. It works on iOS and Android.
3-
version: 0.4.0
3+
version: 0.5.0
44
homepage: https://github.com/AlessioLuciani/flutter-pdf-text/tree/master
55

66
environment:

test/pdf_text_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'package:flutter/services.dart';
22
import 'package:flutter_test/flutter_test.dart';
3-
import 'package:pdf_text/pdf_text.dart';
43

54
void main() {
65
const MethodChannel channel = MethodChannel('pdf_text');

0 commit comments

Comments
 (0)