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