GradeScale class

A grading scale used at a location, such as a gym's numbered or coloured levels. Each level starts at a grade on the difficulty axis.

Annotations
  • @JsonSerializable.new(includeIfNull: false, explicitToJson: true)

Constructors

GradeScale({required String id, ClimbType? climbType, GradeScaleSpread? spread, required DateTime updatedAt, DateTime? deletedAt, required List<GradeScaleLevel> levels})
Creates a new GradeScale instance
GradeScale.fromJson(Map<String, dynamic> json)
Creates a GradeScale from JSON
factory

Properties

climbType → ClimbType?
The kind of climb the scale grades. Boulder when absent.
final
deletedAt → DateTime?
Set when the scale was removed. A removed scale stays listed so that climbs logged on it still resolve.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Globally unique id of the scale. Climbs refer to it in GradeScaleRef.id.
final
isDeleted → bool
Whether the scale was removed.
no setter
levels → List<GradeScaleLevel>
The levels, easiest first.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spread → GradeScaleSpread?
How the levels were laid out when the scale was created.
final
updatedAt → DateTime
When the scale last changed. Of two copies of a scale, the newer wins.
final

Methods

levelNumbered(int level) → GradeScaleLevel?
The level with number level, or null when the scale has none.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this GradeScale to JSON
toString() → String
A string representation of this object.
inherited

Operators

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