moved editing page to popup
All checks were successful
Build CI / AMD64 Build (push) Successful in 1m54s

This commit is contained in:
2026-03-11 01:10:25 +05:30
parent cee48b3e4b
commit ce25d26f70
10 changed files with 164 additions and 181 deletions

View File

@@ -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(),
);
}
}