FlameTester<T extends FlameGame<World>> class

Customize this class with your specific FlameGame type T and a custom provider () -> T, plus some additional configurations including a game widget builder createGameWidget, a custom pumpWidget function and a custom gameSize.

Inheritance

Constructors

FlameTester(GameCreateFunction<T> createGame, {Vector2? gameSize, GameWidgetCreateFunction<T>? createGameWidget, PumpWidgetFunction<T>? pumpWidget})

Properties

createGame GameCreateFunction<T>
Use createGame to create your game instance.
finalinherited
createGameWidget GameWidgetCreateFunction<T>?
Use createGameWidget to create the GameWidget. If omitted, the game instance returned by createGame will be wrapped into an empty GameWidget instance.
finalinherited
gameSize → Vector2?
Override the game size to be provided during onGameResize. By default it will be a 500x500 square.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
makeReady bool
If true, the game will be brought into the "fully ready" state (meaning all its pending lifecycle events will be resolved) before the start of the test.
getter/setter pairinherited
pumpWidget PumpWidgetFunction<T>?
Use pumpWidget to define your own function to pump widgets into the Flutter test environment. When omitted, testGameWidget simply will pass the created game widget instance to the test.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

configure({GameCreateFunction<T>? createGame, Vector2? gameSize, GameWidgetCreateFunction<T>? createGameWidget, PumpWidgetFunction<T>? pumpWidget}) GameTester<T>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
testGameWidget(String description, {WidgetSetupFunction<T>? setUp, WidgetVerifyFunction<T>? verify, bool? skip, Timeout? timeout, bool? semanticsEnabled, dynamic tags}) → void
Creates a Game specific test case with given description which runs inside the Flutter test environment.
inherited
toString() String
A string representation of this object.
inherited

Operators

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