kipluo
Flutter5 min read4 steps

How to Install and Use Kipluo in a Flutter App

Kipluo's Flutter widgets share the spring engine, style tokens and sound recipes of the React components. This guide covers installing the package, where to put KipluoTheme, a first SpringToggle, turning sound off, silencing sound in tests, and adding paid widgets with the CLI.

You needFlutter 3.38+ (Dart 3.10+)A MaterialAppNode.js for the CLI (paid widgets only)
Loading demo
The web version of Spring Toggle. The Flutter SpringToggle uses the same spring values and sounds.Component page

1. Add the package

Free widgets ship in the kipluo package. flutter pub add adds it to pubspec.yaml and fetches it in one step. The package depends on flutter_soloud, which plays the synthesized sounds, so it is pulled in automatically.

terminal
flutter pub add kipluo

# pubspec.yaml now contains:
# dependencies:
#   kipluo: ^<latest version>

2. Put KipluoTheme inside MaterialApp

KipluoTheme sets the visual style (playful, minimal or mono) and optional colour and shadow overrides for every Kipluo widget below it. It reads the surrounding Material Theme for light and dark mode, so place it inside MaterialApp. The builder callback is the simplest way to cover every route.

lib/main.dart
import 'package:flutter/material.dart';
import 'package:kipluo/kipluo.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(useMaterial3: true),
      darkTheme: ThemeData.dark(useMaterial3: true),
      builder: (context, child) => KipluoTheme(
        style: KipluoStyle.playful, // or KipluoStyle.minimal, KipluoStyle.mono
        child: child!,
      ),
      home: const SettingsPage(),
    );
  }
}

class SettingsPage extends StatefulWidget {
  const SettingsPage({super.key});

  @override
  State<SettingsPage> createState() => _SettingsPageState();
}

class _SettingsPageState extends State<SettingsPage> {
  bool _notifications = true;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Settings')),
      body: Center(
        child: SpringToggle(
          value: _notifications,
          label: 'Notifications',
          onChanged: (v) => setState(() => _notifications = v),
        ),
      ),
    );
  }
}

3. Control sound

Every widget plays short synthesized sounds for its motion. KipluoSound.enabled is a ValueNotifier, so a settings switch can bind to it directly. Each widget also takes sound: false to silence just that one.

The package does not persist the global choice for you. Save it with shared_preferences or your own settings store and set KipluoSound.enabled.value on startup.

In widget tests, set the backend to SilentBackend so no audio engine is initialised.

sound.dart
import 'package:flutter/material.dart';
import 'package:kipluo/kipluo.dart';

// Global switch, e.g. from a settings screen
ValueListenableBuilder<bool>(
  valueListenable: KipluoSound.enabled,
  builder: (context, on, _) => SwitchListTile(
    title: const Text('Interface sounds'),
    value: on,
    onChanged: (v) => KipluoSound.enabled.value = v,
  ),
);

// One silent widget
SpringToggle(value: on, onChanged: (v) {}, sound: false);

// test/widget_test.dart
void main() {
  setUpAll(() => KipluoSound.backend = SilentBackend());
  // ...
}

Accessibility checklist

Tick each one off as you check your build. Your ticks stay in this browser.

0 of 3 checked

Build it yourself or install it

Build it yourself when

You need one animated control and are happy with Material's Switch or a hand-built AnimatedContainer.

Install Kipluo when

You want a consistent set of spring-animated widgets with sound and three styles, matching your React web app.

Keep building