ar_quick_look 0.2.1 copy "ar_quick_look: ^0.2.1" to clipboard
ar_quick_look: ^0.2.1 copied to clipboard

PlatformiOS

Show a USDZ or Reality file in Apple's AR Quick Look, placed in the room through the camera. iOS, with the system viewer rather than a rebuilt one.

0.2.1 #

No code changes. This release exists because the package was almost impossible to install.

sdk: ^3.13.0 meant Dart 3.13, which only ships with Flutter 3.47 — released three weeks ago. Anyone on an older SDK hit a version-solve failure before they could try it. The floor is now ^3.5.0 / Flutter 3.24, and it is tested: the library resolves and type-checks against Flutter 3.16.9 / Dart 3.2.6, so the declared range is narrower than the verified one.

0.2.0 #

An audit of every package in this repo found three defects here, one of which served the wrong model.

Added #

  • AlreadyPresentingException, and refresh on materializeAsset.

Fixed #

  • Two assets with the same filename served each other's bytes. The cached copy was keyed on the basename, so assets/chairs/model.usdz and assets/tables/model.usdz wrote to one path — and since the cache check was only "exists and non-empty", whichever landed first was shown for both. The copy is namespaced by the whole asset key now, and still ends in .usdz so Quick Look sniffs it correctly.
  • A second present() blanked the first viewer and stranded its future. The new session replaced the old one, which deallocated it — and the controller holds its data source weakly, so the open viewer went empty while the first await never returned. There is one screen, so a second present is now refused with AlreadyPresentingException.
  • Only the first file's format was checked. presentAll existence-checks every path and the controller opens on initialIndex, so a bad model anywhere but position zero sailed past the precheck and failed inside Quick Look instead. Every item is checked, and the message names the offender.
  • A missing asset key threw a raw FlutterError, escaping the sealed exception hierarchy — the commonest setup mistake this package has was not catchable as one of its own. It is a FileNotFoundException naming the pubspec now.
  • An interrupted copy is no longer cached: the write goes to a .part file and is renamed into place.

0.1.0 #

Initial release: Apple's AR Quick Look for Flutter.

  • ArQuickLook.present shows a USDZ or Reality file in the system viewer, and completes when the user closes it rather than when it opens.
  • canPreview asks Quick Look whether it will actually read a file, so a wrong-format file with the right extension is refused before a viewer is put on screen.
  • presentAsset copies a bundled asset out to a real file first, because Quick Look needs a path and a Flutter asset is not one. The copy is cached; materializeAsset is public for anything else that needs a path.
  • allowsContentScaling: false for models whose size is the point, and canonicalWebPage for where Quick Look's Share button should lead.
  • presentAll for several models the user can page between.
  • Errors are a sealed hierarchy, never a bare PlatformException.

Pairs with roomplan: the USDZ it exports goes straight into present.

Verified on a Simulator — registration, support, and every error path, including a text file renamed .usdz being refused. The AR camera experience itself needs a real device.

0
likes
160
points
186
downloads

Documentation

Documentation
API reference

Publisher

verified publisherjumyn.com

Weekly Downloads

Show a USDZ or Reality file in Apple's AR Quick Look, placed in the room through the camera. iOS, with the system viewer rather than a rebuilt one.

Repository (GitHub)
View/report issues

Topics

#ar #usdz #quicklook #augmented-reality #ios

License

MIT (license)

Dependencies

flutter

More

Packages that depend on ar_quick_look

Packages that implement ar_quick_look