ADFA-3857: Flutter Template plugin (community submission, rebuilt)#44
Open
hal-eisen-adfa wants to merge 5 commits into
Open
ADFA-3857: Flutter Template plugin (community submission, rebuilt)#44hal-eisen-adfa wants to merge 5 commits into
hal-eisen-adfa wants to merge 5 commits into
Conversation
Rebuild Ali's Flutter Template community submission on the IDE's template system. Instead of writing hardcoded Dart files to external storage (broken under scoped storage), this is a headless installer modeled on pebble-custom-function-template-installer: on activate() it registers five Flutter templates (Basic, BLoC, Provider, GetX, Riverpod) via IdeTemplateService so they appear on the New Project screen alongside the core templates; on deactivate() it unregisters and cleans up. Templates are authored as Pebble (.peb) skeletons following the dev-assets core.cgt pattern, with APP_NAME/PACKAGE_NAME substitution. Adds the required HTML doc, README, IDE version range (26.22-26.28), and repo wiring (README table + update-libs deploy MAP). The submission's committed release.keystore + plaintext signing passwords were deliberately excluded. Flutter SDK install is out of scope (separate ticket). Co-authored-by: Ali <rjali3232@gmail.com>
- Replace the placeholder PCF thumbnails/icons with Flutter-logo artwork:
each of the 5 template thumbnails now shows the Flutter logo with a
per-variant accent app-bar (Basic=blue, BLoC=purple, Provider=teal,
GetX=orange, Riverpod=indigo); new day/night plugin icons (night uses a
brighter palette to read on dark Plugin Manager cards).
- Fix pubspec.yaml 'name:' rendering: a bare ${{APP_NAME | lower}} at end of
line had its trailing newline consumed by Pebble's newline-trimming, merging
name: and description: into invalid YAML. Quote the value so a character
follows the tag (matches the dev-assets convention). Verified on-device:
generated pubspec now has name/description on separate lines.
Device-verified on emulator (CoGo C-d-0626): 5 templates register and appear
on New Project beside the core templates with Flutter thumbnails; generated
projects substitute APP_NAME/PACKAGE_NAME correctly; plugin icon renders.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Daniel-ADFA
reviewed
Jul 10, 2026
Daniel-ADFA
reviewed
Jul 10, 2026
Point build.gradle.kts (compileOnly) and settings.gradle.kts (buildscript classpath) at ../libs/*.jar and delete flutter-template's local libs/ copy, so the plugin tracks the repo-root plugin-api/gradle-plugin jars instead of a snapshot that can drift. Promote the Gradle 8.14.3 wrapper to the repo root (gradlew, gradlew.bat, gradle/wrapper/) and remove flutter-template's local wrapper. Build the plugin with `cd flutter-template && ../gradlew assemblePlugin`; the resulting classes.dex is byte-identical to the device-verified build. README updated.
Retrospective for the ADFA-3857 session: log time breakdown, observations, and actions. Record cross-session learnings and conventions surfaced this run: - CLAUDE.md: repo-root libs + single shared gradle wrapper convention; Pebble .cgt template-installer subsection with the newline-trim gotcha; Verification note on launching CoGo via SplashActivity (not monkey/LeakCanary) and the Glide plugin-icon disk-cache staleness. - learnings.md: LeakCanary launch trap, Glide icon cache, Pebble bare-tag newline-trim, and the IdeTemplateService-vs-/sdcard registration pattern. - retrospective.md: session entry + drafted CoGo Glide icon-cache bug ticket.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Flutter Template plugin (
flutter-template/) — a community submission from Telegram user Ali (ADFA-3857), rebuilt on Code on the Go's template system.Instead of the original submission's approach (writing hardcoded Dart files to external storage from a UI fragment — which fails under scoped storage on modern devices), this is a headless installer modeled on
pebble-custom-function-template-installer: onactivate()it registers five Flutter templates viaIdeTemplateServiceso they appear on the New Project screen alongside the core templates; ondeactivate()it unregisters and cleans up.The five templates
setState)flutter_blocprovidergetflutter_riverpodEach is authored as a Pebble (
.peb) skeleton following thedev-assetscore.cgtpattern, withAPP_NAME/PACKAGE_NAMEsubstitution. Custom Flutter-logo thumbnails (per-variant accent bar) and day/night plugin icons.Why a rebuild, not a patch
Ali's bundled
plugin-api.jarpredated the template API (IdeTemplateService/CgtTemplateBuilder), which is why he fell back to raw/sdcardwrites. The repo's template-API-capable jars make the correct installer pattern possible. The submission's committedrelease.keystore+ plaintext signing passwords were deliberately excluded (flagged as compromised on the Jira ticket).Out of scope
Scaffolds project files only — does not install the Flutter SDK. CoGo has no Dart/Flutter awareness today and the SDK (~500 MB) would need the
ndk-installer-style download-on-demand pattern in its own plugin. Recommend a separate ticket + feasibility spike.Verification
./gradlew clean assemblePlugin→fluttertemplate.cgp✅/plugin-review: build ✅, security clean ✅, rubric green (6.7 N/A — headless installer has no UI element to tooltip, matching the PCFInstaller precedent).C-d-0626): installed via Plugin Manager, all 5 templates register and appear on New Project beside the core templates with Flutter thumbnails; generated a project and confirmedAPP_NAME/PACKAGE_NAMEsubstitution with no leftover${{}}tokens; plugin icon renders.Two bugs caught during device testing (fixed in this PR)
${{APP_NAME | lower}}at end-of-line lost its trailing newline to Pebble's newline-trimming, mergingname:/description:. Fixed by quoting the value (dev-assets convention); re-verified valid on-device.Credit: contributed by Ali via the community submission process.