Files
GitJournal/lib/apis/githost_factory.dart
Vishesh Handa acede95536 Dart: Add analysis_options
For now I've mostly tried to follow the same style guide as the flutter
repository, with many options disabled. Eventually, maybe it would make
sense to be far stricter.
2019-02-13 13:08:15 +01:00

25 lines
348 B
Dart

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