From 62d404971007d74849c1527824b14f1624b56294 Mon Sep 17 00:00:00 2001 From: Yannick Mauray Date: Sun, 14 Nov 2021 21:31:51 +0100 Subject: [PATCH] Formatting issues --- lib/src/pages/manager.dart | 13 +++++-------- lib/src/widgets/downloader/download_label.dart | 7 +------ .../widgets/home_page/home_page_button_group.dart | 7 ++----- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/lib/src/pages/manager.dart b/lib/src/pages/manager.dart index ea8db32..e6e7017 100644 --- a/lib/src/pages/manager.dart +++ b/lib/src/pages/manager.dart @@ -68,10 +68,10 @@ class _ManagerState extends State with PreferencesMixin { } void _detectSpice() async { - ProcessResult result = await Process.run('which', ['spicy']); - setState(() { - _spicy = result.exitCode == 0; - }); + ProcessResult result = await Process.run('which', ['spicy']); + setState(() { + _spicy = result.exitCode == 0; + }); } VmInfo _parseVmInfo(name) { @@ -157,10 +157,7 @@ class _ManagerState extends State with PreferencesMixin { width: 8, ), ElevatedButton( - style: ElevatedButton.styleFrom( - primary: Theme.of(context).canvasColor, - onPrimary: buttonColor - ), + style: ElevatedButton.styleFrom(primary: Theme.of(context).canvasColor, onPrimary: buttonColor), onPressed: () async { String? result = await FilePicker.platform.getDirectoryPath(); if (result != null) { diff --git a/lib/src/widgets/downloader/download_label.dart b/lib/src/widgets/downloader/download_label.dart index ebd272d..9d956f5 100644 --- a/lib/src/widgets/downloader/download_label.dart +++ b/lib/src/widgets/downloader/download_label.dart @@ -2,12 +2,7 @@ import 'package:flutter/material.dart'; import 'package:gettext_i18n/gettext_i18n.dart'; class DownloadLabel extends StatelessWidget { - const DownloadLabel( - {Key? key, - required this.downloadFinished, - required this.data, - required this.downloader}) - : super(key: key); + const DownloadLabel({Key? key, required this.downloadFinished, required this.data, required this.downloader}) : super(key: key); final bool downloadFinished; final double? data; diff --git a/lib/src/widgets/home_page/home_page_button_group.dart b/lib/src/widgets/home_page/home_page_button_group.dart index 72da585..aee5764 100644 --- a/lib/src/widgets/home_page/home_page_button_group.dart +++ b/lib/src/widgets/home_page/home_page_button_group.dart @@ -38,15 +38,12 @@ class _HomePageButtonGroupState extends State { text: _selectedOperatingSystem?.name ?? context.t('Select...'), onPressed: () { Navigator.of(context) - .push(MaterialPageRoute( - fullscreenDialog: true, - builder: (context) => const OperatingSystemSelection())) + .push(MaterialPageRoute(fullscreenDialog: true, builder: (context) => const OperatingSystemSelection())) .then((selection) { if (selection != null) { setState(() { _selectedOperatingSystem = selection; - if (selection.versions.length == 1 && - selection.versions.first.options.length == 1) { + if (selection.versions.length == 1 && selection.versions.first.options.length == 1) { _selectedVersion = selection.versions.first; _selectedOption = selection.versions.first.options.first; } else {