use method

dynamic use(
  1. NyPlugin plugin
)

Assign a NyPlugin to add extra functionality to your app from a plugin. e.g. from main.dart Nylo.use(CustomPlugin());

Implementation

use(NyPlugin plugin) async {
  await plugin.initPackage(this);
  if (router == null) {
    router = NyRouter();
  }
  router!.setNyRoutes(plugin.routes());
  _events.addAll(plugin.events());
  NyNavigator.instance.router = this.router!;
}