Dice constructor

Dice({
  1. required int amount,
  2. required int sides,
  3. int? modifierValue,
  4. String? modifierStat,
  5. String? modifierSign,
})

Implementation

Dice({
  required this.amount,
  required this.sides,
  this.modifierValue,
  this.modifierStat,
  String? modifierSign,
}) : modifierSign = modifierSign ??
          (modifierValue != null
              ? modifierValue >= 0
                  ? "+"
                  : "-"
              : "+");