LevelMapParams class Null safety

Constructors

LevelMapParams({required int levelCount, required double currentLevel, Color pathColor = Colors.black, double levelHeight = 200, double pathStrokeWidth = 3, double dashLengthFactor = 0.025, bool enableVariationBetweenCurves = true, double maxVariationFactor = 0.2, bool showPathShadow = true, Offset shadowDistanceFromPathOffset = const Offset(-2, 12), Offset minReferencePositionOffsetFactor = const Offset(0.4, 0.3), Offset maxReferencePositionOffsetFactor = const Offset(1, 0.7), Offset? firstCurveReferencePointOffsetFactor, List<ImageParams>? bgImagesToBePaintedRandomly, ImageParams? startLevelImage, required ImageParams completedLevelImage, required ImageParams currentLevelImage, required ImageParams lockedLevelImage, ImageParams? pathEndImage})
Note: If you see any hard edge, decrease the maxVariationFactor,else disable the enableVariationBetweenCurves parameter, Default is 0.2. If you need the curves to be fixed in every build, set the enableVariationBetweenCurves to false and set the firstCurveReferencePointOffsetFactor, Default is random.

Properties

bgImagesToBePaintedRandomly List<ImageParams>?
final
completedLevelImage ImageParams
It is the image positioned on top of the completed levels of the level map to indicate the level is completed.
final
currentLevel double
Determines the current level of the user. If the user is in between levels, use decimal.
latefinal
currentLevelImage ImageParams
It is the image positioned on top of the current level of the level map to indicate the current position of the user.
final
curveReferenceOffsetVariationForEachLevel List<Offset>
List of reference point offset of each level. Affects only if enableVariationBetweenCurves flag is set to true Helps to position the reference point for each curve. Default is random.
final
dashLengthFactor double
Used to adjust the length of the dash. Should be between 0 and 0.5. Default is 0.025.
final
enableVariationBetweenCurves bool
If set to false, there won't be any variation between curves, all curves are identical. Default is true.
final
firstCurveReferencePointOffsetFactor Offset?
Determines the position of the reference point of the first curve. This affects all the successive reference points. Offset factor should be between 0 and 1. Default is random.
read / write
hashCode int
The hash code for this object.
read-onlyinherited
levelCount int
final
levelHeight double
Default is 200.
final
lockedLevelImage ImageParams
It is the image positioned on top of the upcoming levels of the level map to indicate those levels are yet to unlock.
final
maxReferencePositionOffsetFactor Offset
Max Amplitude factor of the curve. Affects how far the reference point at most be from mid point. Offset factor should be between 0 and 1. Default is Offset(1, 0.7), which means dx of Reference point should at most (1 * (width/2)) and dy of the Reference point should at most (0.7 * (width/2)) width/2 since the curve starts in center
final
maxVariationFactor double
Determines max offset variation between curves. Affects only if enableVariationBetweenCurves flag is set to true. Note: Having huge maxVariationFactor causes hard edges. Ideal value is between 0 and 1 (may vary based on the levelHeight). Default is 0.2.
final
minReferencePositionOffsetFactor Offset
Min Amplitude factor of the curve. Affects how far the reference point at least be from mid point. Offset factor should be between 0 and 1. Default is Offset(0.4, 0.3), which means dx of Reference point should at least (0.4 * (width/2)) and dy of the Reference point should at least (0.3 * (width/2)) width/2 since the curve starts in center
final
pathColor Color
final
pathEndImage ImageParams?
It is the image positioned in the top center of the level map to indicate the end of the level map.
final
pathStrokeWidth double
Determines the stroke width of the path lines. Default is 3.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
shadowDistanceFromPathOffset Offset
Determines how far the shadows should cast. Affects only if showPathShadow flag is set to true dx of the offset determines horizontal distance from the path, dy of the offset determines vertical distance from the path. +ve dx casts shadow to right and -ve dx casts shadow to the left, +ve dy casts shadow to the bottom and -ve dy casts shadow to the top. Default is Offset(-2, 12).
final
showPathShadow bool
final
startLevelImage ImageParams?
It is the image positioned in the bottom center of the level map to indicate the start position.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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