components/u_ar library

Classes

U3DViewer
Interactive 3D model viewer (rotate, zoom, pan, hotspots, animation) with a "View in AR" button; works on every platform. U3DViewer(source: UArSource.url(glbUrl))
U3DViewerState
State of U3DViewer; use it to open AR from code.
UArCodeView
Floats your own card over every QR code the camera sees. UArCodeView(cardBuilder: (c, code, p) => Text(code))
UArCodeViewState
State of UArCodeView.
UArFaceTryOn
Front-camera face try-on with an item picker (iOS TrueDepth, Android ARCore faces). UArFaceTryOn(items: glasses)
UArFaceTryOnState
State of UArFaceTryOn.
UArForeground
Forces color on text and icons below, including UText* widgets, which read their colour from the theme's text styles rather than DefaultTextStyle.
UArGate
Handles availability, installation and permissions before an AR view runs, and shows a friendly screen for each failure.
UArGeoView
Camera view with floating labels over nearby places (distance, compass). Needs permission add camera location. UArGeoView(places: places)
UArGeoViewState
State of UArGeoView.
UArHotspot
A point of interest on a model, placed in fractions of its bounding box: (0, 0.5, 0) is the top centre, (-0.5, 0, 0.5) the middle of the front-left edge.
UArImageTarget
An image to recognise (poster, package) and what to show on it.
UArImageTrigger
Shows content when the camera sees one of the target images. UArImageTrigger(targets: targets)
UArImageTriggerState
State of UArImageTrigger.
UArLabels
Optional label overrides; anything left null falls back to l10n.
UArMeasure
Tape measure: tap points to measure lengths and areas (Android ARCore, iOS ARKit). UArMeasure(unit: UArMeasureUnit.metric)
UArMeasureState
State of UArMeasure; add/undo/clear points from code.
UArNativeFallback
Shown by UArExperiences.place when live AR is unavailable: opens the OS 3D/AR viewer instead.
UArOverlay
A Flutter widget pinned to a node, an anchor or a world point.
UArOverlayLayer
Lays overlays over an AR / 3D view and keeps them glued to the world.
UArPage
Full-screen host for any AR widget.
UArPill
A rounded, translucent pill used for hints and chips.
UArPlace
A real-world place for UArGeoView: coordinates, title, optional 3D model.
UArPlaceable
Something the user can put into the world.
UArPlacedItem
An item the user placed: its node, anchor, hit point and size.
UArRoundButton
Round translucent AR toolbar button.
UArScene
Full interactive AR: find surfaces, place items, move / rotate / scale them, take photos and videos. Everything is configurable and every piece of chrome can be replaced through the builders.
UArSceneOptions
Behaviour of UArScene: placement by tap or reticle, gestures, toolbar, picker, snapshot, recording.
UArSceneState
State of UArScene; reach it with a GlobalKey to place/remove/snapshot from code.
UArStyle
Colours and shapes of the built-in chrome. Null values follow the app theme.
UArTryOnItem
A face accessory (glasses, hat, mask) for UArFaceTryOn.
UArWebStartButton
On the web the immersive session must start from a tap; this shows the button.

Enums

UArMeasureUnit
Units of UArMeasure: metric (cm/m) or imperial (in/ft).
UArPlacementMode
HOST PROJECT SETUP
UArSurface
Which surfaces an item may be placed on: any, horizontal, vertical, floor, wall, table, ceiling.

Mixins

UArLifecycle<T extends StatefulWidget>
Pauses the session with the app and resumes it after.

Functions

uArFormatDistance(double metres, {UArMeasureUnit unit = UArMeasureUnit.metric}) → String
Metres → "85 m" / "1.2 km" (or feet/miles). uArFormatDistance(1250)
uArTrackingHint(UArValue value, UArLabels labels, {bool needsSurface = true}) → String?
Human wording for the current tracking state, or null when all is well.