import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/theme/colors.dart';

class ViewAllWidget extends StatelessWidget {
  final String title;
  final String subTitle;
  final Function() onSubtitleTapped;

  const ViewAllWidget({Key? key, required this.title, required this.subTitle, required this.onSubtitleTapped}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      padding: const EdgeInsets.only(bottom: 7),
      child: Row(
        children: [
          Expanded(child: title.toText( fontSize: 18, isUpperCase: true)),
          InkWell(
            onTap: onSubtitleTapped,
            child: subTitle.toText(
              fontSize: 11,
              color: MyColors.primaryColor,
              textDecoration: TextDecoration.underline,
            ),
          )
        ],
      ),
    );
  }
}
