BudouX constructor

BudouX(
  1. String modelJsonString
)

Implementation

BudouX(String modelJsonString) {
  _model = json.decode(modelJsonString) as Map<String, dynamic>;

  _totalScore = _model.values
      .map(
        (e) => (e as Map<String, dynamic>).values.map(
              (e) => e as int,
            ),
      )
      .map(
        (e) => e.fold(
          0,
          (a, b) => a + b,
        ),
      )
      .fold(
        0,
        (a, b) => a + b,
      );
}