initialize function

Future<Project> initialize({
  1. String name = "DEFAULT",
  2. String configFile = ".hop.config",
  3. String? username,
  4. String? project,
  5. String? token,
})

Implementation

Future<Project> initialize(
    {String name = "DEFAULT",
    String configFile = ".hop.config",
    String? username,
    String? project,
    String? token}) async {
  WidgetsFlutterBinding.ensureInitialized();
  Completer completer = Completer();
  final Project proj = Project(completer,
      configFile: configFile,
      username: username,
      project: project,
      token: token);
  await completer.future;
  _projects[name] = proj;
  return proj;
}