import 'package:flutter/material.dart';
import 'package:tab_indicator_styler/tab_indicator_styler.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class TeamTabBarWidget extends StatelessWidget {
  TabController controller;
  var tabTitle;

  TeamTabBarWidget({this.controller, this.tabTitle});

  @override
  Widget build(BuildContext context) {
    return TabBar(
      isScrollable: false,
      labelStyle: TextStyle(fontWeight: FontWeight.bold, fontSize: 13),
      unselectedLabelStyle: TextStyle(fontSize: 13),
      indicator: MaterialIndicator(
        height: 2,
        topLeftRadius: 8,
        topRightRadius: 8,
        bottomLeftRadius: 8,
        bottomRightRadius: 8,
        color: HexColor.fromHex('#F94B47'),
        horizontalPadding: 30,
      ),
      controller: controller,
      tabs: tabTitle.map((f) => Tab(text: f)).toList(),
      indicatorColor: Colors.red,
      unselectedLabelColor: HexColor.fromHex('#999999'),
      labelColor: HexColor.fromHex('#000000'),
    );
  }
}
