Following this tutorial I tried to use custom icons i downloaded from here. I added them into my pubspec.
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: CantonIconsBold
fonts:
- asset: lib/assets/icons/canton_icons_bold.ttf
- family: CantonIconsBulk
fonts:
- asset: lib/assets/icons/canton_icons_bulk.ttf
- family: CantonIconsLine
fonts:
- asset: lib/assets/icons/canton_icons_line.ttf
Then I used it in one of my custom buttons I created.
Row(
children: [
CantonPrimaryButton(
containerWidth: 65,
containerHeight: 65,
containerPadding: EdgeInsets.all(0),
alignment: MainAxisAlignment.center,
radius: 60,
containerColor: cantonGrey[900],
prefixIcon: Canton_icons_bold.Canton,
iconColor: cantonGrey[100],
onPressed: () {
return Navigator.of(context).push(
MaterialPageRoute(
builder: (context) {
return NoteCreationScreen(note: Note());
},
),
However I get this as a result: image
I've tried a few other tutorials and changed the icons I'm using but I still end up with the same result.
question from:https://stackoverflow.com/questions/66055166/flutter-icons-appear-as-question-marks