renderItems method
dynamic
renderItems( - dynamic context,
- dynamic ref,
- List spaces
)
Implementation
Widget renderItems(
BuildContext context,
WidgetRef ref,
List<SpaceDetails> spaces,
) {
return inBox(
context,
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: spaces.map((space) {
return InkWell(
child: Container(
padding: const EdgeInsets.all(10),
child: Column(
children: [
space.icon,
const SizedBox(height: 3),
Text(space.name),
],
),
),
onTap: () {
if (popBeforeRoute) Navigator.pop(context);
goToSpace(context, space.navigationTargetId);
},
);
}).toList(),
),
),
);
}