getListView method
Implementation
Widget getListView() {
return BlocBuilder(
bloc: DebugUtils.debugLogBloc,
builder: () {
return ListView.builder(
itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
ShowOverlay.bloc.setData(DebugUtils.debugLogBloc.state.logs
.elementAt(index)
.logStrings);
showOverlayBloc.show();
},
child: Container(
height: 60,
color: getColorBasedOnLogType(DebugUtils
.debugLogBloc.state.logs
.elementAt(index)
.debugLogBannerType),
margin: const EdgeInsets.fromLTRB(10, 10, 10, 10),
child: Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 10),
child: Text(
DebugUtils.debugLogBloc.state.logs
.elementAt(index)
.logTitle,
maxLines: 2,
style: const TextStyle(
color: Colors.white,
fontSize: 18,
),
),
),
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Padding(
padding: const EdgeInsets.only(right: 10),
child: Text(
getFormatedDate(index),
style: const TextStyle(
color: Colors.white,
fontSize: 14,
),
),
),
Padding(
padding: const EdgeInsets.only(right: 10),
child: Text(
"Log Count : $index",
style: const TextStyle(
color: Colors.white,
fontSize: 14,
),
),
)
],
)
],
),
),
);
},
itemCount: DebugUtils.debugLogBloc.state.logs.length,
);
});
}