Line data Source code
1 : import 'package:flutter/material.dart'; 2 : import 'package:widgetbook/src/models/organizers/organizers.dart'; 3 : import 'package:widgetbook/src/navigation/ui/tiles/tile_helper_methods.dart'; 4 : import '../../../utils/utils.dart'; 5 : 6 : class CategoryTile extends StatelessWidget { 7 : final Category category; 8 0 : const CategoryTile({Key? key, required this.category}) : super(key: key); 9 : 10 0 : @override 11 : Widget build(BuildContext context) { 12 0 : return Column( 13 : crossAxisAlignment: CrossAxisAlignment.start, 14 0 : children: [ 15 0 : Padding( 16 : padding: const EdgeInsets.symmetric( 17 : vertical: 4, 18 : horizontal: 8, 19 : ), 20 0 : child: Text( 21 0 : category.name, 22 0 : style: context.textTheme.subtitle2!, 23 : ), 24 : ), 25 0 : ...buildFolders( 26 0 : folders: category.folders, 27 : currentLevel: 0, 28 : ), 29 0 : ...buildWidgets( 30 0 : widgets: category.widgets, 31 : currentLevel: 0, 32 : ), 33 : ], 34 : ); 35 : } 36 : }