Skip to main content
RapidDev - Software Development Agency
flutterflow-tutorials

How to Create a Virtual Art Gallery with AR Features in FlutterFlow

Create an art gallery app with an AR preview feature that lets users place artwork on their walls at real-world scale. Use ar_flutter_plugin as a Custom Widget for plane detection and image anchoring, store artwork dimensions in Firestore for accurate sizing, and add a screenshot feature to capture the AR view for sharing before purchasing.

What you'll learn

  • How to integrate ar_flutter_plugin into a FlutterFlow Custom Widget for AR plane detection
  • How to anchor artwork images to detected wall surfaces at real-world scale
  • How to use Firestore artwork dimensions for accurate physical sizing in AR
  • How to build a gallery browsing UI with category filtering and artist profiles
  • How to capture and share AR screenshots for social sharing
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner8 min read35-45 minFlutterFlow Free+ (AR features require ARCore-compatible Android or ARKit-compatible iOS devices)March 2026RapidDev Engineering Team
TL;DR

Create an art gallery app with an AR preview feature that lets users place artwork on their walls at real-world scale. Use ar_flutter_plugin as a Custom Widget for plane detection and image anchoring, store artwork dimensions in Firestore for accurate sizing, and add a screenshot feature to capture the AR view for sharing before purchasing.

Building an AR Art Preview Experience in FlutterFlow

Art buyers want to see how a piece looks on their wall before purchasing. This tutorial builds a gallery app where users browse artwork, tap View in Your Space, and see the piece rendered at real-world scale on their actual wall through the device camera. The AR feature uses plane detection to find flat surfaces and anchors the artwork image at the correct physical dimensions.

Prerequisites

  • A FlutterFlow project with Firestore and Firebase Authentication configured
  • Firebase Storage set up for artwork image hosting
  • An ARCore-compatible Android device or ARKit-compatible iOS device for testing
  • Basic understanding of FlutterFlow Custom Widgets

Step-by-step guide

1

Set up the Firestore data model with physical artwork dimensions

Create an artworks collection with fields: title (String), artistId (Reference to users), description (String), imageUrl (String, high-resolution image in Firebase Storage), thumbnailUrl (String, compressed for gallery grid), widthCm (Double, physical width in centimeters), heightCm (Double, physical height in centimeters), price (Double), category (String: Painting/Photography/Digital/Sculpture), medium (String, e.g., Oil on Canvas), year (Int), isForSale (Boolean). Create an artists collection with: userId (Reference), displayName (String), bio (String), avatarUrl (String), artworkCount (Int). The widthCm and heightCm fields are critical — the AR widget uses them to render the artwork at its actual physical size on the wall.

Expected result: Each artwork document contains physical dimensions that the AR system uses for accurate real-world scaling.

2

Build the gallery browsing pages with category filters

Create a GalleryPage with a top Row of category ChoiceChips (All, Painting, Photography, Digital, Sculpture). Below, display a GridView with crossAxisCount of 2 querying artworks where isForSale is true, filtered by selected category. Each grid cell shows: Image (thumbnailUrl, aspect ratio maintained), Text (title, bodyLarge), Text (artist name, bodySmall), Text (price formatted, bold). Tapping a card navigates to ArtworkDetailPage which shows the full-resolution image in a zoomable InteractiveViewer, title, artist name with tap-to-profile, description, dimensions (widthCm x heightCm), medium, year, price, and two buttons: Add to Cart and View in Your Space.

Expected result: Users can browse the gallery, filter by category, and view detailed artwork information with the option to preview in AR.

3

Build the AR Custom Widget with plane detection and image anchoring

Create a Custom Widget named ARWallPreview with parameters: imageUrl (String), widthCm (Double), heightCm (Double), and an Action Parameter callback onScreenshotCaptured returning image bytes. Add ar_flutter_plugin as a dependency. In the widget, initialize an ARSessionManager and ARObjectManager. Enable plane detection for vertical surfaces (walls). Display instructional text: 'Point your camera at a wall and tap to place the artwork.' On user tap, use a hit test against detected planes. If a plane is hit, create an ARNode with a plane geometry sized to widthCm/100 by heightCm/100 (converting cm to meters for AR world units). Apply the artwork image as a texture on the plane. Allow the user to tap again to reposition. Add a pinch gesture for minor scale adjustment with a Slider showing the current scale percentage.

Expected result: The AR camera detects walls, and tapping places the artwork image on the wall at its real physical dimensions, with the option to reposition.

4

Add device compatibility checking before showing the AR button

Not all devices support ARCore or ARKit. On the ArtworkDetailPage, run a check on page load using a Custom Action that calls ARSession.checkPlatformCompatibility(). Store the result in a Page State boolean arSupported. Use Conditional Visibility on the View in Your Space button: show it only when arSupported is true. When arSupported is false, display a Text widget: 'AR preview requires an ARCore/ARKit compatible device' in grey. This prevents crashes on unsupported devices and provides a clear explanation to the user.

Expected result: The AR button only appears on supported devices, and unsupported devices see a helpful explanation instead of crashing.

5

Implement AR screenshot capture and social sharing

In the AR view, add a camera shutter IconButton in the bottom bar. On tap, call the ARSessionManager's snapshot method to capture the current camera frame with the AR overlay. The onScreenshotCaptured callback returns the image bytes to the parent page. Show a preview Dialog of the captured image with two buttons: Share (using share_plus Custom Action to open the OS share sheet with the image and a text overlay containing the artwork title and gallery name) and Save (write image to device gallery using image_gallery_saver). Add a subtle watermark with the gallery name in the bottom corner of the screenshot.

Expected result: Users can capture a photo of the artwork placed on their wall in AR and share it on social media or save it to their device.

Complete working example

FlutterFlow AR Art Gallery Setup
1FIRESTORE DATA MODEL:
2 artworks/{artworkId}
3 title: String
4 artistId: Reference (artists)
5 description: String
6 imageUrl: String (high-res for AR)
7 thumbnailUrl: String (compressed for grid)
8 widthCm: Double (e.g., 60.0)
9 heightCm: Double (e.g., 80.0)
10 price: Double
11 category: String (Painting | Photography | Digital | Sculpture)
12 medium: String (e.g., 'Oil on Canvas')
13 year: Int
14 isForSale: Boolean
15
16 artists/{artistId}
17 userId: Reference (users)
18 displayName: String
19 bio: String
20 avatarUrl: String
21 artworkCount: Int
22
23CUSTOM WIDGET: ARWallPreview
24 Dependencies: ar_flutter_plugin
25 Parameters: imageUrl (String), widthCm (Double), heightCm (Double)
26 Action Parameters: onScreenshotCaptured (Uint8List)
27 State: bool isPlaced, double scale = 1.0
28
29PAGE: GalleryPage
30 Column
31 ChoiceChips (All | Painting | Photography | Digital | Sculpture)
32 GridView (crossAxisCount: 2)
33 Backend Query: artworks where isForSale == true
34 Card
35 Image (thumbnailUrl)
36 Text (title)
37 Text (artist name)
38 Text (price)
39 On Tap Navigate ArtworkDetailPage
40
41PAGE: ArtworkDetailPage
42 SingleChildScrollView
43 InteractiveViewer (imageUrl, full resolution, pinch to zoom)
44 Padding Column
45 Text (title, headlineSmall)
46 Row: CircleImage (artist avatar) + Text (artist name) On Tap artist profile
47 Text (description, bodyMedium)
48 Row: Text (widthCm x heightCm cm) + Text (medium) + Text (year)
49 Text (price, titleLarge, bold)
50 Row
51 Button "Add to Cart" (expanded)
52 SizedBox(12)
53 Button "View in Your Space" (expanded, secondary)
54 Conditional Visibility: arSupported == true
55 On Tap Navigate ARPreviewPage
56 Text "AR not supported on this device" (grey)
57 Conditional Visibility: arSupported == false
58
59PAGE: ARPreviewPage
60 Stack
61 ARWallPreview (imageUrl, widthCm, heightCm)
62 Positioned (top: safe area)
63 Text "Tap a wall to place artwork" (white, shadow)
64 Positioned (bottom: 32)
65 Row
66 Slider (scale: 0.5-1.5)
67 IconButton (camera shutter capture screenshot)
68 IconButton (close pop page)

Common mistakes when creating a Virtual Art Gallery with AR Features in FlutterFlow

Why it's a problem: Not checking AR device support before showing the View in AR button

How to avoid: Check ARSession.checkPlatformCompatibility() on page load and conditionally show the AR button only on supported devices. Display a clear message on unsupported devices.

Why it's a problem: Using pixel dimensions instead of physical centimeters for AR sizing

How to avoid: Store widthCm and heightCm on each artwork document and convert to meters (divide by 100) when creating the AR node geometry.

Why it's a problem: Loading the full high-resolution image for the gallery grid thumbnails

How to avoid: Store a separate compressed thumbnailUrl (300px wide) for the gallery grid. Load the full-resolution imageUrl only on the detail page and in the AR widget.

Best practices

  • Store both a compressed thumbnail and full-resolution image for each artwork to optimize gallery performance
  • Convert centimeters to meters (divide by 100) for AR world units — AR SDKs use meters as the standard unit
  • Add instructional overlay text on the AR camera view to guide users who are new to AR experiences
  • Allow scale adjustment via a slider so users can see how different print sizes would look
  • Cache the AR compatibility check result in App State so it does not need to run on every page load
  • Add a loading indicator while the AR session initializes — plane detection takes a few seconds
  • Watermark AR screenshots with the gallery name for brand visibility when shared on social media

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to build an art gallery app in FlutterFlow with an AR feature that lets users preview artwork on their walls at real-world scale. Show me the Firestore data model with physical dimensions, the AR Custom Widget setup, and the gallery browsing UI.

FlutterFlow Prompt

Create a product detail page for an artwork. Show a large zoomable image at the top, then title, artist name, description, physical dimensions, and price. Add two buttons at the bottom: Add to Cart and View in Your Space.

Frequently asked questions

Does the AR feature work on all phones?

No. AR requires ARCore (most Android phones from 2018 onward) or ARKit (iPhone 6s and later). The app checks compatibility and hides the AR button on unsupported devices.

How accurate is the AR size rendering?

When physical dimensions are stored correctly, AR SDKs render objects within 2-5% of real-world size. The accuracy depends on the quality of the plane detection and the distance from the surface.

Can I add a frame around the artwork in the AR view?

Yes. Create a larger AR node with a frame texture and place the artwork image inside it. Alternatively, composite the frame onto the image server-side before serving it to the AR widget.

Can users purchase artwork directly from the AR view?

Yes. Add a Buy Now button in the AR view overlay. On tap, navigate to the checkout flow with the artwork document reference, just as you would from the detail page.

How do I handle artwork in landscape and portrait orientations?

The widthCm and heightCm fields naturally define orientation. A 60x80 piece renders portrait, while an 80x60 piece renders landscape. The AR widget uses these values directly.

What if I need a full gallery platform with AR, e-commerce, and artist management?

RapidDev has built art marketplace apps in FlutterFlow with AR preview, Stripe payments, artist dashboards, commission tracking, and exhibition management features.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.