Jiggicons

Flutter

The jiggicons package for Flutter on iOS, Android, web and desktop.

flutter pub add jiggicons
lib/inbox.dart
import 'package:jiggicons/jiggicons.dart';

JiggIcon('bell', variant: JiggIconVariant.solid, size: 32, sound: true, semanticLabel: 'Notifications')

Tap the icon and it plays, on iOS, Android, the web and desktop. Motion is off when the platform asks for reduced motion.

Parameters

ParameterDefault
variantoutlineoutline, solid, duotone or glass. Styles
sizeIconThemeWidth and height; the surrounding IconTheme size, then 24
colorIconThemeThe icon’s colour. Glass keeps its own frosted greys
soundfalsePlay the icon’s spatial sound with its motion
volume1Sound volume from 0 to 1
triggertaptap, appear or none
controllernullA JiggIconController to play it from code
semanticLabelnullAccessible name. Leave it out when the icon sits next to a visible label. Accessibility

Play from code

final bell = JiggIconController();

JiggIcon('bell', trigger: JiggIconTrigger.none, controller: bell)
TextButton(onPressed: bell.play, child: const Text('Ring'))

Sound

Each sound is made by the same synthesis as on the web, already placed between the two speakers along the path the icon moves, and ships in the package as a small .m4a file. Sounds play with audioplayers, mixed with other audio and quiet when the phone is set to silent.

JiggiconsAudio.instance.volume = 0.6;

The Flutter package has the 80 free icons.