Fusion debug
This commit is contained in:
@@ -313,27 +313,34 @@ class FlowChartState<T extends FlowData> extends State<FlowChart> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
if (!widget.dashboard.isOpened && widget.onDashboardAlertOpened != null ) {
|
||||
if (widget.dashboard.id != null) {
|
||||
widget.dashboard.isOpened = true;
|
||||
Future.delayed(Duration(milliseconds: 100), () => widget.dashboard.load!(widget.dashboard.id!) );
|
||||
Future.delayed(const Duration(milliseconds: 100), () => widget.dashboard.load!(widget.dashboard.id!) );
|
||||
} else {
|
||||
Future.delayed(Duration(milliseconds: 100), () {
|
||||
if (!widget.dashboard.inDialog) {
|
||||
widget.dashboard.inDialog = true;
|
||||
showDialog(
|
||||
barrierDismissible: false,
|
||||
context: context, builder: (context) {
|
||||
return AlertDialog(
|
||||
titlePadding: EdgeInsets.zero,
|
||||
insetPadding: EdgeInsets.zero,
|
||||
backgroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(0)),
|
||||
title: widget.onDashboardAlertOpened!(context, widget.dashboard));
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
try {
|
||||
Future.delayed(const Duration(milliseconds: 100), () {
|
||||
if (!widget.dashboard.inDialog) {
|
||||
widget.dashboard.inDialog = true;
|
||||
showDialog(
|
||||
barrierDismissible: false,
|
||||
context: context, builder: (context) {
|
||||
return AlertDialog(
|
||||
titlePadding: EdgeInsets.zero,
|
||||
insetPadding: EdgeInsets.zero,
|
||||
backgroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(0)),
|
||||
title: widget.onDashboardAlertOpened!(context, widget.dashboard));
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
widget.dashboard.id = null;
|
||||
widget.dashboard.name = "";
|
||||
widget.dashboard.isOpened = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
widget.dashboard.isOpened = true;
|
||||
@@ -816,9 +823,9 @@ class ChartWidgetState<T extends FlowData> extends State<ChartWidget> {
|
||||
for (int i = 0; i < widget.dashboard.elements.length; i++)
|
||||
ElementWidget<T>(
|
||||
key: UniqueKey(),
|
||||
bottomLeftBadge: widget.flowChart.widget.itemLeftBottomBadges != null ?
|
||||
bottomLeftBadge: widget.flowChart.widget.itemLeftBottomBadges != null && widget.dashboard.elements[i].element != null ?
|
||||
widget.flowChart.widget.itemLeftBottomBadges!(widget.dashboard.elements[i].element as T) : null,
|
||||
topRightBadge: widget.flowChart.widget.itemrightTopBadges != null ?
|
||||
topRightBadge: widget.flowChart.widget.itemrightTopBadges != null && widget.dashboard.elements[i].element != null ?
|
||||
widget.flowChart.widget.itemrightTopBadges!(widget.dashboard.elements[i].element as T) : null,
|
||||
dashboard: widget.dashboard,
|
||||
element: widget.dashboard.elements.elementAt(i),
|
||||
|
||||
@@ -23,19 +23,19 @@ class FlowChartMenuState extends State<FlowChartMenu> {
|
||||
return Row( mainAxisAlignment: MainAxisAlignment.end, children : [ Container( // SHORTCUT
|
||||
width: widget.width,
|
||||
height: 50,
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
padding: const EdgeInsets.only(left: 20),
|
||||
color: widget.dashboard.dashColor,
|
||||
child: Row( children : [ Expanded(flex: 2, child: Row( children: [
|
||||
widget.chart.widget.flowChart.widget.onDashboardAlertOpened == null ? Container() : Container(
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(right: BorderSide(color: Colors.white, width: 1))
|
||||
),
|
||||
child: Row( children: [
|
||||
Tooltip( message: "open file", child:Container( child:
|
||||
Padding( padding: EdgeInsets.only(right: 15),
|
||||
Tooltip( message: "open file", child: Padding( padding: const EdgeInsets.only(right: 15),
|
||||
child: InkWell( mouseCursor: SystemMouseCursors.click,
|
||||
onTap: () {
|
||||
widget.dashboard.name = "graph_${DateTime.now().toString().replaceAll(" ", "_").substring(0, DateTime.now().toString().length - 7)}";
|
||||
widget.dashboard.id = null;
|
||||
widget.dashboard.name = "";
|
||||
widget.dashboard.isOpened = true;
|
||||
if (!widget.dashboard.inDialog) {
|
||||
widget.dashboard.inDialog = true;
|
||||
@@ -52,7 +52,7 @@ class FlowChartMenuState extends State<FlowChartMenu> {
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Icon(Icons.folder, color: Colors.white))))),
|
||||
child: Icon(Icons.folder, color: Colors.white)))),
|
||||
])),
|
||||
InkWell( mouseCursor: SystemMouseCursors.click, child: Container(
|
||||
decoration: BoxDecoration(
|
||||
|
||||
Reference in New Issue
Block a user