accessibility: Read coordinates first only when point is empty

This commit is contained in:
Calcitem 2021-09-01 00:16:43 +08:00
parent 8b05014d52
commit 2894cb6b12
No known key found for this signature in database
GPG Key ID: F2F7C29E054CFB80
1 changed files with 6 additions and 1 deletions

View File

@ -271,7 +271,12 @@ class Board extends StatelessWidget {
squareDesc.clear();
for (var i = 0; i < 7 * 7; i++) {
squareDesc.add(coordinates[i] + ": " + pieceDesc[map[i] - 1]);
var desc = pieceDesc[map[i] - 1];
if (desc == S.of(context).emptyPoint) {
squareDesc.add(coordinates[i] + ": " + desc);
} else {
squareDesc.add(desc + ": " + coordinates[i]);
}
}
}
}