Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example project #50

Merged
merged 3 commits into from
Jan 14, 2020
Merged

Fix example project #50

merged 3 commits into from
Jan 14, 2020

Conversation

radazzouz
Copy link
Contributor

@radazzouz radazzouz commented Jan 10, 2020

Details

With the new version of Flutter our sample project needed updating. This PR fixes the following:

  • Updates .gitignore to ignore generated files that don't need to be checked in.
  • Updates the Podfile.
  • Renames the image asset from PSPDFKit Image Example.jpg to PSPDFKit_Image_Example.jpg. Having spaces in the asset caused the Image Document example to throw the following exception on both iOS and Android:
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: PDFs/PSPDFKit Image Example.jpg
#0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1      _MyAppState.extractAsset (package:pspdfkit_example/main.dart:53:65)
#2      _MyAppState.showImage (package:pspdfkit_example/main.dart:75:41)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
#5      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
#6      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
#7      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#8      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
#9      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
#10     GestureBinding<…>
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: PDFs/PSPDFKit Image Example.jpg
#0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1      _MyAppState.extractAsset (package:pspdfkit_example/main.dart:53:65)
#2      _MyAppState.showImage (package:pspdfkit_example/main.dart:75:41)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
#5      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
#6      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
#7      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#8      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
#9      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
#10     GestureBinding<…>

Acceptance Criteria

  • Before merging retest all the examples to make sure that they work on both Android and iOS.

Rad Azzouz added 3 commits January 10, 2020 09:13
Having spaces in the assert name caused the following exception on both iOS and Android:

```
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: PDFs/PSPDFKit Image Example.jpg
#0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1      _MyAppState.extractAsset (package:pspdfkit_example/main.dart:53:65)
#2      _MyAppState.showImage (package:pspdfkit_example/main.dart:75:41)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
#5      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
#6      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
#7      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#8      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
#9      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
#10     GestureBinding<…>
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: PDFs/PSPDFKit Image Example.jpg
#0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1      _MyAppState.extractAsset (package:pspdfkit_example/main.dart:53:65)
#2      _MyAppState.showImage (package:pspdfkit_example/main.dart:75:41)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
#5      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
#6      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
#7      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#8      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
#9      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
#10     GestureBinding<…>
```
@radazzouz radazzouz added bug Something isn't working Android iOS labels Jan 10, 2020
@radazzouz radazzouz requested review from aksh1t and simoarpe January 10, 2020 14:43
@radazzouz radazzouz self-assigned this Jan 10, 2020
Copy link
Contributor

@simoarpe simoarpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@radazzouz radazzouz merged commit a4f8da8 into master Jan 14, 2020
@radazzouz radazzouz deleted the rad/sample-project-fixes branch January 14, 2020 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android bug Something isn't working iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants