I'm trying to use Montserrat with a custom color on my DropdownButton but for some reason, the TextStyle is not being applied.
Here is my code:
DropdownButton(
value: value,
dropdownColor: colorScheme.surface,
hint: hint != null
? Text(
hint,
style: GoogleFonts.montserrat(
fontSize: 18,
color: colorScheme.onPrimary,
),
)
: null,
style: GoogleFonts.montserrat(
fontSize: 18,
color: colorScheme.onPrimary,
),
iconEnabledColor: colorScheme.onPrimary,
items: items
.map((e) => DropdownMenuItem(
alignment: Alignment.center,
value: e,
child: Text(
e,
style: GoogleFonts.montserrat(
fontSize: 18,
color: colorScheme.onSurface,
),
),
))
.toList(),
onChanged: onChanged,
);
I can't find where or how it's wrong.