getFontList method

Future<List<FontName>> getFontList()

Gets a list of fonts on the system.

Implementation

Future<List<FontName>> getFontList() async {
  var $res =
      await promiseToFuture<JSArray>($js.chrome.fontSettings.getFontList());
  return $res.toDart
      .cast<$js.FontName>()
      .map((e) => FontName.fromJS(e))
      .toList();
}