Fix do not change to harder level immediately when human win AI

This commit is contained in:
Calcitem 2021-07-22 23:49:09 +08:00
parent b20b21793e
commit dc871776aa
No known key found for this signature in database
GPG Key ID: F2F7C29E054CFB80
1 changed files with 2 additions and 1 deletions

View File

@ -1173,9 +1173,10 @@ class _GamePageState extends State<GamePage>
fontSize: Config.fontSize,
),
),
onPressed: () {
onPressed: () async {
if (!isTopLevel) Config.skillLevel++;
Config.save();
await widget.engine.setOptions(context);
print("[config] skillLevel: ${Config.skillLevel}");
Navigator.of(context).pop();
}),