dart: Fix warnings

This commit is contained in:
Calcitem 2021-06-11 01:31:10 +08:00
parent dfb68374fb
commit 8622ec7333
4 changed files with 5 additions and 9 deletions

View File

@ -57,11 +57,8 @@ class Settings {
// TODO: main() ExternalStorage
// var docDir = await getExternalStorageDirectory();
var docDir = await getApplicationDocumentsDirectory();
if (docDir != null) {
_file = File('${docDir.path}/$fileName');
} else {
_file = File('$fileName');
}
_file = File('${docDir.path}/$fileName');
print("[settings] Loading $_file ...");

View File

@ -44,7 +44,7 @@ class Audios {
return;
}
_soundpool ??= Soundpool();
_soundpool ??= Soundpool.fromOptions();
if (_soundpool == null) {
if (Config.developerMode) {

View File

@ -22,7 +22,6 @@ import 'package:devicelocale/devicelocale.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:sanmill/common/config.dart';
import 'package:sanmill/generated/flutter_version.dart';
import 'package:sanmill/generated/l10n.dart';
import 'package:sanmill/style/app_theme.dart';

View File

@ -1217,7 +1217,7 @@ class _GamePageState extends State<GamePage>
void calcScreenPaddingH() {
//
// when screen's height/width rate is less than 16/9, limit witdh of board
// when screen's height/width rate is less than 16/9, limit width of board
final windowSize = MediaQuery.of(context).size;
double height = windowSize.height, width = windowSize.width;
@ -1570,7 +1570,7 @@ class _GamePageState extends State<GamePage>
currentLocale.languageCode == "he" ||
currentLocale.languageCode == "ps" ||
currentLocale.languageCode == "ur") {
print("Bidirectionality: RTL");
print("bidirectionality: RTL");
ltr = false;
}