Formatting issues

This commit is contained in:
Yannick Mauray 2021-11-14 21:31:51 +01:00
parent 533742f41f
commit 62d4049710
No known key found for this signature in database
GPG Key ID: 67C4AAC5E99CB909
3 changed files with 8 additions and 19 deletions

View File

@ -68,10 +68,10 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
} }
void _detectSpice() async { void _detectSpice() async {
ProcessResult result = await Process.run('which', ['spicy']); ProcessResult result = await Process.run('which', ['spicy']);
setState(() { setState(() {
_spicy = result.exitCode == 0; _spicy = result.exitCode == 0;
}); });
} }
VmInfo _parseVmInfo(name) { VmInfo _parseVmInfo(name) {
@ -157,10 +157,7 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
width: 8, width: 8,
), ),
ElevatedButton( ElevatedButton(
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(primary: Theme.of(context).canvasColor, onPrimary: buttonColor),
primary: Theme.of(context).canvasColor,
onPrimary: buttonColor
),
onPressed: () async { onPressed: () async {
String? result = await FilePicker.platform.getDirectoryPath(); String? result = await FilePicker.platform.getDirectoryPath();
if (result != null) { if (result != null) {

View File

@ -2,12 +2,7 @@ import 'package:flutter/material.dart';
import 'package:gettext_i18n/gettext_i18n.dart'; import 'package:gettext_i18n/gettext_i18n.dart';
class DownloadLabel extends StatelessWidget { class DownloadLabel extends StatelessWidget {
const DownloadLabel( const DownloadLabel({Key? key, required this.downloadFinished, required this.data, required this.downloader}) : super(key: key);
{Key? key,
required this.downloadFinished,
required this.data,
required this.downloader})
: super(key: key);
final bool downloadFinished; final bool downloadFinished;
final double? data; final double? data;

View File

@ -38,15 +38,12 @@ class _HomePageButtonGroupState extends State<HomePageButtonGroup> {
text: _selectedOperatingSystem?.name ?? context.t('Select...'), text: _selectedOperatingSystem?.name ?? context.t('Select...'),
onPressed: () { onPressed: () {
Navigator.of(context) Navigator.of(context)
.push<OperatingSystem>(MaterialPageRoute( .push<OperatingSystem>(MaterialPageRoute(fullscreenDialog: true, builder: (context) => const OperatingSystemSelection()))
fullscreenDialog: true,
builder: (context) => const OperatingSystemSelection()))
.then((selection) { .then((selection) {
if (selection != null) { if (selection != null) {
setState(() { setState(() {
_selectedOperatingSystem = selection; _selectedOperatingSystem = selection;
if (selection.versions.length == 1 && if (selection.versions.length == 1 && selection.versions.first.options.length == 1) {
selection.versions.first.options.length == 1) {
_selectedVersion = selection.versions.first; _selectedVersion = selection.versions.first;
_selectedOption = selection.versions.first.options.first; _selectedOption = selection.versions.first.options.first;
} else { } else {