import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:flutter/material.dart';

class MyTabView extends StatelessWidget {
  final String title;
  final FilterType value;
  final FilterType groupValue;
  final VoidCallback onPressed;
  MyTabView(
    this.title,
    this.value,
    this.groupValue,
    this.onPressed, {
    Key key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: InkWell(
        onTap: onPressed,
        child: Column(
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            SizedBox(height: 15),
            Text(
              title,
              style: TextStyle(
                fontSize: 16,
                fontWeight: FontWeight.w600,
                color: value == groupValue ? Color(0xff2B353E) : Color(0xff575757),
                letterSpacing: -0.48,
              ),
            ),
            Container(
              margin: EdgeInsets.only(top: 13),
              height: 3,
              color: value == groupValue ? Color(0xffD02127) : Colors.transparent,
            )
          ],
        ),
      ),
    );
  }
}
