useFont static method

Future<void> useFont({
  1. String fontFamily = "",
  2. String path = "",
})

Implementation

static Future<void> useFont({String fontFamily = "", String path = ""}) async {
  try {
    Map<String, Object> args = <String, Object>{};
    args.putIfAbsent("fontFamily", () => fontFamily);
    args.putIfAbsent("path", () => path);
    await methodchannel.invokeMethod('useFont', args);
  }catch(err){
    throw Exception("error occured : ${err.toString()}");
  }
}