You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-11Lines changed: 30 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,13 +45,32 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
45
45
cd pspdfkit_demo
46
46
```
47
47
48
-
3. Open the app’s Gradle build file, `android/app/build.gradle`:
48
+
3. Open the project’s Gradle build file, `android/build.gradle`:
49
+
50
+
```bash
51
+
open android/build.gradle
52
+
```
53
+
54
+
4. Modify the Kotlin version inside the `buildscript` section:
55
+
56
+
```diff
57
+
buildscript {
58
+
- ext.kotlin_version = '1.3.50'
59
+
+ ext.kotlin_version = '1.5.31'
60
+
repositories {
61
+
google()
62
+
mavenCentral()
63
+
}
64
+
...
65
+
```
66
+
67
+
5. Open the app’s Gradle build file, `android/app/build.gradle`:
49
68
50
69
```bash
51
70
open android/app/build.gradle
52
71
```
53
72
54
-
4. Modify the minimum SDK version, and enable`multidex`. All this is done inside the `android` section:
73
+
6. Modify the minimum SDK version, and enable`multidex`. All this is done inside the `android` section:
55
74
56
75
```diff
57
76
android {
@@ -64,13 +83,13 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
64
83
}
65
84
```
66
85
67
-
5. Open `pubspec.yaml`:
86
+
7. Open `pubspec.yaml`:
68
87
69
88
```bash
70
89
open pubspec.yaml
71
90
```
72
91
73
-
6. Add the PSPDFKit dependency in`pubspec.yaml`:
92
+
8. Add the PSPDFKit dependency in`pubspec.yaml`:
74
93
75
94
```diff
76
95
dependencies:
@@ -79,21 +98,21 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
79
98
+ pspdfkit_flutter: any
80
99
```
81
100
82
-
7. From the terminal app, run the following command to get all the packages:
101
+
9. From the terminal app, run the following command to get all the packages:
83
102
84
103
```bash
85
104
flutter pub get
86
105
```
87
106
88
-
8. Then run the command below to upgrade the dependencies:
107
+
10. Then run the command below to upgrade the dependencies:
89
108
90
109
```bash
91
110
flutter pub upgrade
92
111
```
93
112
94
-
9. Open `lib/main.dart` and replace the entire content with the contents of [demo_project_main.dart.txt](doc/demo_project_main.dart.txt). This simple example will load a PDF document from local device filesystem.
113
+
11. Open `lib/main.dart` and replace the entire content with the contents of [demo_project_main.dart.txt](doc/demo_project_main.dart.txt). This simple example will load a PDF document from local device filesystem.
95
114
96
-
10. Add the PDF document you want to display in your project’s `assets` directory.
115
+
12. Add the PDF document you want to display in your project’s `assets` directory.
97
116
- First create a `PDFs` directory:
98
117
99
118
```bash
@@ -106,7 +125,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
106
125
cp ~/Downloads/PSPDFKit.pdf PDFs/Document.pdf
107
126
```
108
127
109
-
11. Specify the `assets` directory in`pubspec.yaml`:
128
+
13. Specify the `assets` directory in`pubspec.yaml`:
110
129
111
130
```diff
112
131
# The following section is specific to Flutter.
@@ -116,9 +135,9 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
116
135
...
117
136
```
118
137
119
-
12. [Start your Android emulator][start-the-emulator], or connect a device.
138
+
14. [Start your Android emulator][start-the-emulator], or connect a device.
0 commit comments