flutter: Clean up
This commit is contained in:
parent
fbdbd2b7f2
commit
cb099d3035
|
@ -67,12 +67,6 @@ class Audios {
|
|||
_alarmSoundStreamId = await _soundpool!.play(await soundId);
|
||||
}
|
||||
|
||||
static Future<void> _pauseSound() async {
|
||||
if (_alarmSoundStreamId != null && _alarmSoundStreamId! > 0) {
|
||||
await _soundpool!.pause(_alarmSoundStreamId!);
|
||||
}
|
||||
}
|
||||
|
||||
static Future<void> _stopSound() async {
|
||||
if (_alarmSoundStreamId != null && _alarmSoundStreamId! > 0) {
|
||||
await _soundpool!.stop(_alarmSoundStreamId!);
|
||||
|
|
|
@ -49,9 +49,7 @@ class GamePage extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _GamePageState extends State<GamePage> with RouteAware {
|
||||
// TODO: null-safety
|
||||
String? _status = '';
|
||||
//bool _searching = false;
|
||||
bool isReady = false;
|
||||
late Timer timer;
|
||||
|
||||
|
@ -135,7 +133,6 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
|||
int? sq = indexToSquare[index];
|
||||
|
||||
if (sq == null) {
|
||||
//print("putPiece skip index: $index");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -243,7 +240,7 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
|||
// TODO: Need Others?
|
||||
// Increment ply counters. In particular,
|
||||
// rule50 will be reset to zero later on
|
||||
// in case of a capture.
|
||||
// in case of a remove.
|
||||
++position.gamePly;
|
||||
++position.st.rule50;
|
||||
++position.st.pliesFromNull;
|
||||
|
@ -321,7 +318,6 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
|||
Move mv = response.value;
|
||||
final Move move = new Move(mv.move);
|
||||
|
||||
//Battle.instance.move = move;
|
||||
Game.instance.doMove(move.move);
|
||||
showTips();
|
||||
break;
|
||||
|
|
|
@ -65,12 +65,6 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
|||
});
|
||||
}
|
||||
|
||||
void _incrementCounter() {
|
||||
setState(() {
|
||||
_counter++;
|
||||
});
|
||||
}
|
||||
|
||||
void _restore() async {
|
||||
final profile = await Settings.instance();
|
||||
await profile.restore();
|
||||
|
|
|
@ -20,8 +20,6 @@ import 'dart:async';
|
|||
|
||||
import 'package:animated_text_kit/animated_text_kit.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:sanmill/common/config.dart';
|
||||
import 'package:sanmill/generated/l10n.dart';
|
||||
import 'package:sanmill/style/app_theme.dart';
|
||||
import 'package:sanmill/widgets/game_settings_page.dart';
|
||||
|
@ -180,6 +178,7 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
|||
),
|
||||
);
|
||||
|
||||
/*
|
||||
var exitListTile = ListTile(
|
||||
title: Text(
|
||||
S.of(context).exit,
|
||||
|
@ -202,13 +201,16 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
|||
await SystemChannels.platform.invokeMethod<void>('SystemNavigator.pop');
|
||||
},
|
||||
);
|
||||
*/
|
||||
|
||||
/*
|
||||
var drawFooter = Column(
|
||||
children: <Widget>[
|
||||
exitListTile,
|
||||
SizedBox(height: MediaQuery.of(context).padding.bottom)
|
||||
],
|
||||
);
|
||||
*/
|
||||
|
||||
var scaffold = Scaffold(
|
||||
backgroundColor: AppTheme.drawerBackgroundColor,
|
||||
|
|
Loading…
Reference in New Issue