feat: set up Flutter SDK monorepo (formbricks_flutter package + playground app)#1
Conversation
WalkthroughThis pull request establishes a complete Flutter monorepo skeleton for the Formbricks first-party SDK. It includes root configuration files pinning Flutter 3.44.0 via FVM and defining workspace structure via Melos. The 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/playground/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md`:
- Line 5: The README.md file in the LaunchImage.imageset is missing a trailing
newline; open the README.md file (the one containing the guidance about opening
ios/Runner.xcworkspace and dropping images) and ensure the file ends with
exactly one newline character by adding a single line break at EOF and saving
the file.
In `@apps/playground/lib/main.dart`:
- Around line 55-77: The Column in the Scaffold body can overflow on small
screens; make the content scrollable by wrapping the Column (the widget that
contains greeting and the loop over actions calling _stub) in a scrollable
container (e.g., SingleChildScrollView or replace with a ListView) while
preserving the existing Padding and crossAxisAlignment:
CrossAxisAlignment.stretch; keep the onPressed calling _stub unchanged so
buttons still work.
In `@apps/playground/test/widget_test.dart`:
- Line 8: The test in widget_test.dart is tightly coupled to the SDK placeholder
string ("Welcome to Formbricks") and should use a stable playground-owned
constant instead; create or reuse a playground constant (e.g., kWelcomeMessage)
in the app UI code that the widget displays and update the test's expectation to
use find.text(kWelcomeMessage) rather than the hard-coded SDK placeholder, and
ensure you do not reference the SDK's welcome() placeholder function in the test
so future SDK wording changes won't break the test.
In `@docs/FLUTTER_SDK_PLAN.md`:
- Line 310: The fenced code block in the document is missing a language
identifier (triggering MD040); update the opening fence from "```" to include a
language (e.g., "```text") for the code block that lists the formbricks_flutter
directory so the linter recognizes it as a text block.
- Line 81: Update the FLUTTER_SDK_PLAN.md minimum SDK line that currently reads
"Language: Dart ≥ 3.4. Flutter ≥ 3.22 (stable channel)" to match the repo pins
(Flutter 3.44.0 from .fvmrc and Dart sdk: ^3.12.0 from pubspec.yaml), change
that single-line header accordingly, fix the fenced code blocks flagged by MD040
by adding a language identifier to each empty fenced block, and normalize the
inconsistent "userIds" wording to "userId" for consistency across the document
(search for the "userIds" occurrence near the noted section and replace).
In `@README.md`:
- Around line 14-36: The fenced repository tree block in README.md (the
triple-backtick block containing the "flutter/" tree) lacks a language tag;
update that opening fence to include a text-style tag (e.g., change ``` to
```text) so the code block is labeled and markdown lint MD040 is
satisfied—ensure the closing fence remains ``` and do not alter the block
contents.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: e5ca461d-e9aa-43e8-b7c6-6eb082decc46
⛔ Files ignored due to path filters (24)
apps/playground/android/app/src/main/res/mipmap-hdpi/ic_launcher.pngis excluded by!**/*.pngapps/playground/android/app/src/main/res/mipmap-mdpi/ic_launcher.pngis excluded by!**/*.pngapps/playground/android/app/src/main/res/mipmap-xhdpi/ic_launcher.pngis excluded by!**/*.pngapps/playground/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.pngis excluded by!**/*.pngapps/playground/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.pngis excluded by!**/*.pngapps/playground/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.pngis excluded by!**/*.pngpubspec.lockis excluded by!**/*.lock
📒 Files selected for processing (58)
.fvmrc.gitignoreLICENSEREADME.mdanalysis_options.yamlapps/playground/.gitignoreapps/playground/.metadataapps/playground/README.mdapps/playground/android/.gitignoreapps/playground/android/app/build.gradle.ktsapps/playground/android/app/src/debug/AndroidManifest.xmlapps/playground/android/app/src/main/AndroidManifest.xmlapps/playground/android/app/src/main/kotlin/com/formbricks/formbricks_playground/MainActivity.ktapps/playground/android/app/src/main/res/drawable-v21/launch_background.xmlapps/playground/android/app/src/main/res/drawable/launch_background.xmlapps/playground/android/app/src/main/res/values-night/styles.xmlapps/playground/android/app/src/main/res/values/styles.xmlapps/playground/android/app/src/profile/AndroidManifest.xmlapps/playground/android/build.gradle.ktsapps/playground/android/gradle.propertiesapps/playground/android/gradle/wrapper/gradle-wrapper.propertiesapps/playground/android/settings.gradle.ktsapps/playground/ios/.gitignoreapps/playground/ios/Flutter/AppFrameworkInfo.plistapps/playground/ios/Flutter/Debug.xcconfigapps/playground/ios/Flutter/Release.xcconfigapps/playground/ios/Runner.xcodeproj/project.pbxprojapps/playground/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedataapps/playground/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistapps/playground/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingsapps/playground/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemeapps/playground/ios/Runner.xcworkspace/contents.xcworkspacedataapps/playground/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistapps/playground/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingsapps/playground/ios/Runner/AppDelegate.swiftapps/playground/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.jsonapps/playground/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.jsonapps/playground/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.mdapps/playground/ios/Runner/Base.lproj/LaunchScreen.storyboardapps/playground/ios/Runner/Base.lproj/Main.storyboardapps/playground/ios/Runner/Info.plistapps/playground/ios/Runner/Runner-Bridging-Header.happs/playground/ios/Runner/SceneDelegate.swiftapps/playground/ios/RunnerTests/RunnerTests.swiftapps/playground/lib/main.dartapps/playground/pubspec.yamlapps/playground/test/widget_test.dartdocs/FLUTTER_SDK_PLAN.mdpackages/formbricks_flutter/.gitignorepackages/formbricks_flutter/CHANGELOG.mdpackages/formbricks_flutter/LICENSEpackages/formbricks_flutter/README.mdpackages/formbricks_flutter/lib/formbricks_flutter.dartpackages/formbricks_flutter/pubspec.yamlpackages/formbricks_flutter/test/formbricks_flutter_test.dartpubspec.yamlsonar-project.propertiestool/run.sh
|
|
||
| You can customize the launch screen with your own desired assets by replacing the image files in this directory. | ||
|
|
||
| You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. No newline at end of file |
There was a problem hiding this comment.
Add trailing newline at end of file.
The markdown file should end with exactly one newline to satisfy MD047 and avoid lint noise.
✅ Proposed fix
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
+📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. | |
| You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. | |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 5-5: Files should end with a single newline character
(MD047, single-trailing-newline)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/playground/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md` at
line 5, The README.md file in the LaunchImage.imageset is missing a trailing
newline; open the README.md file (the one containing the guidance about opening
ios/Runner.xcworkspace and dropping images) and ensure the file ends with
exactly one newline character by adding a single line break at EOF and saving
the file.
| return Scaffold( | ||
| appBar: AppBar(title: const Text('Formbricks Flutter Playground')), | ||
| body: Center( | ||
| child: Padding( | ||
| padding: const EdgeInsets.all(24), | ||
| child: Column( | ||
| mainAxisAlignment: MainAxisAlignment.center, | ||
| crossAxisAlignment: CrossAxisAlignment.stretch, | ||
| children: [ | ||
| Text(greeting, textAlign: TextAlign.center), | ||
| const SizedBox(height: 24), | ||
| for (final a in actions) ...[ | ||
| FilledButton( | ||
| onPressed: () => _stub(context, a.action), | ||
| child: Text(a.label), | ||
| ), | ||
| const SizedBox(height: 12), | ||
| ], | ||
| ], | ||
| ), | ||
| ), | ||
| ), | ||
| ); |
There was a problem hiding this comment.
Non-scrollable Column can overflow on small screens / landscape.
The centered Column has fixed-height content (greeting + six buttons + spacers) with no scrolling. On compact devices or landscape orientation this will trigger a RenderFlex overflowed error, which is easy to hit when manually QA-ing the playground across simulators/emulators.
🛠️ Make the content scrollable
return Scaffold(
appBar: AppBar(title: const Text('Formbricks Flutter Playground')),
- body: Center(
- child: Padding(
- padding: const EdgeInsets.all(24),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- Text(greeting, textAlign: TextAlign.center),
- const SizedBox(height: 24),
- for (final a in actions) ...[
- FilledButton(
- onPressed: () => _stub(context, a.action),
- child: Text(a.label),
- ),
- const SizedBox(height: 12),
- ],
- ],
- ),
- ),
- ),
+ body: Center(
+ child: SingleChildScrollView(
+ padding: const EdgeInsets.all(24),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ Text(greeting, textAlign: TextAlign.center),
+ const SizedBox(height: 24),
+ for (final a in actions) ...[
+ FilledButton(
+ onPressed: () => _stub(context, a.action),
+ child: Text(a.label),
+ ),
+ const SizedBox(height: 12),
+ ],
+ ],
+ ),
+ ),
+ ),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| return Scaffold( | |
| appBar: AppBar(title: const Text('Formbricks Flutter Playground')), | |
| body: Center( | |
| child: Padding( | |
| padding: const EdgeInsets.all(24), | |
| child: Column( | |
| mainAxisAlignment: MainAxisAlignment.center, | |
| crossAxisAlignment: CrossAxisAlignment.stretch, | |
| children: [ | |
| Text(greeting, textAlign: TextAlign.center), | |
| const SizedBox(height: 24), | |
| for (final a in actions) ...[ | |
| FilledButton( | |
| onPressed: () => _stub(context, a.action), | |
| child: Text(a.label), | |
| ), | |
| const SizedBox(height: 12), | |
| ], | |
| ], | |
| ), | |
| ), | |
| ), | |
| ); | |
| return Scaffold( | |
| appBar: AppBar(title: const Text('Formbricks Flutter Playground')), | |
| body: Center( | |
| child: SingleChildScrollView( | |
| padding: const EdgeInsets.all(24), | |
| child: Column( | |
| mainAxisSize: MainAxisSize.min, | |
| crossAxisAlignment: CrossAxisAlignment.stretch, | |
| children: [ | |
| Text(greeting, textAlign: TextAlign.center), | |
| const SizedBox(height: 24), | |
| for (final a in actions) ...[ | |
| FilledButton( | |
| onPressed: () => _stub(context, a.action), | |
| child: Text(a.label), | |
| ), | |
| const SizedBox(height: 12), | |
| ], | |
| ], | |
| ), | |
| ), | |
| ), | |
| ); |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/playground/lib/main.dart` around lines 55 - 77, The Column in the
Scaffold body can overflow on small screens; make the content scrollable by
wrapping the Column (the widget that contains greeting and the loop over actions
calling _stub) in a scrollable container (e.g., SingleChildScrollView or replace
with a ListView) while preserving the existing Padding and crossAxisAlignment:
CrossAxisAlignment.stretch; keep the onPressed calling _stub unchanged so
buttons still work.
| testWidgets('playground renders the SDK test buttons', (tester) async { | ||
| await tester.pumpWidget(const PlaygroundApp()); | ||
|
|
||
| expect(find.text('Welcome to Formbricks'), findsOneWidget); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Inspect the placeholder welcome() implementation in the SDK package.
fd -t f 'formbricks_flutter.dart' packages | xargs cat
ast-grep --pattern 'String welcome() { $$$ }'Repository: formbricks/flutter
Length of output: 583
🏁 Script executed:
#!/bin/bash
# Find all uses/definitions of welcome() and the specific greeting string.
rg -n --hidden --glob '!.dart_tool/**' "String welcome\(\)" .
rg -n --hidden --glob '!.dart_tool/**' "Welcome to Formbricks" .Repository: formbricks/flutter
Length of output: 696
Remove hard-coded coupling to the SDK placeholder greeting in widget_test.
apps/playground/test/widget_test.dart asserts "Welcome to Formbricks", which matches the current SDK placeholder (String welcome() => 'Welcome to Formbricks';), but that greeting is explicitly a “Placeholder … Replaced by the real SDK surface later”. When the SDK wording changes, this widget test (and the associated README/app expectations) will break. Prefer asserting against a playground-owned constant/stable string (or a localized/app resource) instead of the SDK’s placeholder value.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/playground/test/widget_test.dart` at line 8, The test in
widget_test.dart is tightly coupled to the SDK placeholder string ("Welcome to
Formbricks") and should use a stable playground-owned constant instead; create
or reuse a playground constant (e.g., kWelcomeMessage) in the app UI code that
the widget displays and update the test's expectation to use
find.text(kWelcomeMessage) rather than the hard-coded SDK placeholder, and
ensure you do not reference the SDK's welcome() placeholder function in the test
so future SDK wording changes won't break the test.
|
|
||
| ### Tech stack | ||
|
|
||
| - Language: Dart ≥ 3.4. Flutter ≥ 3.22 (stable channel). |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify toolchain/version statements used by the repo.
set -euo pipefail
echo "== .fvmrc =="
fd -HI "^\.fvmrc$" --exec sed -n '1,40p' {}
echo
echo "== Root pubspec SDK constraints / workspace hints =="
fd -HI "^pubspec\.yaml$" | head -n 1 | xargs -I{} sh -c "sed -n '1,140p' {}"
echo
echo "== Spec line with Tech stack versions =="
nl -ba docs/FLUTTER_SDK_PLAN.md | sed -n '76,90p'Repository: formbricks/flutter
Length of output: 4369
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== .fvmrc =="
fd -HI "^\.fvmrc$" --exec sed -n '1,40p' {}
echo
echo "== Root pubspec.yaml (environment sdk) =="
fd -HI "^pubspec\.yaml$" | head -n 1 | xargs -I{} sh -c "echo '--- {} ---'; sed -n '1,120p' {} | rg -n 'environment:|sdk:' -n || true; sed -n '1,80p' {}"
echo
echo "== docs/FLUTTER_SDK_PLAN.md lines 70-95 =="
sed -n '70,95p' docs/FLUTTER_SDK_PLAN.md
echo
echo "== Any other toolchain pins (search for fvmrc / flutter version / sdk constraints) =="
rg -n --hidden --no-ignore-vcs -S "fvmrc|flutter: *\\\"|flutter: *3\\.|environment:|sdk: *\\^3\\.|Dart ≥|Flutter ≥" .Repository: formbricks/flutter
Length of output: 5920
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== All .fvmrc-like pins (fvmrc only expected) =="
fd -HI "(\.fvmrc|fvm\.rc|\.tool-versions)$" --exec cat {} || true
echo
echo "== Dart SDK constraints across all pubspec.yaml files =="
fd -HI "^pubspec\.yaml$" | sort | while read -r f; do
echo "--- $f ---"
# Print just environment/sdk lines plus some context
sed -n '/^environment:/,/^[^[:space:]]/p' "$f" | rg -n "sdk:" -n || true
# Also print first occurrence of "sdk:" under environment for safety
rg -n "^environment:|^sdk:|sdk:" "$f" | head -n 10 || true
done
echo
echo "== Spec fenced code blocks with no language after backticks (``` ) =="
# Capture lines where a fence starts with exactly ``` (optional spaces) and no language tag
# Report with line number.
nl -ba docs/FLUTTER_SDK_PLAN.md | rg -n "^\s*```(\\s*)$" || true
echo
echo "== Spec occurrences of userIds (and nearby context) =="
rg -n "userIds" docs/FLUTTER_SDK_PLAN.md || true
for m in $(rg -n "userIds" docs/FLUTTER_SDK_PLAN.md | cut -d: -f1 | sort -u); do
sed -n "$((m-3)), $((m+3))p" docs/FLUTTER_SDK_PLAN.md
echo "---"
done
echo
echo "== Spec line where the Tech stack versions are defined (line ~81) =="
nl -ba docs/FLUTTER_SDK_PLAN.md | sed -n '70,90p'Repository: formbricks/flutter
Length of output: 621
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== docs/FLUTTER_SDK_PLAN.md: Tech stack version line near 81 =="
awk 'NR>=70 && NR<=90 {printf "%d:%s\n", NR, $0}' docs/FLUTTER_SDK_PLAN.md
echo
echo "== docs/FLUTTER_SDK_PLAN.md: fences that start with ``` but have no language tag =="
# Match a line that is exactly ``` (possibly with surrounding whitespace)
awk '{printf "%d:%s\n", NR, $0}' docs/FLUTTER_SDK_PLAN.md | rg -n '^([0-9]+:)?\s*``` *$'
echo
echo "== docs/FLUTTER_SDK_PLAN.md: occurrences of userIds and nearby context =="
rg -n "userIds" docs/FLUTTER_SDK_PLAN.md
for m in $(rg -n "userIds" docs/FLUTTER_SDK_PLAN.md | cut -d: -f1 | sort -u); do
sed -n "$((m-3)),$((m+3))p" docs/FLUTTER_SDK_PLAN.md | awk '{print}' ; echo "---"
doneRepository: formbricks/flutter
Length of output: 1923
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file="docs/FLUTTER_SDK_PLAN.md"
echo "== Fenced code blocks that start with only ``` (no language) =="
awk -v f="$file" '
/^[[:space:]]*```[[:space:]]*$/ {
print NR ":" $0
}
' "$file" || true
echo
echo "== userIds occurrences =="
rg -n "userIds" "$file" || true
echo
echo "== userIds nearby context (if any) =="
awk '
/userIds/ {
start = (NR-3>1 ? NR-3 : 1)
end = NR+3
print "---- around line " NR " ----"
for (i=start; i<=end; i++) {
getline line < f
}
}
' "$file" || trueRepository: formbricks/flutter
Length of output: 125
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file="docs/FLUTTER_SDK_PLAN.md"
echo "== Fenced code blocks that start with only ``` (no language tag) =="
rg -n '^\s*```\s*$' "$file" || true
echo
echo "== Context around line ~310 (to inspect MD040 report) =="
sed -n '300,330p' "$file"
echo
echo "== Occurrences of userIds =="
rg -n 'userIds' "$file" || true
echo
echo "== Context around each userIds occurrence =="
while IFS=: read -r line _; do
start=$((line-5)); if [ "$start" -lt 1 ]; then start=1; fi
end=$((line+5))
echo "--- ${file}:${line} ---"
sed -n "${start},${end}p" "$file"
done < <(rg -n 'userIds' "$file" || true)Repository: formbricks/flutter
Length of output: 124
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file="docs/FLUTTER_SDK_PLAN.md"
echo "== Fences that are exactly '```' (no language tag) =="
rg -n '^[[:space:]]*```[[:space:]]*$' "$file" || true
echo
echo "== Context around reported grammar location (~236, userIds) =="
sed -n '220,250p' "$file"
echo
echo "== Context around reported MD040 location (~310, fenced code block) =="
sed -n '295,330p' "$file"Repository: formbricks/flutter
Length of output: 124
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file="docs/FLUTTER_SDK_PLAN.md"
echo "== Fenced code blocks with empty language tag =="
rg -n '^[[:space:]]*```[[:space:]]*$' "$file" || true
echo
echo "== Context around reported grammar area (approx lines 220-250) =="
sed -n '220,250p' "$file"
echo
echo "== Context around reported MD040 area (approx lines 295-340) =="
sed -n '295,340p' "$file"
echo
echo "== Occurrences of userIds (with context) =="
rg -n -C 5 'userIds' "$file" || trueRepository: formbricks/flutter
Length of output: 7987
Align docs/FLUTTER_SDK_PLAN.md minimum Dart/Flutter versions with repo pins.
The current line is misleading:
- Language: Dart ≥ 3.4. Flutter ≥ 3.22 (stable channel).
The repo pins Flutter to 3.44.0 via .fvmrc and requires Dart sdk: ^3.12.0 in pubspec.yaml (root + packages). Update the minimums accordingly to avoid conflicting setup guidance.
- MD040: several fenced blocks have an empty language tag (
docs/FLUTTER_SDK_PLAN.mdlines106, 159, 186, 199, 310, 348); add a language identifier. - Consider fixing “userIds” wording (around line ~236) for consistency with “userId”.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/FLUTTER_SDK_PLAN.md` at line 81, Update the FLUTTER_SDK_PLAN.md minimum
SDK line that currently reads "Language: Dart ≥ 3.4. Flutter ≥ 3.22 (stable
channel)" to match the repo pins (Flutter 3.44.0 from .fvmrc and Dart sdk:
^3.12.0 from pubspec.yaml), change that single-line header accordingly, fix the
fenced code blocks flagged by MD040 by adding a language identifier to each
empty fenced block, and normalize the inconsistent "userIds" wording to "userId"
for consistency across the document (search for the "userIds" occurrence near
the noted section and replace).
|
|
||
| ## Appendix A — Suggested package layout | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Add a language identifier to the fenced code block.
Markdown lint warning MD040 is valid here; specify a language (for example text) on the fence opening line.
Suggested fix
-```
+```text
formbricks_flutter/
├── lib/
│ ├── formbricks_flutter.dart # public exports only📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 310-310: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/FLUTTER_SDK_PLAN.md` at line 310, The fenced code block in the document
is missing a language identifier (triggering MD040); update the opening fence
from "```" to include a language (e.g., "```text") for the code block that lists
the formbricks_flutter directory so the linter recognizes it as a text block.
| ``` | ||
| flutter/ | ||
| ├── pubspec.yaml # pub workspace root + Melos script config (never published) | ||
| ├── analysis_options.yaml # shared analyzer + lint rules for every package | ||
| ├── sonar-project.properties # SonarCloud config (finalised in a follow-up) | ||
| ├── LICENSE # MIT | ||
| ├── packages/ | ||
| │ └── formbricks_flutter/ # the SDK package (the thing we publish) | ||
| │ ├── lib/ | ||
| │ │ ├── formbricks_flutter.dart # public exports | ||
| │ │ └── src/ # (added in implementation tickets) | ||
| │ ├── test/ # one test file per source file | ||
| │ ├── pubspec.yaml | ||
| │ ├── CHANGELOG.md | ||
| │ ├── LICENSE | ||
| │ └── README.md | ||
| └── apps/ | ||
| └── playground/ # demo / manual-QA app (equivalent of RN's apps/playground) | ||
| ├── lib/main.dart # SDK test buttons: track, setUserId, setAttributes, … | ||
| ├── android/ ios/ # platform projects (iOS + Android only for v1) | ||
| ├── test/ | ||
| └── pubspec.yaml | ||
| ``` |
There was a problem hiding this comment.
Add a language tag to the repository tree fenced block.
The code fence starting at Line 14 has no language identifier, which triggers markdown linting noise. Use a text-style language tag (for example text) to satisfy MD040 consistently.
Suggested diff
-```
+```text
flutter/
├── pubspec.yaml # pub workspace root + Melos script config (never published)
...
└── apps/
└── playground/ # demo / manual-QA app (equivalent of RN's apps/playground)
...
-```
+```📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| flutter/ | |
| ├── pubspec.yaml # pub workspace root + Melos script config (never published) | |
| ├── analysis_options.yaml # shared analyzer + lint rules for every package | |
| ├── sonar-project.properties # SonarCloud config (finalised in a follow-up) | |
| ├── LICENSE # MIT | |
| ├── packages/ | |
| │ └── formbricks_flutter/ # the SDK package (the thing we publish) | |
| │ ├── lib/ | |
| │ │ ├── formbricks_flutter.dart # public exports | |
| │ │ └── src/ # (added in implementation tickets) | |
| │ ├── test/ # one test file per source file | |
| │ ├── pubspec.yaml | |
| │ ├── CHANGELOG.md | |
| │ ├── LICENSE | |
| │ └── README.md | |
| └── apps/ | |
| └── playground/ # demo / manual-QA app (equivalent of RN's apps/playground) | |
| ├── lib/main.dart # SDK test buttons: track, setUserId, setAttributes, … | |
| ├── android/ ios/ # platform projects (iOS + Android only for v1) | |
| ├── test/ | |
| └── pubspec.yaml | |
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 14-14: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` around lines 14 - 36, The fenced repository tree block in
README.md (the triple-backtick block containing the "flutter/" tree) lacks a
language tag; update that opening fence to include a text-style tag (e.g.,
change ``` to ```text) so the code block is labeled and markdown lint MD040 is
satisfied—ensure the closing fence remains ``` and do not alter the block
contents.
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 4 file(s) based on 4 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 4 file(s) based on 4 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
What
Establishes the
formbricks/flutterrepository as a monorepo for the FlutterSDK and its demo app — the foundation that follow-up implementation, CI, and
release work builds on. (Closes ENG-1121.)
No SDK behavior yet: the package exposes a placeholder
welcome()and the demobuttons are inert stubs. This PR is purely structural.
Layout
flutter/
├── pubspec.yaml # pub workspace root + Melos script config
├── analysis_options.yaml # shared analyzer + lint rules
├── sonar-project.properties # SonarCloud source/test map
├── docs/FLUTTER_SDK_PLAN.md # full spec + RN→Flutter architecture mapping
├── tool/run.sh # one-command device run (ios | android)
├── packages/
│ └── formbricks_flutter/ # the SDK package (publishable target)
└── apps/
└── playground/ # demo / manual-QA app (iOS + Android)
Tooling decisions
uses
resolution: workspace. No version drift between SDK and app.melos run analyze|format|test),configured under the
melos:key in the rootpubspec.yaml..fvmrc(3.44.0) so contributors and CIuse a byte-identical SDK.
apps/playground(mirrors the React Native repo) rather thaninside the package; a package
example/can be added later for pub.dev score.Demo app
Welcome to Formbricksheader + six SDK-test buttons (track / setUserId /setAttributes ×2 / setLanguage / logout). Each shows a "not wired yet" snackbar.
Run it (a device must be booted first —
flutter runwon't boot one):Verification
UI confirmed on both.
Out of scope (follow-ups)
Public SDK API + command queue, survey rendering (WebView), GitHub Actions CI,
SonarCloud quality gate, pub.dev publishing.