import 'package:flutter/material.dart'; import 'package:muaawana/config/style.dart'; import '../../../models/SettingItem.dart'; import '../../../utils/text_widget.dart'; class SettingTile extends StatelessWidget { final SettingItem item; final bool isSelected; final bool isDarkMode; final bool isInSelectionMode; const SettingTile({required this.item,required this.isDarkMode, this.isSelected = false,this.isInSelectionMode = false,}); @override Widget build(BuildContext context) { return Container( color: isDarkMode ? AppNewStyle.darkAppBackground : AppNewStyle.appBackground, padding: const EdgeInsets.all(16.0), child: InkWell( onTap: item.onTap, child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( child: item.subtitle != null ? Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ Txt( text: item.title, style: TextStyle( color: isDarkMode ? AppNewStyle.darkTextBlackColor : AppNewStyle.textBlackColor, fontSize: 18, fontFamily: 'Inter', fontWeight: FontWeight.w600, height: 1.33, ), ), Txt( text: item.subtitle!, style: TextStyle( color: isDarkMode ? AppNewStyle.darkTextGrayColor : AppNewStyle.textGrayColor, fontSize: 15, fontFamily: 'Inter', fontWeight: FontWeight.w500, height: 1.60, ), ), ], ) : Txt( text: item.title, style: TextStyle( fontSize: 17, color: isDarkMode ? AppNewStyle.darkTextBlackColor : AppNewStyle.textBlackColor, fontWeight: FontWeight.w700, ), ), ), ], ), ), ); } }