Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
import 'package:suguru/models/activity/cell_location.dart';
class Cell {
const Cell({
required this.location,
required this.blockId,
required this.value,
required this.isFixed,
});
final CellLocation location;
final String blockId;
final int value;
final bool isFixed;
static Cell none = Cell(
location: CellLocation.go(0, 0),
blockId: '',
value: 0,
isFixed: true,
);
void dump() {
printlog('$Cell:');
printlog(' location: $location');
printlog(' blockId: $blockId');
printlog(' value: $value');
printlog(' isFixed: $isFixed');
printlog('');
}
@override
String toString() {
return '$Cell(${toJson()})';
}
Map<String, dynamic>? toJson() {
return <String, dynamic>{
'location': location.toJson(),
'value': value,
'isFixed': isFixed,
};
}
}