Files
GitJournal/lib/apis/githost_factory.dart
Vishesh Handa 5452fc0a78 GitHostSetup: Automatically open the correct url
This is a behaviour that got lost during the refactor.
2019-02-13 21:02:33 +01:00

26 lines
359 B
Dart

import 'githost.dart';
import 'github.dart';
import 'gitlab.dart';
export 'githost.dart';
enum GitHostType {
Unknown,
GitHub,
GitLab,
Custom,
}
GitHost createGitHost(GitHostType type) {
switch (type) {
case GitHostType.GitHub:
return GitHub();
case GitHostType.GitLab:
return GitLab();
default:
return null;
}
}