Q:

How to draw icons in flutter with custom icon font file?

I have custom font icon file named myicons.ttf and myJsonValue.json file with all values defined in it. How to implement icons with these in flutter? I have defined properly in the pubspec.yaml.
flutter:
fonts:
- family: icons
  fonts:
    - asset: assets/fonts/myicons.ttf

assets:
  - res/myJsonValue.json

A:

const myIcon = const IconData('\u1234', fontFamily: 'icons');

then use it like
const Icon(myIcon);

See also https://github.com/flutter/flutter/blob/c97fc2063f7b5b1a3a9bdb937205a237e13246a2/packages/flutter/lib/src/material/icons.dart#L29 how to create a set of icon data (one for each icon)

