Apply dart autofix
This commit is contained in:
parent
093bb2fb02
commit
5e647f6f32
5 changed files with 32 additions and 35 deletions
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:libac_dart/nbt/Tag.dart';
|
||||
import 'package:libac_dart/nbt/impl/ByteArrayTag.dart';
|
||||
import 'package:libac_dart/nbt/impl/IntArrayTag.dart';
|
||||
|
@ -63,9 +62,9 @@ class AddState extends State<AddPage> {
|
|||
if (!(isArray || isList)) {
|
||||
var reply = await showDialog(
|
||||
context: context,
|
||||
routeSettings: RouteSettings(arguments: ""),
|
||||
routeSettings: const RouteSettings(arguments: ""),
|
||||
builder: (builder) {
|
||||
return RenamePrompt();
|
||||
return const RenamePrompt();
|
||||
});
|
||||
newTagName = reply as String;
|
||||
}
|
||||
|
@ -84,7 +83,7 @@ class AddState extends State<AddPage> {
|
|||
context: context,
|
||||
routeSettings: RouteSettings(arguments: nTag),
|
||||
builder: (builder) {
|
||||
return EditValuePrompt();
|
||||
return const EditValuePrompt();
|
||||
});
|
||||
val = reply;
|
||||
}
|
||||
|
@ -135,7 +134,7 @@ class AddState extends State<AddPage> {
|
|||
if (isList || isArray && !canAddAnyType && singleShot) {
|
||||
singleShot = false;
|
||||
|
||||
Future.delayed(Duration(seconds: 2), () {
|
||||
Future.delayed(const Duration(seconds: 2), () {
|
||||
processTagType(allowedTagTypes[0]);
|
||||
});
|
||||
}
|
||||
|
@ -146,7 +145,7 @@ class AddState extends State<AddPage> {
|
|||
backgroundColor: Constants.TITLEBAR_COLOR,
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: ListView.builder(
|
||||
itemBuilder: (builder, index) {
|
||||
return ListTile(
|
||||
|
|
|
@ -3,6 +3,8 @@ import 'package:libac_dart/nbt/Tag.dart';
|
|||
import 'package:libac_dart/nbt/impl/StringTag.dart';
|
||||
|
||||
class EditValuePrompt extends StatefulWidget {
|
||||
const EditValuePrompt({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return EditValueState();
|
||||
|
@ -22,7 +24,7 @@ class EditValueState extends State<EditValuePrompt> {
|
|||
if (args == null) return;
|
||||
|
||||
if (args is Tag) {
|
||||
Tag tag = args as Tag;
|
||||
Tag tag = args;
|
||||
setState(() {
|
||||
TagValueType = tag.getTagType();
|
||||
MainTag = tag;
|
||||
|
@ -35,7 +37,7 @@ class EditValueState extends State<EditValuePrompt> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
icon: Icon(Icons.edit_document),
|
||||
icon: const Icon(Icons.edit_document),
|
||||
title: Text("Edit Value - ${MainTag.getKey()}"),
|
||||
actions: [
|
||||
ElevatedButton(
|
||||
|
@ -64,16 +66,16 @@ class EditValueState extends State<EditValuePrompt> {
|
|||
}
|
||||
Navigator.pop(context, val);
|
||||
},
|
||||
child: Text("Submit")),
|
||||
child: const Text("Submit")),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text("Cancel"))
|
||||
child: const Text("Cancel"))
|
||||
],
|
||||
content: TextField(
|
||||
controller: TEC,
|
||||
decoration: InputDecoration(border: OutlineInputBorder()),
|
||||
decoration: const InputDecoration(border: OutlineInputBorder()),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue