Splendid keyboard detector
This commit is contained in:
@@ -11,7 +11,7 @@ import 'package:oc_front/models/search.dart';
|
||||
import 'package:oc_front/pages/abstract_page.dart';
|
||||
import 'package:oc_front/widgets/dialog/new_box.dart';
|
||||
import 'package:oc_front/widgets/items/item_row.dart';
|
||||
|
||||
Dashboard dash = Dashboard(name: "workflow_${DateTime.now().toString().replaceAll(" ", "_").substring(0, DateTime.now().toString().length - 7)}");
|
||||
class WorkflowFactory implements AbstractFactory {
|
||||
static GlobalKey<WorkflowPageWidgetState> key = GlobalKey<WorkflowPageWidgetState>();
|
||||
@override bool searchFill() { return false; }
|
||||
@@ -54,10 +54,10 @@ final WorflowService _service = WorflowService();
|
||||
}
|
||||
@override Widget build(BuildContext context) {
|
||||
var quart = MediaQuery.of(context).size.width / 6;
|
||||
dash.defaultName = "workflow_${DateTime.now().toString().replaceAll(" ", "_").substring(0, DateTime.now().toString().length - 7)}";
|
||||
return FlowChart<AbstractItem>(
|
||||
onDashboardAlertOpened: onDashboardAlertOpened,
|
||||
dashboard: Dashboard(
|
||||
name: "workflow_${DateTime.now().toString().replaceAll(" ", "_").substring(0, DateTime.now().toString().length - 7)}"),
|
||||
dashboard: dash,
|
||||
itemWidget: itemBuild,
|
||||
categories: const ["computing", "data", "datacenter", "storage"],
|
||||
draggableItemBuilder: (cat) => WorkspaceLocal.byTopic(cat).toList(),
|
||||
@@ -78,6 +78,6 @@ final WorflowService _service = WorflowService();
|
||||
onHandlerPressed: (context, position, handler, element) { },
|
||||
onHandlerLongPressed: (context, position, handler, element) { },
|
||||
onPivotSecondaryPressed: (context, pivot) { },
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -41,9 +41,11 @@ class NewBoxWidgetState<T extends SerializerDeserializer<dynamic>> extends State
|
||||
child: Text(widget._selected.toString()),
|
||||
));
|
||||
}
|
||||
return SizedBox( width: 400, height: 50, child: DropdownButtonFormField(
|
||||
return SizedBox( width: MediaQuery.of(context).size.width <= 540 ? MediaQuery.of(context).size.width - 140 : 400, height: 50,
|
||||
child: DropdownButtonFormField(
|
||||
value: widget._selected,
|
||||
hint: const Text("select workflow to load...", style: TextStyle(color: Colors.grey, fontSize: 15)),
|
||||
isExpanded: true,
|
||||
hint: const Text("load workflow...", style: TextStyle(color: Colors.grey, fontSize: 15)),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
focusedBorder: const OutlineInputBorder( borderRadius: BorderRadius.zero,
|
||||
@@ -105,9 +107,12 @@ class NewBoxWidgetState<T extends SerializerDeserializer<dynamic>> extends State
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets.only(top: 10),
|
||||
width: 450,
|
||||
width: MediaQuery.of(context).size.width <= 540 ? MediaQuery.of(context).size.width - 90 : 450,
|
||||
height: 50,
|
||||
child: TextFormField(
|
||||
expands: true,
|
||||
maxLines: null,
|
||||
minLines: null,
|
||||
cursorColor: const Color.fromARGB(38, 166, 154, 1),
|
||||
controller: widget._ctrl,
|
||||
onChanged: (value) => setState(() { widget._ctrl.value = TextEditingValue(text: value); }),
|
||||
@@ -116,7 +121,7 @@ class NewBoxWidgetState<T extends SerializerDeserializer<dynamic>> extends State
|
||||
hintText: "name a new workflow...",
|
||||
fillColor: Colors.grey.shade300,
|
||||
filled: true,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 30, vertical: 20),
|
||||
contentPadding: const EdgeInsets.only(left: 30, right: 30, top: 15, bottom: 5),
|
||||
hintStyle: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
|
||||
Reference in New Issue
Block a user