LCOV - code coverage report
Current view: | top level - src/widgets/tiles - folder_tile.dart (source / functions) |  |  | Hit | Total | Coverage
Test: | lcov.info |  | Lines: | 0 | 22 | 0.0 %
Date: | 2021-10-11 06:57:03 |  | Functions: | 0 | 0 | -

              Line data    Source code
           1             : import 'package:flutter/material.dart';
           2             :
           3             : import 'package:widgetbook/src/models/organizers/organizers.dart';
           4             : import 'package:widgetbook/src/providers/organizer_provider.dart';
           5             :
           6             : import 'package:widgetbook/src/utils/utils.dart';
           7             : import 'package:widgetbook/src/widgets/tiles/spaced_tile.dart';
           8             : import 'package:widgetbook/src/widgets/tiles/tile_helper_methods.dart';
           9             :
          10             : class FolderTile extends StatefulWidget {
          11           0 :   const FolderTile({
          12             :     Key? key,
          13             :     required this.folder,
          14             :     required this.level,
          15           0 :   }) : super(key: key);
          16             :
          17             :   final Folder folder;
          18             :   final int level;
          19             :
          20           0 :   @override
          21           0 :   _FolderTileState createState() => _FolderTileState();
          22             : }
          23             :
          24             : class _FolderTileState extends State<FolderTile> {
          25             :   bool hover = false;
          26             :
          27           0 :   @override
          28             :   Widget build(BuildContext context) {
          29           0 :     final folder = widget.folder;
          30           0 :     final isExpanded = widget.folder.isExpanded;
          31           0 :     return Column(
          32             :       crossAxisAlignment: CrossAxisAlignment.start,
          33           0 :       children: [
          34           0 :         SpacedTile(
          35           0 :           level: widget.level,
          36           0 :           organizer: widget.folder,
          37             :           iconData: isExpanded ? Icons.folder_open : Icons.folder,
          38           0 :           iconColor: context.colorScheme.primary,
          39           0 :           onClicked: () {
          40           0 :             setState(() {
          41           0 :               OrganizerProvider.of(context)!.toggleExpander(widget.folder);
          42             :             });
          43             :           },
          44             :         ),
          45             :         if (isExpanded)
          46           0 :           ...buildFolders(
          47           0 :             folders: folder.folders,
          48           0 :             currentLevel: widget.level + 1,
          49             :           ),
          50             :         if (isExpanded)
          51           0 :           ...buildWidgets(
          52           0 :             widgets: folder.widgets,
          53           0 :             currentLevel: widget.level + 1,
          54             :           )
          55             :       ],
          56             :     );
          57             :   }
          58             : }

Generated by: LCOV version 1.15