import 'package:flutter/material.dart';
import 'package:rkm/widgets/text_default.dart';
import '../config/color_palette.dart';
import '../config/const_variable.dart';
class ItemAlertSettings extends StatelessWidget {

  var onTap;
  String title;
  String body;
  IconData icon;

  ItemAlertSettings({
    required this.title,
    required this.body,
    required this.icon,
    required this.onTap,
});

  @override
  Widget build(BuildContext context) {
    double width = MediaQuery.of(context).size.width;
    return Container(
      margin: EdgeInsets.symmetric(horizontal: 30),
      child: Card(
        color: ColorPalette.white,
        child: Container(
          margin: ConstVariable().marginHightInput,
          padding: const EdgeInsets.all(8.0),
          child: ListTile(
            title: Container(
                width: width*0.8,
                child: TextDefault(text: title,fontWeigth: FontWeight.bold,color: ColorPalette.black54,)
            ),
            subtitle: Padding(
              padding: const EdgeInsets.symmetric(vertical: 4),
              child: TextDefault(text: body,fontSize: 14),
            ),
            trailing: Icon(icon,size: 30,color: ColorPalette.black54,),
            onTap: onTap,
          ),
        ),
      ),
    );
  }
}
