| | |
| | | return _installed || |
| | | (t != null && |
| | | t.gameId == widget.game.id && |
| | | !t.isTool && |
| | | t.finished && |
| | | !t.extractFailed); |
| | | } |
| | |
| | | |
| | | /// 安装(未安装时):选择路径后下载并安装 |
| | | Future<void> _install() async { |
| | | // 选择下载安装路径 |
| | | // 选择下载安装路径(并校验磁盘剩余空间) |
| | | final ok = await showDialog<bool>( |
| | | context: context, |
| | | builder: (context) => DownloadPathDialog(gameTitle: widget.game.title), |
| | | builder: (context) => DownloadPathDialog( |
| | | gameTitle: widget.game.title, |
| | | requiredGb: widget.game.requiredDiskGb, |
| | | ), |
| | | ); |
| | | if (ok != true) return; |
| | | try { |
| | |
| | | color: Colors.black.withOpacity(0.6), |
| | | borderRadius: BorderRadius.circular(3), |
| | | ), |
| | | child: Text(widget.game.size, |
| | | child: Text(sizeWithGb(widget.game.size), |
| | | style: const TextStyle( |
| | | color: Colors.white, fontSize: 11)), |
| | | ), |