Apply dart autofixes
This commit is contained in:
parent
fa26d2f914
commit
505e3c2cd7
7 changed files with 11 additions and 9 deletions
|
@ -64,7 +64,7 @@ class ServerPage extends StatelessWidget {
|
||||||
port = int.parse(ipParts[1]);
|
port = int.parse(ipParts[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
print("Attempting to connect to FQDN/IP : ${ip} on port ${port}");
|
print("Attempting to connect to FQDN/IP : $ip on port $port");
|
||||||
await settings.client!.startConnect(ip, port);
|
await settings.client!.startConnect(ip, port);
|
||||||
|
|
||||||
C2SLoginPacket login = C2SLoginPacket();
|
C2SLoginPacket login = C2SLoginPacket();
|
||||||
|
|
|
@ -87,9 +87,9 @@ class GameServerPageState extends State<GameServerPage> {
|
||||||
var response =
|
var response =
|
||||||
await Navigator.pushNamed(context, "/server/discord");
|
await Navigator.pushNamed(context, "/server/discord");
|
||||||
|
|
||||||
if (response == null)
|
if (response == null) {
|
||||||
return;
|
return;
|
||||||
else {
|
} else {
|
||||||
DiscordHookProps editResult = response as DiscordHookProps;
|
DiscordHookProps editResult = response as DiscordHookProps;
|
||||||
Settings settings = Settings();
|
Settings settings = Settings();
|
||||||
settings.inst!.discord = editResult;
|
settings.inst!.discord = editResult;
|
||||||
|
|
|
@ -75,7 +75,7 @@ class ModManagerState extends State<ModManager> {
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text(mod.mod_name),
|
title: Text(mod.mod_name),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
"ID: ${mod.mod_id}\nLoad Order: ${idx}\nEnabled: ${mod.enabled}"),
|
"ID: ${mod.mod_id}\nLoad Order: $idx\nEnabled: ${mod.enabled}"),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final reply = await Navigator.pushNamed(
|
final reply = await Navigator.pushNamed(
|
||||||
context, "/server/mods/edit",
|
context, "/server/mods/edit",
|
||||||
|
|
|
@ -120,8 +120,9 @@ class HomePageState extends State<HomePage> {
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|
||||||
if(requireRestart)
|
if(requireRestart) {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
, SwitchListTile(value: requireRestart, onChanged: (V) {
|
, SwitchListTile(value: requireRestart, onChanged: (V) {
|
||||||
|
|
|
@ -314,7 +314,7 @@ class StateMachine {
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscordHookHelper.sendWebHook(settings.inst!.discord, alertColor,
|
DiscordHookHelper.sendWebHook(settings.inst!.discord, alertColor,
|
||||||
"Server Restart Alert", "${current.warning}");
|
"Server Restart Alert", current.warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Shutdown Pending
|
// Check Shutdown Pending
|
||||||
|
@ -348,7 +348,7 @@ class StateMachine {
|
||||||
// Mod is ok
|
// Mod is ok
|
||||||
} else {
|
} else {
|
||||||
// Mod is not ok
|
// Mod is not ok
|
||||||
updatedMods.add("${scannedMod.mod_name}");
|
updatedMods.add(scannedMod.mod_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ class Mod {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Mod deserialize(CompoundTag tag) {
|
static Mod deserialize(CompoundTag tag) {
|
||||||
CompoundTag ct = tag as CompoundTag;
|
CompoundTag ct = tag;
|
||||||
|
|
||||||
return Mod(
|
return Mod(
|
||||||
mod_name: ct.get("name")!.asString(),
|
mod_name: ct.get("name")!.asString(),
|
||||||
|
|
|
@ -36,9 +36,10 @@ class SettingsEntry {
|
||||||
st.pterodactylMode = NbtUtils.readBoolean(tag, "pterodactyl");
|
st.pterodactylMode = NbtUtils.readBoolean(tag, "pterodactyl");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tag.containsKey(DiscordHookProps.TAG_NAME))
|
if (tag.containsKey(DiscordHookProps.TAG_NAME)) {
|
||||||
st.discord = DiscordHookProps.deserialize(
|
st.discord = DiscordHookProps.deserialize(
|
||||||
tag.get(DiscordHookProps.TAG_NAME)!.asCompoundTag());
|
tag.get(DiscordHookProps.TAG_NAME)!.asCompoundTag());
|
||||||
|
}
|
||||||
|
|
||||||
st.mods.clear();
|
st.mods.clear();
|
||||||
ListTag lMods = tag.get("mods") as ListTag;
|
ListTag lMods = tag.get("mods") as ListTag;
|
||||||
|
|
Loading…
Reference in a new issue