getSettingRow function

Widget getSettingRow(
  1. String icon,
  2. String title,
  3. Function function
)

Implementation

Widget getSettingRow(String icon, String title, Function function) {
  double iconSize = MahasDimensions.getHeightPercentSize(3);
  return InkWell(
    onTap: () {
      function();
    },
    child: Row(
      mainAxisAlignment: MainAxisAlignment.start,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        SizedBox(
          height: iconSize,
          child: Center(
            child: getIcon(icon),
          ),
        ),
        getSpaceWidth(1.5),
        Expanded(
          flex: 1,
          child: getCustomText(
            title,
            weight: FontWeight.w500,
            size: MahasDimensions.getHeightPercentSize(
                MahasDimensions.fontSizeMedium),
          ),
        ),
        getIcon("arrow_right")
      ],
    ),
  );
}