Skip to content

Commit ef947df

Browse files
author
PSPDFKit
committed
Release 2.0.1
1 parent 965a2fb commit ef947df

15 files changed

+282
-277
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [2.0.1] - 24 Feb 2021
2+
3+
- Updates package description for pub.dev. (#28225)
4+
- Adds pedantic static analysis check and addresses the analysis warnings. (#28225)
5+
16
## [2.0.0] - 17 Feb 2021
27

38
- First pub.dev published version.

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![](https://pspdfkit.com/images/blog/2018/starting-with-flutter/article-header-bb5f1c40.png)
44

5-
PSPDFKit wrapper for Flutter.
5+
PSPDFKit wrapper for Flutter. [Available here in pub.dev](https://pub.dev/packages/pspdfkit_flutter).
66

77
If you are new to Flutter, make sure to check our blog:
88

@@ -26,7 +26,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
2626
Let's create a simple app that integrates PSPDFKit and uses the Flutter pspdfkit plugin.
2727

2828
1. Run `flutter create --org com.example.myapp myapp`.
29-
2. Open `myapp/pubspec.yaml` and under `dependencies` add
29+
2. Open `myapp/pubspec.yaml` and under `dependencies` add
3030
```yaml
3131
pspdfkit_flutter:
3232
git:
@@ -43,22 +43,22 @@ flutter.sdk=/path/to/your/flutter/sdk
4343
flutter.buildMode=debug
4444
```
4545

46-
5. Open `myapp/android/app/build.gradle` and modify `minSdkVersion` from `16` to `21`, enable multiDex, and add compile options to enable desugaring
47-
46+
5. Open `myapp/android/app/build.gradle` and modify `minSdkVersion` from `16` to `21`, enable multiDex, and add compile options to enable desugaring
47+
4848
```groovy
4949
compileOptions {
5050
sourceCompatibility 1.8
5151
targetCompatibility 1.8
5252
}
5353
```
54-
54+
5555
**Three changes** to edit:
5656

5757
```diff
5858
...
5959
android {
6060
compileSdkVersion 29
61-
61+
6262
+ compileOptions {
6363
+ sourceCompatibility 1.8
6464
+ targetCompatibility 1.8
@@ -235,12 +235,12 @@ adb push /path/to/your/document.pdf /sdcard/document.pdf
235235

236236
```yaml
237237
assets:
238-
- PDFs/
238+
- PDFs/
239239
```
240240
<strong>Spaces are important</strong>, so don't forget them.
241241

242242
5. Open the `Runner.xcworkspace` from the `ios` folder in Xcode: `open ios/Runner.xcworkspace`
243-
6. Make sure the `iOS Deployment Target` is set to 12.0 or higher.
243+
6. Make sure the `iOS Deployment Target` is set to 12.0 or higher.
244244

245245
![iOS Deployment Target](screenshots/ios-deployment-target.png)
246246

@@ -269,7 +269,7 @@ target 'Runner' do
269269
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
270270
+ pod 'PSPDFKit', podspec:'https://customers.pspdfkit.com/pspdfkit-ios/latest.podspec'
271271
end
272-
```
272+
```
273273

274274
12. Open `lib/main.dart` and replace the whole content with a simple example that will load a PDF document from local device filesystem:
275275

@@ -385,7 +385,7 @@ To see PSPDFKit Flutter in action check out our [Flutter example app](example/).
385385

386386
Showing a PDF document inside your Flutter app is as simple as this:
387387

388-
```MyApp.dart
388+
```MyApp.dart
389389
showDocument() async {
390390
try {
391391
Pspdfkit.present("file:///document.pdf");
@@ -404,26 +404,26 @@ Q: I updated the Flutter plugin and I am getting the following error:
404404

405405
```bash
406406
lib/main.dart:8:8: Error: Error when reading '../../.pub-cache/git/pspdfkit-flutter-b6241555b1ee3e816a0dce65145991c1a4477d94/lib/pspdfkit.dart': No such file or directory
407-
import 'package:pspdfkit_flutter/pspdfkit.dart';
408-
^
407+
import 'package:pspdfkit_flutter/pspdfkit.dart';
408+
^
409409
lib/main.dart:37:7: Error: The getter 'Pspdfkit' isn't defined for the class '_MyAppState'.
410-
- '_MyAppState' is from 'package:myapp/main.dart' ('lib/main.dart').
410+
- '_MyAppState' is from 'package:myapp/main.dart' ('lib/main.dart').
411411
Try correcting the name to the name of an existing getter, or defining a getter or field named 'Pspdfkit'.
412-
Pspdfkit.present(tempDocumentPath);
413-
^^^^^^^^
412+
Pspdfkit.present(tempDocumentPath);
413+
^^^^^^^^
414414
lib/main.dart:58:32: Error: The getter 'Pspdfkit' isn't defined for the class '_MyAppState'.
415-
- '_MyAppState' is from 'package:myapp/main.dart' ('lib/main.dart').
415+
- '_MyAppState' is from 'package:myapp/main.dart' ('lib/main.dart').
416416
Try correcting the name to the name of an existing getter, or defining a getter or field named 'Pspdfkit'.
417-
frameworkVersion = await Pspdfkit.frameworkVersion;
418-
^^^^^^^^
417+
frameworkVersion = await Pspdfkit.frameworkVersion;
418+
^^^^^^^^
419419
lib/main.dart:73:5: Error: The getter 'Pspdfkit' isn't defined for the class '_MyAppState'.
420-
- '_MyAppState' is from 'package:myapp/main.dart' ('lib/main.dart').
420+
- '_MyAppState' is from 'package:myapp/main.dart' ('lib/main.dart').
421421
Try correcting the name to the name of an existing getter, or defining a getter or field named 'Pspdfkit'.
422-
Pspdfkit.setLicenseKey("YOUR_LICENSE_KEY_GOES_HERE");
423-
^^^^^^^^
424-
425-
426-
FAILURE: Build failed with an exception.
422+
Pspdfkit.setLicenseKey("YOUR_LICENSE_KEY_GOES_HERE");
423+
^^^^^^^^
424+
425+
426+
FAILURE: Build failed with an exception.
427427
````
428428
A: If you were using version [1.10.3](https://github.com/PSPDFKit/pspdfkit-flutter/releases/tag/1.10.3) or earlier, you will need to update the imports in your Dart files like so:
429429

analysis_options.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
# UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
66
# This notice may not be removed from this file.
77

8+
include: package:pedantic/analysis_options.yaml
9+
810
analyzer:
911
errors:
10-
invalid_assignment: warning
12+
invalid_assignment: error
1113
missing_return: error
1214
dead_code: warning
1315

1416
strong-mode:
1517
implicit-casts: false
1618
implicit-dynamic: false
17-

0 commit comments

Comments
 (0)