| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- class SettingListElement extends StatelessWidget {
- final Widget leading;
- final List<Widget>? 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);
- }
- }
|