intermediate
This commit is contained in:
179
lib/widgets/sheduler_items/schedule.dart
Normal file
179
lib/widgets/sheduler_items/schedule.dart
Normal file
@@ -0,0 +1,179 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:oc_front/core/sections/header/header.dart';
|
||||
import 'package:oc_front/core/services/specialized_services/logs_service.dart';
|
||||
import 'package:oc_front/models/logs.dart';
|
||||
import 'package:oc_front/models/workflow.dart';
|
||||
import 'package:oc_front/widgets/logs.dart';
|
||||
import 'package:oc_front/widgets/sheduler_items/scheduler_calendar.dart';
|
||||
import 'package:oc_front/widgets/sheduler_items/scheduler_item.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class ScheduleWidget extends StatefulWidget {
|
||||
DateTime start;
|
||||
DateTime end;
|
||||
bool isDayPlanner = true;
|
||||
Map<String, List<WorkflowExecution>> data;
|
||||
bool isList = true;
|
||||
ScheduleWidget ({ super.key, required this.data, required this.start, required this.end, this.isList = true });
|
||||
@override ScheduleWidgetState createState() => ScheduleWidgetState();
|
||||
}
|
||||
class ScheduleWidgetState extends State<ScheduleWidget> {
|
||||
LogsService _service = LogsService();
|
||||
String? selected;
|
||||
String? selectedReal;
|
||||
List<Color> colors = [Colors.blue, Colors.orange, Colors.red, Colors.green];
|
||||
List<String> titles = ["SCHEDULED", "RUNNING", "FAILURE", "SUCCESS"];
|
||||
|
||||
DateTime getFocusedDay() {
|
||||
if (selected != null) { return DateTime.parse(selected!); }
|
||||
return DateTime.now();
|
||||
}
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
bool isInfo = MediaQuery.of(context).size.width <= 600 && selected != null;
|
||||
double w = selected != null ? MediaQuery.of(context).size.width - 300 : MediaQuery.of(context).size.width;
|
||||
List<Widget> children = [];
|
||||
if (selected != null) {
|
||||
for (var wf in widget.data[selected!] ?? (<WorkflowExecution>[])) {
|
||||
DateTime d2 = DateTime.parse(wf.executionData!);
|
||||
children.add( InkWell(
|
||||
onTap: () => setState(() { selectedReal = wf.executionData; }),
|
||||
child: Container( margin: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: selectedReal != null && selectedReal == wf.executionData ? const Color.fromRGBO(38, 166, 154, 1) : Colors.transparent, width: 2),
|
||||
borderRadius: BorderRadius.circular(4), color: Colors.white
|
||||
),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 20),
|
||||
child: Row(children: [
|
||||
Container( width: 10, height: 10,
|
||||
decoration: BoxDecoration(
|
||||
color: colors[(wf.status ?? 1) - 1],
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
),
|
||||
Container( width: (400 - 250),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 20),
|
||||
child: Text(wf.name?.toUpperCase() ?? "", overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(color: Colors.black, fontSize: 12, fontWeight: FontWeight.w500)),
|
||||
)),
|
||||
Container(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 20),
|
||||
child: Text("${d2.hour > 9 ? d2.hour : "0${d2.hour}"}:${d2.minute > 9 ? d2.minute : "0${d2.minute}"}", overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontSize: 15,
|
||||
color: Colors.grey, fontWeight: FontWeight.w500))))
|
||||
])
|
||||
))
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
String? selectedID;
|
||||
String? start;
|
||||
String? end;
|
||||
if (selectedReal != null) {
|
||||
try {
|
||||
var sel = widget.data[selected!]!.firstWhere((element) => element.executionData == selectedReal);
|
||||
selectedID = sel.id;
|
||||
print(sel.endDate);
|
||||
if (sel.endDate != null && sel.endDate != "") {
|
||||
var startD = DateTime.parse(sel.executionData!);
|
||||
var endD = DateTime.parse(sel.endDate!);
|
||||
var diff = endD.difference(startD);
|
||||
if (diff.inDays < 30) {
|
||||
var rest = ((30 - diff.inDays) ~/ 2) - 1;
|
||||
start = (startD.subtract(Duration(days: rest)).microsecondsSinceEpoch).toString();
|
||||
end = (endD.add(Duration(days: rest)).microsecondsSinceEpoch).toString();
|
||||
} else {
|
||||
start = (startD.microsecondsSinceEpoch).toString();
|
||||
end = (startD.add( const Duration(days: 29)).microsecondsSinceEpoch).toString();
|
||||
}
|
||||
} else {
|
||||
start = (DateTime.parse(sel.executionData!).subtract( const Duration(days: 14)).microsecondsSinceEpoch).toString();
|
||||
end = (DateTime.parse(sel.executionData!).add( const Duration(days: 14)).microsecondsSinceEpoch).toString();
|
||||
}
|
||||
} catch(e) { /* */ }
|
||||
}
|
||||
return Row( children: [
|
||||
isInfo ? Container() : SizedBox( width: w,
|
||||
child: widget.isList ? SchedulerItemWidget(data: widget.data, parent: this, focusedDay: getFocusedDay(), width: w)
|
||||
: SchedulerCalendarWidget(data: widget.data, start: widget.start,
|
||||
end: widget.end, parent: this, focusedDay: getFocusedDay(),)
|
||||
),
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height - HeaderConstants.height - 50,
|
||||
width: isInfo ? MediaQuery.of(context).size.width : (selected != null ? 300 : 0),
|
||||
color: Colors.grey.shade300,
|
||||
child: Column(
|
||||
children: [
|
||||
Row( children: [
|
||||
InkWell( onTap: () => setState(() { widget.isDayPlanner = true; }),
|
||||
child: Tooltip( message: "day planning", child:
|
||||
Container( height: 50, width: (isInfo ? MediaQuery.of(context).size.width : (selected != null ? 300 : 0)) / (selectedReal != null ? 2 : 1 ),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: widget.isDayPlanner ? Colors.grey : Colors.transparent,
|
||||
border: Border(bottom: BorderSide(color: Colors.grey.shade400), right: BorderSide(color: Colors.grey.shade400))),
|
||||
child: Icon(Icons.calendar_today_outlined, color: widget.isDayPlanner ? Colors.white : Colors.grey),
|
||||
)
|
||||
)),
|
||||
InkWell( onTap: () => setState(() { widget.isDayPlanner = false; }),
|
||||
child: Tooltip( message: "monitor task", child:
|
||||
Container( height: 50, width: selectedReal == null ? 0 : ((isInfo ? MediaQuery.of(context).size.width : (selected != null ? 300 : 0)) / 2),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: !widget.isDayPlanner ? Colors.grey : Colors.transparent,
|
||||
border: Border(bottom: BorderSide(color: Colors.grey.shade400))
|
||||
),
|
||||
child: Icon(Icons.monitor_heart_outlined, size: 25,
|
||||
color: !widget.isDayPlanner ? Colors.white : Colors.grey),
|
||||
)
|
||||
))
|
||||
]),
|
||||
Container( width: isInfo ? MediaQuery.of(context).size.width : (selected != null ? 300 : 0), height: MediaQuery.of(context).size.height - HeaderConstants.height - 100,
|
||||
child: SingleChildScrollView( child: Column(
|
||||
mainAxisAlignment: children.isEmpty ? MainAxisAlignment.center : MainAxisAlignment.start,
|
||||
children: [
|
||||
...( widget.isDayPlanner ? children : ( selectedID != null ? [
|
||||
FutureBuilder(future: _service.search(context, [], {
|
||||
"workflow_execution_id": selectedID,
|
||||
"start": start,
|
||||
"end": end
|
||||
}), builder: (ctx, as) {
|
||||
var speLog = Log(level: "error", timestamp: DateTime.now());
|
||||
speLog.getMessage("{\"Name\":\"oc-monitor-unonip-fauta9hswg\",\"Namespace\":\"argo\",\"Status\":\"Pending\",\"PodRunning\":false,\"Completed\":false,\"Created\":\"Tue Aug 06 11:33:52 +0200 (now)\",\"Started\":\"\",\"Duration\":\"\",\"Progress\":\"\"}");
|
||||
var speLog2 = Log(level: "warning", timestamp: DateTime.now());
|
||||
speLog2.getMessage("{\"Name\":\"oc-monitor-unonip-fauta9hswg\",\"Namespace\":\"argo\",\"Status\":\"Running\",\"PodRunning\":false,\"Completed\":false,\"Created\":\"Tue Aug 06 11:33:52 +0200 (now)\",\"Started\":\"Tue Aug 06 11:33:52 +0200 (now)\",\"Duration\":\"0 seconds\",\"Progress\":\"0/1\"}");
|
||||
List<Log> logs = [
|
||||
Log(
|
||||
level: "info",
|
||||
message: "No logs found",
|
||||
timestamp: DateTime.now()
|
||||
),
|
||||
speLog,
|
||||
speLog2
|
||||
];
|
||||
if (as.hasData && as.data!.data != null) {
|
||||
var d = as.data!.data!;
|
||||
for( var r in d.data?.result ?? <Logs> []) {
|
||||
for (var element in r.logs) {
|
||||
element.level = r.level;
|
||||
logs.add(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
logs.sort((a, b) => a.timestamp!.compareTo(b.timestamp!));
|
||||
return LogsWidget(items: logs);
|
||||
})
|
||||
] : [])),
|
||||
children.isEmpty ? Container( height: 100, alignment: Alignment.center, child: const Text("No event found", style: const TextStyle(color: Colors.grey, fontSize: 20))) : Container()
|
||||
]))
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
175
lib/widgets/sheduler_items/scheduler_calendar.dart
Normal file
175
lib/widgets/sheduler_items/scheduler_calendar.dart
Normal file
@@ -0,0 +1,175 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:oc_front/core/sections/header/header.dart';
|
||||
import 'package:oc_front/models/workflow.dart';
|
||||
import 'package:oc_front/widgets/sheduler_items/schedule.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class SchedulerCalendarWidget extends StatefulWidget {
|
||||
Map<String, List<WorkflowExecution>> data;
|
||||
DateTime start;
|
||||
DateTime end;
|
||||
DateTime focusedDay;
|
||||
CalendarFormat format = CalendarFormat.month;
|
||||
bool enabled = true;
|
||||
ScheduleWidgetState? parent;
|
||||
SchedulerCalendarWidget ({ super.key,
|
||||
required this.data,
|
||||
required this.start,
|
||||
required this.end,
|
||||
required this.parent,
|
||||
required this.focusedDay,
|
||||
this.enabled = true});
|
||||
@override SchedulerCalendarWidgetState createState() => SchedulerCalendarWidgetState();
|
||||
}
|
||||
class SchedulerCalendarWidgetState extends State<SchedulerCalendarWidget> {
|
||||
List<Color> colors = [Colors.blue, Colors.orange, Colors.red, Colors.green];
|
||||
List<String> titles = ["SCHEDULED", "RUNNING", "FAILURE", "SUCCESS"];
|
||||
bool isEvent(Map<String, List<WorkflowExecution>> data, DateTime day) {
|
||||
if (data[day.toIso8601String()] == null || data[day.toIso8601String()]!.isEmpty) { return false; }
|
||||
return true;
|
||||
}
|
||||
@override Widget build(BuildContext context) {
|
||||
widget.focusedDay = widget.focusedDay.isBefore(widget.start) ? widget.start : (
|
||||
widget.focusedDay.isAfter(widget.end) ? widget.end : widget.focusedDay );
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20),
|
||||
height: MediaQuery.of(context).size.height - HeaderConstants.height - 50,
|
||||
child: TableCalendar<Event>(
|
||||
firstDay: widget.start,
|
||||
lastDay: widget.end,
|
||||
focusedDay: widget.focusedDay,
|
||||
calendarStyle: const CalendarStyle(
|
||||
markersMaxCount: 3,
|
||||
markersAnchor: 0,
|
||||
markersAlignment: Alignment.topCenter
|
||||
),
|
||||
selectedDayPredicate: (day) => day == widget.focusedDay,
|
||||
calendarFormat: widget.format,
|
||||
calendarBuilders: CalendarBuilders(
|
||||
markerBuilder: (context, day, events) {
|
||||
List<Widget> children = [];
|
||||
for (var ev in events) {
|
||||
if (children.length == 2 && events.length > 3) {
|
||||
children.add( InkWell( onTap: () => widget.parent!.setState(() {
|
||||
widget.parent!.selected = day.toIso8601String();
|
||||
widget.parent!.selectedReal = null;
|
||||
widget.parent!.widget.isDayPlanner = true;
|
||||
}),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
color: Colors.grey.shade300,
|
||||
),
|
||||
child: const Text("...", style: TextStyle(color: Colors.white, fontSize: 10)),
|
||||
)));
|
||||
break;
|
||||
}
|
||||
children.add(InkWell( onTap: () => widget.parent!.setState(() {
|
||||
widget.parent!.selected = day.toIso8601String();
|
||||
widget.parent!.selectedReal = ev.executionData;
|
||||
if (widget.parent!.selectedReal == null) {
|
||||
widget.parent!.widget.isDayPlanner = true;
|
||||
}
|
||||
}),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
color: ev.color,
|
||||
),
|
||||
child: Text(ev.title.length < 30 ? ev.title : "${ev.title.substring(0, 28)}...", style: const TextStyle(color: Colors.white, fontSize: 10)),
|
||||
)));
|
||||
}
|
||||
return Column(mainAxisAlignment: MainAxisAlignment.center, children: children);
|
||||
},
|
||||
defaultBuilder: (context, date, events) => Container(
|
||||
alignment: Alignment.center,
|
||||
margin:const EdgeInsets.all(2.0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.grey.shade300),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: !isEvent(widget.data, date) ? Text(
|
||||
date.day.toString(),
|
||||
style: const TextStyle(color: Colors.grey),
|
||||
) : Column( children: [ Container( padding: const EdgeInsets.symmetric(vertical: 5), child: Text(
|
||||
date.day.toString(),
|
||||
style: const TextStyle(color: Colors.grey),
|
||||
)) ])
|
||||
),
|
||||
outsideBuilder: (context, day, focusedDay) => Container(
|
||||
alignment: Alignment.center,
|
||||
margin: const EdgeInsets.all(2.0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.grey.shade300),
|
||||
color: Colors.grey.shade300,
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: Text(
|
||||
day.day.toString(),
|
||||
style: const TextStyle(color: Colors.black),
|
||||
),
|
||||
),
|
||||
selectedBuilder: (context, date, events) => Container(
|
||||
alignment: Alignment.center,
|
||||
margin: const EdgeInsets.all(2.0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: const Color.fromRGBO(38, 166, 154, 1), width: 2),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: !isEvent(widget.data, date) ? Text(
|
||||
date.day.toString(),
|
||||
style: const TextStyle(color: Colors.grey),
|
||||
) : Column( children: [ Container( padding: const EdgeInsets.symmetric(vertical: 5), child: Text(
|
||||
date.day.toString(),
|
||||
style: const TextStyle(color: Colors.grey),
|
||||
)) ]),
|
||||
),
|
||||
todayBuilder: (context, date, events) => Container(
|
||||
margin: const EdgeInsets.all(2.0),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromRGBO(38, 166, 154, .5),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(color: Colors.grey),
|
||||
),
|
||||
child: Text(
|
||||
date.day.toString(),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
onFormatChanged: (format) => setState(() {
|
||||
widget.format = format;
|
||||
}),
|
||||
onDaySelected: (selectedDay, focusedDay) {
|
||||
widget.parent!.setState(() {
|
||||
widget.parent!.selected = selectedDay.toIso8601String();
|
||||
widget.parent!.selectedReal = null;
|
||||
widget.parent!.widget.isDayPlanner = true;
|
||||
});
|
||||
},
|
||||
shouldFillViewport: true,
|
||||
eventLoader: (day) {
|
||||
return widget.data[day.toIso8601String()] != null ? widget.data[day.toIso8601String()]!.map((e) {
|
||||
DateTime dateTime = DateTime.parse(e.executionData!);
|
||||
return Event("[${dateTime.hour > 9 ? dateTime.hour : "0${dateTime.hour}"}:${dateTime.minute > 9 ? dateTime.minute : "0${dateTime.minute}"}] ${e.name}",
|
||||
colors[(e.status ?? 1) - 1], e.executionData );
|
||||
}).toList() : [];
|
||||
},
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
class Event {
|
||||
final String title;
|
||||
String? executionData;
|
||||
Color color;
|
||||
|
||||
Event(this.title, this.color, this.executionData);
|
||||
|
||||
@override
|
||||
String toString() => title;
|
||||
}
|
||||
115
lib/widgets/sheduler_items/scheduler_item.dart
Normal file
115
lib/widgets/sheduler_items/scheduler_item.dart
Normal file
@@ -0,0 +1,115 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:oc_front/core/sections/header/header.dart';
|
||||
import 'package:oc_front/models/workflow.dart';
|
||||
import 'package:oc_front/widgets/sheduler_items/schedule.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class SchedulerItemWidget extends StatefulWidget {
|
||||
Map<String, List<WorkflowExecution>> data;
|
||||
bool enabled = true;
|
||||
DateTime focusedDay;
|
||||
double width = 0;
|
||||
ScheduleWidgetState? parent;
|
||||
Map<String, GlobalKey> keys = {};
|
||||
SchedulerItemWidget ({ super.key, required this.data, required this.focusedDay,
|
||||
this.enabled = true, required this.parent, this.width = 0});
|
||||
@override SchedulerItemWidgetState createState() => SchedulerItemWidgetState();
|
||||
}
|
||||
class SchedulerItemWidgetState extends State<SchedulerItemWidget> {
|
||||
List<Color> colors = [Colors.blue, Colors.orange, Colors.red, Colors.green];
|
||||
List<String> titles = ["SCHEDULED", "RUNNING", "FAILURE", "SUCCESS"];
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
List<Widget> children = [];
|
||||
for (var element in widget.data.keys.toList()..sort((a, b) => DateTime.parse(a).compareTo(DateTime.parse(b)))) {
|
||||
List<Widget> widgets = [];
|
||||
for (var ev in widget.data[element] ?? ([] as List<WorkflowExecution>)) {
|
||||
widget.keys[ev.executionData!] = GlobalKey();
|
||||
var d2 = DateTime.parse(ev.executionData!);
|
||||
DateTime? d3;
|
||||
try {
|
||||
d3 = DateTime.parse(ev.endDate!);
|
||||
} catch (e) { /* */ }
|
||||
widgets.add(InkWell(
|
||||
onTap: () => widget.parent?.setState(() {
|
||||
widget.parent?.selected = widget.parent?.selected != element ? element : null;
|
||||
widget.parent?.selectedReal = widget.parent?.selected == null ? null : ev.executionData;
|
||||
if (widget.parent!.selectedReal == null) {
|
||||
widget.parent!.widget.isDayPlanner = true;
|
||||
}
|
||||
}),
|
||||
child: Container( key: widget.keys[ev.executionData!],
|
||||
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 50),
|
||||
decoration: BoxDecoration(
|
||||
border: widget.parent?.selected == element ? Border.all(color: const Color.fromRGBO(38, 166, 154, 1), width: 2)
|
||||
: Border(top: BorderSide(color: Colors.grey.shade300)),
|
||||
),
|
||||
child: Row(children: [
|
||||
Container( width: 110,
|
||||
decoration: BoxDecoration(
|
||||
color: colors[(ev.status ?? 1) - 1],
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 5),
|
||||
child: Text(titles[(ev.status ?? 1) - 1],
|
||||
overflow: TextOverflow.ellipsis, textAlign: TextAlign.center,
|
||||
style: const TextStyle( color: Colors.white))
|
||||
),
|
||||
SizedBox( width: (widget.width - 312) / 2,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 20),
|
||||
child: Text(ev.name?.toUpperCase() ?? "", overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(color: Colors.black, fontWeight: FontWeight.w500)),
|
||||
)),
|
||||
SizedBox( width: (widget.width - 312) / 2,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 20),
|
||||
child: Container( padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Text(d3 != null ? "killed at ${d3.day}/${d3.month}/${d3.year} ${d3.hour}:${d3.minute}"
|
||||
: "infinite run till process end", overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle( fontSize: 12, color: Colors.grey, fontWeight: FontWeight.w500))),
|
||||
)),
|
||||
SizedBox(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 20),
|
||||
child: Text("${d2.hour > 9 ? d2.hour : "0${d2.hour}"}:${d2.minute > 9 ? d2.minute : "0${d2.minute}"}", overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontSize: 25,
|
||||
color: Colors.grey, fontWeight: FontWeight.w500))))
|
||||
])
|
||||
)));
|
||||
}
|
||||
var date = DateTime.parse(element);
|
||||
children.add(Column( children: [Container(
|
||||
child: ExpansionTile(
|
||||
enabled: widget.enabled,
|
||||
shape: ContinuousRectangleBorder(),
|
||||
iconColor: Colors.grey,
|
||||
initiallyExpanded: true,
|
||||
title: SizedBox(
|
||||
child : Row( children: [
|
||||
const Padding(padding: EdgeInsets.only(right: 10),
|
||||
child: Icon(Icons.view_day, color: Colors.grey)),
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 5),
|
||||
child: Text("${date.day > 9 ? date.day : "0${date.day}"}-${date.hour > 9 ? date.hour : "0${date.hour}"}-${date.year}".toUpperCase(), overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(color: Colors.black, fontWeight: FontWeight.w500))))
|
||||
])
|
||||
),
|
||||
collapsedIconColor: Colors.grey,
|
||||
children: widgets,
|
||||
)),
|
||||
Divider(color: Colors.grey.shade300, height: 1)
|
||||
]));
|
||||
}
|
||||
Future.delayed( const Duration(milliseconds: 100), () {
|
||||
if (widget.parent?.selectedReal != null) {
|
||||
widget.keys[widget.parent!.selectedReal!]?.currentContext?.findRenderObject()?.showOnScreen();
|
||||
}
|
||||
});
|
||||
return SingleChildScrollView( child: Container(
|
||||
height: MediaQuery.of(context).size.height - HeaderConstants.height - 50,
|
||||
child: Column( children: children))
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user