Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
596 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...