mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-15 07:56:11 +08:00

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.
25 lines
348 B
Dart
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;
|
|
}
|
|
}
|