This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Panache is a Flutter DevTools Extension that adds a Lorem Ipsum dummy text generator to Flutter's DevTools. It uses the devtools_extensions framework and is published to pub.dev.
Run in Chrome with a simulated DevTools environment (no host app needed):
flutter run -d chrome --dart-define=use_simulated_environment=trueRun against a real DevTools environment:
dart run devtools_extensions build_and_copy --source=. --dest=./extension/devtools
cd example && flutter runflutter analyze lib test
dart format --set-exit-if-changed lib testdart run devtools_extensions build_and_copy --source=. --dest=./extension/devtools
dart run devtools_extensions validate --package=.This project uses FVM. The pinned Flutter version is 3.29.0 (see .fvmrc). Prefix commands with fvm if using FVM (e.g., fvm flutter run ...).
lib/main.dart— Wraps the app inDevToolsExtension, the required entry point for all DevTools extensions.lib/panache.dart— RootHookWidgetthat composes the sidebar, generated text display, and copy button.
Model (lib/src/model/)
lorem.dart— Text generation logic.Lorem.generate()takes paragraph/sentence/word counts and builds nested lists of random words from the constants pool. Word selection is biased 50% toward shorter words.unit.dart—Unitenum (paragraphs, sentences, words, bytes) that drives slider config:max,interval, anddefaultNumper unit.debouncer.dart— Delays text regeneration on rapid slider input to avoid excessive rebuilds.
UI (lib/src/ui/)
components/sidebar.dart— Control panel with sliders for eachUnit.components/unit_slider.dart— ReusableSyncfusionslider bound to aUnit.components/animated_text.dart— Displays generated text with an animation.style/— Shared color palette and text styles.
flutter_hooks/HookWidget— All stateful widgets use hooks (useState,useCallback) instead ofStatefulWidget.- Debounced generation — Slider changes go through
Debouncerbefore callingLorem.generate(). - DevTools extension framework — The app must be wrapped in
DevToolsExtensionand built/copied viadevtools_extensions build_and_copybefore DevTools can load it.