Skip to content

Conversation

@gspencergoog
Copy link
Collaborator

@gspencergoog gspencergoog commented Nov 11, 2025

Description

This adds the Verdure example app to the examples directory. It includes both a Flutter client and a Python server that acts as a landscape client intake app which uses GenUI to render the intake forms that are appropriate for the given uploaded photo.

Summary of Changes

This pull request delivers a significant new example application, Verdure, demonstrating a full-stack AI-powered landscape design workflow. It integrates a Flutter client with a Python A2A server, showcasing dynamic UI generation via GenUI. The example covers user interaction from photo upload and questionnaire completion to design presentation and order confirmation. Alongside this new feature, several critical issues in core UI and validation libraries were identified and addressed, ensuring the stability and correctness of the underlying frameworks.

Highlights

  • New Verdure Example Application Added: This pull request introduces a new example application named 'Verdure', which showcases a Flutter client interacting with a Python-based A2A (Agent-to-Agent) server for landscape design. The application leverages GenUI to dynamically render intake forms and design options based on user input, including uploaded photos.
  • Flutter Client Implementation: The Flutter client (examples/verdure/client) is a comprehensive application built with Flutter, Riverpod for state management, and GoRouter for navigation. It integrates flutter_genui and flutter_genui_a2ui to consume UI definitions from the Python backend, enabling a dynamic user experience for photo uploads, questionnaires, design presentations, shopping cart, and order confirmation.
  • Python Server Implementation: The Python server (examples/verdure/server) acts as the landscape client intake app, utilizing the a2a-sdk and a custom a2ui_ext extension. It processes user queries, including image uploads, and generates A2UI JSON responses to drive the Flutter client's UI. It also includes a tool to fetch landscape options and handles session management.
  • Critical Bug Fixes in Core Libraries: Several critical bugs related to missing break statements in switch cases within packages/flutter_genui and packages/json_schema_builder were addressed. These omissions caused unintended fall-through logic, leading to incorrect UI rendering and data validation behavior.
  • Dependency Updates and Configuration: The packages/flutter_genui_a2ui dependency was updated to use a2a: ^3.1.0. Additionally, the root .gitignore was modified to include Python-specific ignore patterns and adjust existing Flutter/Firebase patterns, and the main pubspec.yaml was updated to include the new Verdure client in the workspace.
Changelog
  • .gitignore
    • Modified existing ignore patterns by removing **/ prefix, potentially restricting their scope.
    • Added new Python-specific ignore patterns (__pycache__/, *.py[cod], *.egg-info/, .pytest_cache/, .coverage, htmlcov/).
  • examples/verdure/README.md
    • Added a new README file detailing the Verdure Landscape Design Example, including prerequisites and running instructions for both the Flutter client and Python server.
  • examples/verdure/client/.metadata
    • Added Flutter project metadata for the client application.
  • examples/verdure/client/android/.gitignore
    • Added Android-specific .gitignore rules for the Flutter client.
  • examples/verdure/client/android/app/build.gradle.kts
    • Added Android application build configuration for the Flutter client.
  • examples/verdure/client/android/app/src/debug/AndroidManifest.xml
    • Added debug Android manifest, including network security configuration for development.
  • examples/verdure/client/android/app/src/main/AndroidManifest.xml
    • Added main Android manifest for the Flutter client, defining application properties and permissions.
  • examples/verdure/client/android/app/src/main/kotlin/com/example/verdure/MainActivity.kt
    • Added the main Kotlin activity for the Android Flutter application.
  • examples/verdure/client/android/app/src/main/res/drawable-v21/launch_background.xml
    • Added launch background drawable for Android API 21+.
  • examples/verdure/client/android/app/src/main/res/drawable/launch_background.xml
    • Added launch background drawable for Android.
  • examples/verdure/client/android/app/src/main/res/values-night/styles.xml
    • Added night mode styles for the Android application.
  • examples/verdure/client/android/app/src/main/res/values/styles.xml
    • Added base styles for the Android application.
  • examples/verdure/client/android/app/src/profile/AndroidManifest.xml
    • Added profile Android manifest.
  • examples/verdure/client/android/build.gradle.kts
    • Added root Android build configuration for the Flutter client.
  • examples/verdure/client/android/gradle.properties
    • Added Gradle properties for the Android build.
  • examples/verdure/client/android/gradle/wrapper/gradle-wrapper.properties
    • Added Gradle wrapper properties.
  • examples/verdure/client/android/settings.gradle.kts
    • Added Android settings Gradle file, configuring Flutter SDK path and plugins.
  • examples/verdure/client/ios/.gitignore
    • Added iOS-specific .gitignore rules for the Flutter client.
  • examples/verdure/client/ios/Flutter/AppFrameworkInfo.plist
    • Added iOS App Framework Info.plist.
  • examples/verdure/client/ios/Flutter/Debug.xcconfig
    • Added iOS debug build configuration.
  • examples/verdure/client/ios/Flutter/Release.xcconfig
    • Added iOS release build configuration.
  • examples/verdure/client/ios/Runner.xcodeproj/project.pbxproj
    • Added Xcode project file for the iOS Flutter client.
  • examples/verdure/client/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
    • Added Xcode workspace checks plist.
  • examples/verdure/client/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
    • Added Xcode workspace settings.
  • examples/verdure/client/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
    • Added Xcode scheme for the iOS Runner target.
  • examples/verdure/client/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
    • Added Xcode workspace checks plist.
  • examples/verdure/client/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
    • Added Xcode workspace settings.
  • examples/verdure/client/ios/Runner/AppDelegate.swift
    • Added iOS AppDelegate for the Flutter client.
  • examples/verdure/client/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
    • Added AppIcon asset catalog configuration.
  • examples/verdure/client/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
    • Added LaunchImage asset catalog configuration.
  • examples/verdure/client/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
    • Added README for LaunchImage assets.
  • examples/verdure/client/ios/Runner/Base.lproj/LaunchScreen.storyboard
    • Added iOS LaunchScreen storyboard.
  • examples/verdure/client/ios/Runner/Base.lproj/Main.storyboard
    • Added iOS Main storyboard.
  • examples/verdure/client/ios/Runner/Info.plist
    • Added iOS Info.plist for the Flutter client, including NSAppTransportSecurity for local networking.
  • examples/verdure/client/ios/RunnerTests/RunnerTests.swift
    • Added iOS unit tests file.
  • examples/verdure/client/lib/core/logging.dart
    • Added logging utility for the Flutter client.
  • examples/verdure/client/lib/core/theme/theme.dart
    • Added theme definitions (light and dark modes) for the Flutter client.
  • examples/verdure/client/lib/features/ai/ai_provider.dart
    • Added Riverpod provider for AI client state, managing GenUI and A2UI communication.
  • examples/verdure/client/lib/features/ai/ai_provider.g.dart
    • Added generated Riverpod code for the AI provider.
  • examples/verdure/client/lib/features/screens/order_confirmation_screen.dart
    • Added screen for displaying order confirmation.
  • examples/verdure/client/lib/features/screens/presentation_screen.dart
    • Added screen for presenting landscape design options.
  • examples/verdure/client/lib/features/screens/questionnaire_screen.dart
    • Added screen for dynamic questionnaire based on uploaded photo.
  • examples/verdure/client/lib/features/screens/shopping_cart_screen.dart
    • Added screen for displaying the shopping cart.
  • examples/verdure/client/lib/features/screens/upload_photo_screen.dart
    • Added screen for uploading a photo of the yard, including image picking logic.
  • examples/verdure/client/lib/features/screens/welcome_screen.dart
    • Added welcome screen for the Verdure application.
  • examples/verdure/client/lib/features/state/loading_state.dart
    • Added a singleton class to manage global loading state and messages.
  • examples/verdure/client/lib/features/widgets/app_navigator.dart
    • Added a widget to handle navigation based on AI surface updates.
  • examples/verdure/client/lib/features/widgets/global_progress_indicator.dart
    • Added a global progress indicator widget with animated loading messages.
  • examples/verdure/client/lib/main.dart
    • Added the main entry point for the Flutter client, configuring logging, themes, and GoRouter routes.
  • examples/verdure/client/linux/.gitignore
    • Added Linux-specific .gitignore rules for the Flutter client.
  • examples/verdure/client/linux/CMakeLists.txt
    • Added CMake build configuration for the Linux Flutter client.
  • examples/verdure/client/linux/flutter/CMakeLists.txt
    • Added Flutter-specific CMake build rules for Linux.
  • examples/verdure/client/linux/runner/CMakeLists.txt
    • Added CMake build configuration for the Linux runner executable.
  • examples/verdure/client/linux/runner/main.cc
    • Added main C++ file for the Linux runner.
  • examples/verdure/client/linux/runner/my_application.cc
    • Added C++ implementation of MyApplication for Linux, handling GTK application setup.
  • examples/verdure/client/linux/runner/my_application.h
    • Added header file for MyApplication on Linux.
  • examples/verdure/client/macos/.gitignore
    • Added macOS-specific .gitignore rules for the Flutter client.
  • examples/verdure/client/macos/Flutter/Flutter-Debug.xcconfig
    • Added macOS debug build configuration.
  • examples/verdure/client/macos/Flutter/Flutter-Release.xcconfig
    • Added macOS release build configuration.
  • examples/verdure/client/macos/Runner.xcodeproj/project.pbxproj
    • Added Xcode project file for the macOS Flutter client.
  • examples/verdure/client/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
    • Added Xcode workspace checks plist.
  • examples/verdure/client/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
    • Added Xcode scheme for the macOS Runner target.
  • examples/verdure/client/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
    • Added Xcode workspace checks plist.
  • examples/verdure/client/macos/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
    • Added Xcode workspace settings.
  • examples/verdure/client/macos/Runner/AppDelegate.swift
    • Added macOS AppDelegate for the Flutter client.
  • examples/verdure/client/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
    • Added AppIcon asset catalog configuration for macOS.
  • examples/verdure/client/macos/Runner/Base.lproj/MainMenu.xib
    • Added macOS MainMenu XIB file.
  • examples/verdure/client/macos/Runner/Configs/AppInfo.xcconfig
    • Added macOS app info configuration.
  • examples/verdure/client/macos/Runner/Configs/Debug.xcconfig
    • Added macOS debug build configuration.
  • examples/verdure/client/macos/Runner/Configs/Release.xcconfig
    • Added macOS release build configuration.
  • examples/verdure/client/macos/Runner/Configs/Warnings.xcconfig
    • Added macOS compiler warning configurations.
  • examples/verdure/client/macos/Runner/DebugProfile.entitlements
    • Added macOS debug profile entitlements.
  • examples/verdure/client/macos/Runner/Info.plist
    • Added macOS Info.plist for the Flutter client, including NSAppTransportSecurity for local networking.
  • examples/verdure/client/macos/Runner/MainFlutterWindow.swift
    • Added macOS MainFlutterWindow implementation.
  • examples/verdure/client/macos/Runner/Release.entitlements
    • Added macOS release entitlements.
  • examples/verdure/client/macos/RunnerTests/RunnerTests.swift
    • Added macOS unit tests file.
  • examples/verdure/client/pubspec.yaml
    • Added pubspec.yaml for the Verdure Flutter client, defining dependencies and assets.
  • examples/verdure/server/a2ui_extension/README.md
    • Added README for the Python A2UI extension.
  • examples/verdure/server/a2ui_extension/pyproject.toml
    • Added pyproject.toml for the Python A2UI extension.
  • examples/verdure/server/a2ui_extension/src/a2ui_ext/init.py
    • Added Python A2UI extension implementation, defining a2uiExtension and _a2uiExecutor.
  • examples/verdure/server/pyproject.toml
    • Added root pyproject.toml for the Verdure Python server, configuring the UV workspace.
  • examples/verdure/server/verdure/init.py
    • Added Python __init__.py for the Verdure server package.
  • examples/verdure/server/verdure/main.py
    • Added main entry point for the Verdure Python server, setting up the A2A application with agent card, executor, and middleware.
  • examples/verdure/server/verdure/a2ui_schema.py
    • Added Python file defining the A2UI JSON schema used for validation.
  • examples/verdure/server/verdure/agent.py
    • Added Python LandscapeAgent implementation, including agent instructions, UI validation logic, and integration with the ADK runner.
  • examples/verdure/server/verdure/agent_executor.py
    • Added Python LandscapeAgentExecutor to handle incoming requests, parse UI events, process image uploads, and stream responses from the LandscapeAgent.
  • examples/verdure/server/verdure/prompt_builder.py
    • Added Python utility to construct LLM prompts, incorporating UI instructions, examples, and the A2UI schema.
  • examples/verdure/server/verdure/pyproject.toml
    • Added pyproject.toml for the Verdure Python server package.
  • examples/verdure/server/verdure/tools.py
    • Added Python tools for the LandscapeAgent, including a get_landscape_options function.
  • examples/verdure/server/verdure/ui_examples.py
    • Added Python file containing A2UI example templates for various screens (welcome, project details, questionnaire, options presentation, shopping cart, order confirmation).
  • packages/flutter_genui/lib/src/core/genui_manager.dart
    • Removed a break statement from the DataModelUpdate case, causing unintended fall-through to SurfaceDeletion.
  • packages/flutter_genui_a2ui/pubspec.yaml
    • Updated the a2a dependency from a git reference to a published version (^3.1.0).
  • packages/json_schema_builder/lib/src/schema_validation.dart
    • Removed break statements from JsonType.string and JsonType.num/JsonType.int cases, causing unintended fall-through to subsequent validation logic.
  • pubspec.yaml
    • Added examples/verdure/client to the workspace definition.

gemini-code-assist[bot]

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

@flutter flutter deleted a comment from gemini-code-assist bot Nov 12, 2025
@gspencergoog gspencergoog merged commit 0ce3bd9 into flutter:main Nov 12, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants