settingOptionTile method

Widget settingOptionTile({
  1. required BuildContext context,
  2. required String tileText,
  3. void onTap()?,
  4. bool showArrowIcon = true,
  5. Color? tileTextColor,
})

default setting option tile for various fields

Implementation

Widget settingOptionTile({
  required BuildContext context,
  required String tileText,
  void Function()? onTap,
  bool showArrowIcon = true,
  Color? tileTextColor,
}) {
  return Container(
    margin: const EdgeInsets.only(bottom: 15),
    decoration: BoxDecoration(
      color: primaryColor,
      borderRadius: BorderRadius.circular(5),
      boxShadow: [
        BoxShadow(
          color: Colors.black.withOpacity(0.5),
          blurRadius: 6,
        ),
      ],
    ),
    child: Material(
      elevation: 0,
      color: Colors.transparent,
      child: ListTile(
        leading: Text(tileText,
            style: TextStyle(
              color: tileTextColor,
              fontSize: 13,
            )),
        onTap: onTap,
        tileColor: primaryColor,
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(5),
        ),
        dense: true,
        trailing: showArrowIcon
            ? const Icon(
                Icons.arrow_forward_ios_rounded,
                color: Colors.black,
                size: 20,
              )
            : null,
      ),
    ),
  );
}