import 'package:flutter/material.dart'; import 'package:get/get.dart'; class SettingListElement extends StatelessWidget { final Widget leading; final List? actions; final VoidCallback? onTap; const SettingListElement({super.key, required this.leading, this.actions, this.onTap}); @override Widget build(BuildContext context) { final style1 = (context.textTheme.titleLarge ?? const TextStyle()) .copyWith(fontSize: 17.42, color: const Color(0xff333333)); final style2 = style1.copyWith(fontSize: 15.24, color: const Color(0xff818181)); return GestureDetector( onTap: onTap, child: Container( margin: const EdgeInsets.only(top: 7), color: Colors.white, height: 74, width: context.width, child: (actions ?? []).isEmpty ? Center( child: DefaultTextStyle(style: style1, child: leading), ) : Padding( padding: const EdgeInsets.only(left: 33.76, right: 29.65), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ DefaultTextStyle(style: style1, child: leading), DefaultTextStyle(style: style2, child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.min, children: actions!, )) ], ))), ); } } const _secondColor = Color(0xffc6c6c6); class SettingsRightArrow extends StatelessWidget { const SettingsRightArrow({super.key}); @override Widget build(BuildContext context) { return const Icon(Icons.arrow_forward_ios,size: 20, color: _secondColor); } }