PopCalm

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.

Features

ToyWhat it does
Pop ItRainbow pop-it board; pop all bubbles and it flips over. 5 colourways.
Bubble WrapEndless popping; bubbles re-inflate after a few seconds.
SpinnerFidget spinner with fling physics, RPM readout and bearing clicks.
Switch BoardSwitches, sliders, a rotary knob and a big red button.
Plasma TouchBend glowing ribbons of light with your fingers.
Zen SandRake a sand garden; shake the phone to smooth it.
Squish BallPress to squash, fling to wobble.
Liquid Lamp (Pro)Goo blobs that merge and split.
Gears (Pro)Turn one gear and the whole train follows.

Requirements

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.

How to run

flutter pub get
flutter run          # on a connected device or emulator
flutter analyze      # static checks
flutter test         # widget tests

How to rebrand

1. Package id

The project ships as com.example.popcalm. Search and replace com.example.popcalm with your own id across the project. It appears in:

Then move MainActivity.kt to the folder that matches the new package (for example kotlin/com/yourco/yourapp/).

2. App name

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.

3. Icon

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.

4. Colours

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.

5. Pro unlock

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.

How to add a toy

  1. Create lib/toys/my_toy.dart with a screen widget. Return a ToyScaffold (defined in main.dart) for the shared app bar and background.
  2. From your gesture handlers call Haptics for vibration, Sfx.play(...) for sound and Stats.bump('key') to count interactions.
  3. Import the file in 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()).

How to publish to Google Play

  1. Create an upload keystore:
    keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA \
      -keysize 2048 -validity 10000 -alias upload
  2. Create android/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.
  3. Bump version: in pubspec.yaml and build the bundle:
    flutter build appbundle --release
  4. Upload build/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).

File structure

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

Changelog

v1.0.0 - Initial release.

Support

Questions or issues: contact LumioLab via the marketplace comments.