DFAudio class Null safety

音效播放

Constructors

DFAudio()

Properties

count int
计数
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
timer Timer?
定时播放
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
startPlay(List<String> files, {dynamic stepTime = 400, dynamic loop = false}) → void
开始播放音效序列
stopPlay() → void
取消播放音效序列
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

audioCache AudioCache
音频类
read / write
backgroundMusic BackgroundMusic
背景音乐
read / write
prefix String
read / write

Static Methods

loop(String file, {double volume = 1.0}) Future<AudioPlayer>
循环播放
loopLongAudio(String file, {double volume = 1.0}) Future<AudioPlayer>
循环播放长音频
play(String file, {double volume = 1.0}) Future<AudioPlayer>
播放短音频
playLongAudio(String file, {double volume = 1.0}) Future<AudioPlayer>
播放长音频