AndroidEmulator class

Inheritance

Constructors

AndroidEmulator({bool googleApis = true, required String model, String? name, required String osVersion, String? uuid})

Properties

asyncUuid Future<String?>
Discovers the emulator id if the emulator is running and assigns it to uuid.
no setter
googleApis bool
Whether to build an image with Google APIs. Defaults true
final
hashCode int
The hash code for this object.
no setterinherited
model String
Example: "iPad Air 2"
final
name String?
The humanized name of the device. Implementers of VirtualDevice should generate the name in a way that increments prior creations of the model and osVersion.
final
os OperatingSystem
final
osVersion String
Maps to the Android API Level
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uuid String?
A unique identifier used to communicate with the platform. This is the emulatorId, e.g. emulator-5554.
getter/setter pairoverride-getter

Methods

create({bool verbose = false}) Future<void>
Creates a new version of the device. uuid is usually assigned by the platform within this method.
override
createOrStart() Future<void>
If the device already exists, start it instead of createing it. If all devices of the model, os, and osVersion type are already running, a new virtual device will be created and then started.
override
delete() Future<void>
Permanently delete the device. For removing data only, see wipe.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start({bool bootAnimation = false, bool snapshot = false, bool wipeData = true}) Future<void>
Boots the device
override
stop() Future<void>
Turns off the device
override
toString() String
A string representation of this object.
inherited
wipe() Future<void>
Remove all data from the device. To permanently remove the device, see delete.
override

Operators

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

Static Methods

availableDevices() Future<List<AndroidEmulator>>
Created and available emulators
availableDeviceTypes() Future<Iterable<Map<String, dynamic>>>
Segment available emulator types into digestible Maps. See AvdmanagerCli#availableDeviceTypes
availableRuntimes() Future<Iterable<Map<String, dynamic>>>
Segment available Android versions into digestible Maps. See AvdmanagerCli#availableRuntimes