flutter_audio_games library
This package provides useful widgets for rapid creation of audio games.
Getting Started
- Create audio menus with the AudioGameMenu class.
- Schedule a single task to happen on a regular basis with the Ticking widget.
- Schedule multiple tasks to happen at a given time with the TickingTasks widget.
- Schedule random tasks with the RandomTasks widget.
- Add music to any widget by wrapping it in a Music widget.
- Add a sound to play when a widget is focused by wrapping it in a PlaySoundSemantics widget.
- Add game shortcuts with the GameShortcuts widget.
- Show splash screens and play cut scenes with the TimedBuilders widget.
Classes
- AmbiancesBuilder
- A widget which plays ambiances.
- AmbiancesBuilderState
- State for AmbiancesBuilder.
- AudioGameMenu
- A menu in an audio game.
- AudioGameMenuItem
- A menu item in an AudioGameMenu.
- AudioGameMenuItemListTile
- A ListTile for use in an AudioGameMenu widget.
- GainListTile
- A ListTile for editing gain.
- GameShortcut
- A shortcut in a GameShortcuts widget.
- GameShortcuts
- A widget for handling game shortcuts.
- GameShortcutsHelpScreen
- A widget which shows game shortcuts.
- InheritedGameShortcuts
- An inherited widget for use with GameShortcuts.
- InheritedMusic
- The inherited version of a Music.
- InheritedRandomTasks
- An inherited version of RandomTasks.
- InheritedTicking
- The inherited version of Ticking.
- MaybeMusic
- A widget that possibly plays music through source.
- Music
- A widget that plays music.
- MusicState
- State for Music.
- PlaySound
- A widget which plays a sound when built.
- PlaySoundSemantics
- A Semantics widget which plays a sound when focused.
- PlaySoundSemanticsState
- State for PlaySoundSemantics.
- PlaySoundState
- State for PlaySound.
- RandomTask
- A task which will happen every getDuration.
- RandomTasks
- A widget which runs random tasks.
- RandomTasksState
- State for RandomTasks.
- ReverbBuilder
-
A widget which creates a
GlobalFdnReverb
from reverbPreset and manages its life cycle. - ReverbBuilderState
- State for ReverbBuilder.
- ReverbPreset
- A reverb preset.
- SceneBuilder
- A scene complete with 3d ambiances,.
- SceneBuilderAmbiance
- An ambiance in a SceneBuilder.
- SceneBuilderAmbianceContext
- Hold context for sceneBuilderAmbiance.
- SceneBuilderState
- State for SceneBuilder.
- Sound
- A single sound to play.
- SoundList
- A class which provides a list of paths to choose a sound from.
- Ticking
- A widget that calls onTick every duration.
- TickingState
- State for Ticking.
- TickingTask
- A task whose onTick method will be called every duration.
- TickingTasks
- A widget which ticks tasks.
- TimedBuilders
- A widget which builds the next WidgetBuilder in builders every duration.
- TimedBuildersState
- State for TimedBuilders.
- TimedTransitions
- A widget which can transition between widgets on user gesture or similar.
- TimedTransitionsState
- State for TimedTransitions.
- TransitionSoundBuilder
- A screen for transitioning to builder while playing sound.
Enums
- MovingDirection
- Possible movement directions.
- TurningDirection
- Possible turning directions.
Extensions
- FlutterAudioGamesBuildContextExtension on BuildContext
- Useful extensions on build contexts.
- FlutterAudioGamesGainExtension on GainMixin
- Useful methods.
-
FlutterAudioGamesListExtension
on List<
E> - Useful extensions for lists.
-
FlutterAudioGamesListStringExtension
on List<
String> - Useful methods on string lists.
-
FlutterAudioGamesPointDoubleExtension
on Point<
double> - Useful methods for points.
-
FlutterAudioGamesPointExtension
on Point<
T> - Useful methods on generic points.
-
FlutterAudioGamesPointIntExtension
on Point<
int> - Useful methods for points.
- FlutterAudioGamesStringExtension on String
- Useful string methods.
Functions
-
angleToRad(
double angle) → double -
Convert an
angle
to radians. -
normaliseAngle(
double angle) → double - Return an angle between 0 and 359 degrees.
-
radsToDegrees(
double radians) → double -
Convert
radians
to degrees.
Typedefs
-
BuildContextValueBuilder<
T> = Widget Function(BuildContext context, T value) -
The type of a function which takes both a build
context
and avalue
. - ContextCallback = void Function(BuildContext innerContext)
- The type of a function which receives a build context as its only argument.
- OnTransition = void Function(Duration duration, WidgetBuilder builder)
- The type of a function to instigate a transition.