Text(' '),
const Padding(
padding: EdgeInsets.only(left: 35.0),
child: Text(
'Cape Coast',
style: boldTextStyle(),
),
After refractoring my TextStyle widget, It give an error of invalid constant value
Refactoring code is below
TextStyle boldTextStyle() {
return const TextStyle(
fontSize: 40,
fontFamily: 'Dongle',
fontWeight: FontWeight.w700,
);
}