route property
Normally, audio played will respect the devices configured preferences. However, if you want to bypass that and flag the system to use the built-in speakers or the earpiece, you can set this flag. See AudioContextConfigRoute for more details on the options.
Implementation
final AudioContextConfigRoute route;