CardId.fromCombination constructor Null safety

CardId.fromCombination(
  1. {String? master,
  2. required Combination combination}
)

Implementation

factory CardId.fromCombination(
    {String? master, required Combination combination}) {
  final id = master;
  final frontJoin = combination.front!.join(',');
  final backJoin = combination.back!.join(',');
  return CardId(
      id: id,
      frontJoin: frontJoin,
      backJoin: backJoin,
      time: null,
      uniqueId: '$id#$frontJoin@$backJoin');
}