missing files

This commit is contained in:
mr
2025-02-05 09:07:39 +01:00
parent 05854c84d8
commit bed48b4cb4
31 changed files with 947 additions and 681 deletions

View File

@@ -94,7 +94,9 @@ class ShallowDropdownInputWidgetState extends State<ShallowDropdownInputWidget>
child:InkWell(
mouseCursor: SystemMouseCursors.click,
onTap: () async {
if (widget.canLoad == null || !widget.canLoad!(widget.current) || widget.load == null || widget.current == null) {
print("load ${widget.current}");
if (widget.canLoad == null || !widget.canLoad!(widget.current)
|| widget.load == null || widget.current == null) {
return;
}
await widget.load!(widget.current!);

View File

@@ -54,6 +54,8 @@ class ShallowTextInputWidget extends StatefulWidget {
}
}
class ShallowTextInputWidgetState extends State<ShallowTextInputWidget> {
TextEditingController ctrl = TextEditingController();
bool validForms() {
for (var form in widget.forms) {
if (!form.validate()) {
@@ -65,6 +67,7 @@ class ShallowTextInputWidgetState extends State<ShallowTextInputWidget> {
@override Widget build(BuildContext context) {
var t = widget.type == CollaborativeAreaType.workspace ? "workspace" : (widget.type == CollaborativeAreaType.workflow ? "workflow" : "peer");
ctrl.text = widget.current ?? "";
return Row( mainAxisAlignment: widget.alignment, children: [
Tooltip( message: widget.hint ?? "current $t", child:
Theme(
@@ -83,7 +86,7 @@ class ShallowTextInputWidgetState extends State<ShallowTextInputWidget> {
}
});
},
initialValue: widget.current,
controller: ctrl,
style: TextStyle(color: widget.color ?? Colors.black, fontSize: 15),
decoration: InputDecoration(
filled: true,

View File

@@ -4,10 +4,11 @@ class SubDropdownInputWidget extends StatefulWidget {
String subkey;
double width;
bool empty;
String? initialValue;
List<DropdownMenuItem<String>> dropdownMenuEntries = [];
void Function(String?)? change = (value) {};
SubDropdownInputWidget ({ Key? key, required this.dropdownMenuEntries,
required this.subkey, required this.width, required this.empty, required this.change }): super(key: key);
SubDropdownInputWidget ({ super.key, required this.dropdownMenuEntries, this.initialValue,
required this.subkey, required this.width, required this.empty, required this.change });
@override SubDropdownInputWidgetState createState() => SubDropdownInputWidgetState();
}
class SubDropdownInputWidgetState extends State<SubDropdownInputWidget> {
@@ -17,9 +18,11 @@ class SubDropdownInputWidgetState extends State<SubDropdownInputWidget> {
child: Container( margin: EdgeInsets.only(top: widget.empty ? 0 : 15),
width: widget.width, height: 30,
child: DropdownButtonFormField(
isExpanded: true,
items: widget.dropdownMenuEntries,
value: widget.initialValue,
onChanged: widget.change,
style: const TextStyle(fontSize: 12),
style: const TextStyle(fontSize: 12,color: Colors.black, overflow: TextOverflow.ellipsis),
decoration: InputDecoration(
hintText: "select ${widget.subkey}...",
fillColor: Colors.white,

View File

@@ -10,9 +10,10 @@ class SubTextInputWidget extends StatefulWidget {
bool empty;
bool noLabel;
bool readOnly = false;
bool copyLabel = false;
void Function(String) change = (value) {};
SubTextInputWidget ({ Key? key,
required this.subkey, this.readOnly = false, this.noLabel = false,
required this.subkey, this.readOnly = false, this.noLabel = false, this.copyLabel = false,
this.initialValue, required this.width, required this.empty, required this.change }):
super(key: key);
@override SubTextInputWidgetState createState() => SubTextInputWidgetState();
@@ -47,7 +48,7 @@ class SubTextInputWidgetState extends State<SubTextInputWidget> {
),
))),
widget.readOnly ? InkWell( onTap: () {
Clipboard.setData(ClipboardData(text: widget.initialValue!));
Clipboard.setData(ClipboardData(text: widget.copyLabel ? "\$${widget.subkey}" : widget.initialValue!));
showAlertBanner(context, () {}, const InfoAlertBannerChild(text: "successfully add to clipboard"), // <-- Put any widget here you want!
alertBannerLocation: AlertBannerLocation.bottom,);
}, child: Container( margin: EdgeInsets.only(left: 5, top: widget.empty ? 0 : 15),