Line data Source code
1 : import 'package:flutter/material.dart';
2 :
3 : import 'package:fast_immutable_collections/fast_immutable_collections.dart';
4 :
5 : import '../../models/section_model.dart';
6 : import 'sections_list_item.dart';
7 :
8 : class SectionsListView extends StatelessWidget {
9 : final IList<SectionModel> sections;
10 :
11 2 : const SectionsListView(this.sections, {Key? key}) : super(key: key);
12 :
13 1 : @override
14 : Widget build(BuildContext context) {
15 1 : return Padding(
16 : padding: const EdgeInsets.only(top: 4.0),
17 1 : child: ListView.builder(
18 : shrinkWrap: true,
19 2 : itemCount: sections.length,
20 0 : itemBuilder: (context, index) => SectionsListItem(sections[index]),
21 : ),
22 : );
23 : }
24 : }
|