Flutter Fidget Toys App - Source Code - Version 1.0.0 - by LumioLab
PopCalm is a complete Android fidget and antistress app built with Flutter. It contains nine toys with real click sounds and strong native haptics, a daily streak and stats, and an optional one-time Pro unlock. Everything runs offline.
| Toy | What it does |
|---|---|
| Pop It | Rainbow pop-it board; pop all bubbles and it flips over. 5 colourways. |
| Bubble Wrap | Endless popping; bubbles re-inflate after a few seconds. |
| Spinner | Fidget spinner with fling physics, RPM readout and bearing clicks. |
| Switch Board | Switches, sliders, a rotary knob and a big red button. |
| Plasma Touch | Bend glowing ribbons of light with your fingers. |
| Zen Sand | Rake a sand garden; shake the phone to smooth it. |
| Squish Ball | Press to squash, fling to wobble. |
| Liquid Lamp (Pro) | Goo blobs that merge and split. |
| Gears (Pro) | Turn one gear and the whole train follows. |
VibrationEffect directly, with composition primitives where the phone supports them.in_app_purchase, with restore and offline cache.VIBRATE).The project targets Android. The haptics and sound engine live in MainActivity.kt, so an iOS port would need a Swift version of the same channel.
flutter pub get
flutter run # on a connected device or emulator
flutter analyze # static checks
flutter test # widget tests
The project ships as com.example.popcalm. Search and replace com.example.popcalm with your own id across the project. It appears in:
android/app/build.gradle.kts - namespace and applicationIdandroid/app/src/main/kotlin/com/example/popcalm/MainActivity.kt - the package line and the two channel nameslib/*.dart - the MethodChannel / EventChannel names (must match MainActivity.kt)Then move MainActivity.kt to the folder that matches the new package (for example kotlin/com/yourco/yourapp/).
Change android:label in android/app/src/main/AndroidManifest.xml and title: in lib/main.dart. The home screen header text is in HomeScreen in the same file.
Replace the images in assets/icon/ (icon.png, icon_bg.png, icon_fg.png, icon_mono.png; 1024x1024 recommended, SVG sources included), then run:
dart run flutter_launcher_icons
The settings for this live in the flutter_launcher_icons: block of pubspec.yaml.
The seed colour (0xFF7C6CF6) and background (0xFF12101F) are set in ThemeData in lib/main.dart. Each toy card has its own two-colour gradient in the _toys list in the same file.
Set Billing.productId in lib/billing.dart to the one-time product id you create in Play Console, and the fallback price text Pro.priceLabel in lib/pro.dart. The real, localised price is read from Google Play at runtime. To make every toy free, remove isPro: true and the ProToyGate wrapper from the toy entries.
lib/toys/my_toy.dart with a screen widget. Return a ToyScaffold (defined in main.dart) for the shared app bar and background.Haptics for vibration, Sfx.play(...) for sound and Stats.bump('key') to count interactions.lib/main.dart and add an entry to the _toys list:_Toy(
title: 'My Toy',
subtitle: 'Short tagline',
emoji: '🎈',
colors: const [Color(0xFF4E9AF1), Color(0xFF3D5EDB)],
builder: (_) => const MyToyScreen(),
),
For a Pro-only toy add isPro: true and wrap the screen in ProToyGate(toyName: 'My Toy', child: MyToyScreen()).
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA \
-keysize 2048 -validity 10000 -alias uploadandroid/key.properties (keep it out of version control; it is already in .gitignore):
storePassword=YOUR_STORE_PASSWORD
keyPassword=YOUR_KEY_PASSWORD
keyAlias=upload
storeFile=/absolute/path/to/upload-keystore.jks
When this file is missing, release builds fall back to debug signing, so the project always compiles.version: in pubspec.yaml and build the bundle:
flutter build appbundle --releasebuild/app/outputs/bundle/release/app-release.aab in Play Console. If you keep the Pro unlock, create the matching one-time product (same id as Billing.productId).lib/
main.dart app entry, theme, home grid, toy list
toys/ one file per toy screen (9 files)
haptics.dart vibration engine (MethodChannel)
haptic_patterns.dart vibration recipes
haptic_studio.dart pattern picker screen
sfx.dart sound effects player
sound_packs.dart sound pack definitions
sound_room.dart sound pack picker screen
pop_it_themes.dart Pop It colourways
stats.dart counters and daily streak
stats_screen.dart stats screen
daily.dart today's toy pick
settings_screen.dart settings
billing.dart Google Play Billing
pro.dart Pro entitlement cache
paywall.dart Pro sheet
pro_toy_gate.dart lock screen for Pro toys
android/ Android project; MainActivity.kt holds the native channel
assets/sfx/ 54 WAV sound effects
assets/icon/ launcher icon sources (PNG + SVG)
test/widget_test.dart widget tests
tool/ gen_sfx.py (sound generator), render_icon.py (icon renderer)
documentation/ this file
v1.0.0 - Initial release.
Questions or issues: contact LumioLab via the marketplace comments.