moved editing page to popup
All checks were successful
Build CI / AMD64 Build (push) Successful in 1m54s
All checks were successful
Build CI / AMD64 Build (push) Successful in 1m54s
This commit is contained in:
@@ -3,7 +3,6 @@ import "package:prod/models/editor.dart";
|
||||
import "package:prod/models/globalModel.dart";
|
||||
import "package:prod/models/project.dart";
|
||||
import "package:provider/provider.dart";
|
||||
import "package:yaru/yaru.dart";
|
||||
|
||||
class EditorSelector extends StatelessWidget {
|
||||
const EditorSelector(this.turns, this.id, {super.key});
|
||||
@@ -23,25 +22,28 @@ class EditorSelector extends StatelessWidget {
|
||||
quarterTurns: turns,
|
||||
),
|
||||
onSelected: (a) {
|
||||
// print("$a");
|
||||
prj.setEditor(turns, a ?? "");
|
||||
gm.updatePrj(id, prj);
|
||||
},
|
||||
|
||||
dropdownMenuEntries: Provider.of<GlobalModel>(context).editors.map((a) {
|
||||
return DropdownMenuEntry(
|
||||
label: a.name,
|
||||
labelWidget: Column(
|
||||
crossAxisAlignment: .start,
|
||||
mainAxisAlignment: .center,
|
||||
children: [
|
||||
Text("${a.name}", style: TextStyle(fontSize: 20)),
|
||||
Text("${a.commandTemplate}", style: TextStyle(fontSize: 12)),
|
||||
],
|
||||
),
|
||||
value: a.id,
|
||||
);
|
||||
}).toList(),
|
||||
dropdownMenuEntries:
|
||||
[
|
||||
const Editor("", "None", "", "", ""),
|
||||
...Provider.of<GlobalModel>(context).editors,
|
||||
].map((a) {
|
||||
return DropdownMenuEntry(
|
||||
label: a.name,
|
||||
labelWidget: Column(
|
||||
crossAxisAlignment: .start,
|
||||
mainAxisAlignment: .center,
|
||||
children: [
|
||||
Text("${a.name}", style: TextStyle(fontSize: 20)),
|
||||
Text("${a.commandTemplate}", style: TextStyle(fontSize: 12)),
|
||||
],
|
||||
),
|
||||
value: a.id,
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user