StarfieldController class Null safety

Controller class to add functionality to the starfield.

Each individual star will be generated using the provided configuration. Thenever the an property has changed (e.g. the number), the app must be restarted in order for the StarfieldController to be initialized using the updated configuration.

Constructors

StarfieldController({required int number, required Size size, required double depth, required double velocity, required double scale})
Creates a StarfieldController.

Properties

absoluteVelocity double
read / write
center Offset
Returns the view port's center point.
read-only
depth double
The depth of the space in which the stars are displayed. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
maxAxisLength double
Returns the larger view port axis (x,y).
read-only
maxAxisLengthAbs double
Returns the larger view port axis (x,y) as an absolute value.
read-only
maxY double
The uttermost starfield's y-axis position.
read-only
minX double
The uttermost starfield's x-axis position.
read-only
number int
The number of stars to be displayed.
final
random Random
The random instance used to create aberrations of the given center point, therefore making the Stars appear on different locations.
read / write
revisedDepth double
Returns a revised depth (0-1) based on the provided depth.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scale double
States which scale to apply on each star.
final
size Size
The starfield's size.
final
stars List<Star>
The List of Star objects which will be part of the starfield.
read / write
velocity double
The velocity the stars will travel at.
final

Methods

calcAbsVelo(double relVelo) double
Calculates a absolute velocity based on the current view port and returns its value.
dispose() → void
Disposes the controller state by emptying the stars list.
init() → void
Initializes the StarfieldController by creating the Stars.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited
transformStar(Star star) → void
Translates the provided Star's points. [...]

Operators

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