import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../Helper/Constants/Colorconstants.dart';

class ProfileMobile extends StatelessWidget {
  final String title;
  final Color colorValue;
  final IconData icon;
  final Function(bool) onTapNavigation;

  ProfileMobile(
      {required this.title,
        required this.icon,
        required this.onTapNavigation,
        required this.colorValue});

  @override
  Widget build(BuildContext context) {
    return InkWell(
        onTap: () {
          onTapNavigation(true);
        },
        child: Container(
          padding: EdgeInsets.all(8),
          width: Get.width * 0.3,
          height: 120,
          decoration: BoxDecoration(
            color: colorValue,
            shape: BoxShape.rectangle,
            borderRadius: BorderRadius.circular(12),
          ),
          child: Column(
            // mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Expanded(
                flex: 7,
                child: Row(
                  children: [
                    Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Container(
                          decoration: BoxDecoration(
                              color: Colors.white70,
                              borderRadius: BorderRadius.circular(10),
                              shape: BoxShape.rectangle),
                          child: Padding(
                            padding: const EdgeInsets.all(8.0),
                            child: Icon(
                              icon,
                              size: 24,
                              color: ColorConstants.primaryColor,
                            ),
                          ),
                        ),
                        SizedBox(
                          height: 5,
                        ),
                        Padding(
                          padding: const EdgeInsets.only(left: 2),
                          child: Text(
                            "${this.title}",
                            style: TextStyle(
                                fontSize: 12,
                                color: Colors.grey[800],
                                fontWeight: FontWeight.bold),
                          ),
                        ),
                      ],
                    )
                  ],
                ),
              ),
              Expanded(
                flex: 3,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.end,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    Padding(
                      padding: const EdgeInsets.all(4.0),
                      child: Icon(
                        Icons.arrow_forward,
                        color: Colors.grey[700],
                        size: 22,
                      ),
                    ),
                  ],
                ),
              )
            ],
          ),
        ));
  }
}
