getBoard method

BoardDefinition? getBoard(
  1. String id
)

Implementation

BoardDefinition? getBoard(String id) {
  try {
    final data = getAsset('$kPackBoardsPath/$id.json');
    if (data == null) return null;
    final content = utf8.decode(data);
    return BoardDefinitionMapper.fromJson(content);
  } catch (e) {
    return null;
  }
}