LCOV - code coverage report
Current view: top level - src/style - textin_tab_style.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 17 17 100.0 %
Date: 2020-02-24 15:58:08 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:flutter/cupertino.dart';
       2             : import 'package:flutter/material.dart';
       3             : 
       4             : import '../../convex_bottom_bar.dart';
       5             : import 'blend_image_icon.dart';
       6             : import 'inner_builder.dart';
       7             : import 'transition_container.dart';
       8             : 
       9             : /// Tab icon, text animated with pop transition.
      10             : class TextInTabStyle extends InnerBuilder {
      11             :   /// Curve for tab transition.
      12             :   final Curve curve;
      13             : 
      14           1 :   TextInTabStyle({
      15             :     List<TabItem> items,
      16             :     Color activeColor,
      17             :     Color color,
      18             :     this.curve,
      19           1 :   }) : super(items: items, activeColor: activeColor, color: color);
      20             : 
      21           1 :   @override
      22             :   Widget build(BuildContext context, int index, bool active) {
      23           2 :     var item = items[index];
      24             :     if (active) {
      25           1 :       return Container(
      26             :         height: ACTION_LAYOUT_SIZE,
      27             :         padding: const EdgeInsets.only(bottom: 2),
      28           1 :         child: Column(
      29             :           mainAxisAlignment: MainAxisAlignment.end,
      30           1 :           children: <Widget>[
      31           1 :             TransitionContainer.scale(
      32           1 :               child: BlendImageIcon(
      33           2 :                 item.activeIcon ?? item.icon,
      34           2 :                 color: item.blend ? activeColor : null,
      35             :                 size: ACTION_INNER_BUTTON_SIZE,
      36             :               ),
      37           1 :               curve: curve,
      38             :             ),
      39           1 :             TransitionContainer.slide(
      40           4 :               child: Text(item.title, style: TextStyle(color: activeColor)),
      41           1 :               curve: curve,
      42             :             ),
      43             :           ],
      44             :         ),
      45             :       );
      46             :     }
      47             : 
      48           1 :     return Center(
      49           4 :       child: BlendImageIcon(item.icon, color: item.blend ? color : null),
      50             :     );
      51             :   }
      52             : }

Generated by: LCOV version 1.14