sound_flutter 0.0.1
sound_flutter: ^0.0.1 copied to clipboard
Sound for Flutter with the goal of no additional system dependencies. Integrates the `sound_dart` package and uses cargokit to build the native Rust audio library and use it via FFI.
sound_flutter #
Flutter integration for sound_dart - cross-platform audio
with no system dependencies for your users to install.
This package builds the shared sound_cli Rust crate automatically (via
cargokit) and bundles it with your app,
then re-exports the full sound_dart API.
import 'package:sound_flutter/sound_flutter.dart';
await SoundFlutter.ensureInitialized();
final playback = await Sound.playFile('/path/to/chime.wav');
await playback.onComplete;
Building requires Rust (rustup). To remove even that for consumers, the repo
is set up for cargokit precompiled binaries:
native/sound_cli/cargokit.yamlholds the public signing key and the release URL prefix..github/workflows/precompile.ymlbuilds and uploads signed binaries toprecompiled_<crate-hash>releases on tag pushes. It needs aCARGOKIT_PRIVATE_KEYrepository secret - the hex private key printed bydart run build_tool gen-key(keep it secret; never commit it).
Once a release exists, consuming builds download the matching signed binary instead of invoking cargo; with none present, cargokit builds from source.