Files
GitJournal/lib/screens/githostsetup_clone.dart
Vishesh Handa 994b6f2ccd GitHostSetup: Reduce code duplication
Make the ErrorPage into its own widget, instead of duplicating the code.
2019-02-14 10:13:46 +01:00

22 lines
481 B
Dart

import 'package:flutter/material.dart';
import 'githostsetup_error.dart';
import 'githostsetup_loading.dart';
class GitHostSetupGitClone extends StatelessWidget {
final String errorMessage;
GitHostSetupGitClone({
this.errorMessage,
});
@override
Widget build(BuildContext context) {
if (this.errorMessage == null || this.errorMessage.isEmpty) {
return GitHostSetupLoadingPage("Cloning ...");
}
return GitHostSetupErrorPage(errorMessage);
}
}