Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
style: format
Browse files Browse the repository at this point in the history
  • Loading branch information
SiongSng committed Nov 28, 2022
1 parent e673229 commit 73d7ed8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/screen/loading_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class _LoadingScreenState extends State<LoadingScreen> {
user: SentryUser(
id: Config.getValue('ga_client_id'),
username: userName,
extras: {
data: {
'userOrigin': LauncherInfo.userOrigin,
'githubSourceMap': githubSourceMap,
'config': Config.toMap()
Expand Down
8 changes: 4 additions & 4 deletions lib/util/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class ThemeUtility {
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
primary: const Color.fromARGB(190, 86, 110, 244),
onPrimary: Colors.white)),
backgroundColor: const Color.fromARGB(190, 86, 110, 244),
foregroundColor: Colors.white)),
useMaterial3: false),
ThemeUtility.toInt(Themes.dark): ThemeData(
brightness: Brightness.dark,
Expand All @@ -101,8 +101,8 @@ class ThemeUtility {
)),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
primary: const Color.fromARGB(190, 46, 160, 253),
onPrimary: Colors.white)),
backgroundColor: const Color.fromARGB(190, 46, 160, 253),
foregroundColor: Colors.white)),
useMaterial3: true),
});
}
Expand Down
4 changes: 2 additions & 2 deletions lib/util/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class Util {
comparableVersion = Version.parse('$sourceVersion.0');
}
} catch (e) {
String? _preVersion() {
String? preVersion() {
int pos = sourceVersion.indexOf('-pre');
if (pos >= 0) return sourceVersion.substring(0, pos);

Expand All @@ -392,7 +392,7 @@ class Util {
return null;
}

String? str = _preVersion();
String? str = preVersion();
if (str != null) {
try {
return Version.parse(str);
Expand Down
10 changes: 5 additions & 5 deletions lib/view/Edit/mods_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class _ModsViewState extends State<ModsView> {
logger.error(ErrorType.parseModInfo, "Mod Icon Parsing Error $err");
}

void _handle(Map map) {
void handle(Map map) {
try {
Map<String, dynamic> conflictsMap = map.cast<String, dynamic>();
conflictsMap.forEach((key, value) {
Expand All @@ -136,10 +136,10 @@ class _ModsViewState extends State<ModsView> {
}

if (modInfoMap.containsKey("conflicts")) {
_handle(modInfoMap["conflicts"]);
handle(modInfoMap["conflicts"]);
}
if (modInfoMap.containsKey("breaks")) {
_handle(modInfoMap["breaks"]);
handle(modInfoMap["breaks"]);
}

return ModInfo(
Expand Down Expand Up @@ -300,7 +300,7 @@ class _ModsViewState extends State<ModsView> {
Widget build(BuildContext context) {
final ReceivePort progressPort = ReceivePort();

Future<Map<File, ModInfo>> _get() async {
Future<Map<File, ModInfo>> get() async {
final ReceivePort hivePort = ReceivePort();

final List<ModInfo> needPuts = [];
Expand Down Expand Up @@ -329,7 +329,7 @@ class _ModsViewState extends State<ModsView> {
}

return FutureBuilder<Map<File, ModInfo>>(
future: _get(),
future: get(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
Expand Down
1 change: 0 additions & 1 deletion test/script/test_helper.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:io';
import 'dart:typed_data';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
Expand Down

0 comments on commit 73d7ed8

Please sign in to comment.