build method
- @override
- BuildContext context,
- LogsViewModel model
override
Builds the UI according to the state in model
.
Implementation
@override
Widget build(BuildContext context, LogsViewModel model) => model.logs.isEmpty
? const Center(child: Text("No logs yet"))
: ListView.builder(
itemCount: model.logs.length,
controller: model.scrollController,
reverse: true,
itemBuilder: (context, index) => LogWidget(model.logs[index]),
);