heading function

dynamic heading({
  1. required String title,
  2. String? pathImage,
  3. IconData? icon,
  4. Color? color,
})

Implementation

heading({ required String title, String? pathImage, IconData? icon, Color? color }) {
  color = (color==null) ? Colors.black : color;
  return Row(
    children: <Widget>[
      getImage(color: color, height: 30, icon: icon, pathImage: pathImage),
      if( pathImage!=null || icon!=null  )
        const SizedBox( width: 10.0,),
      Expanded(
        child: Text(
          title.toUpperCase(),
          style: const TextStyle(
            color: Colors.black,
            fontWeight: FontWeight.w600,
            fontSize: 18.0,
          ),
        ),
      )
    ],
  );
}