mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-24 17:31:06 +08:00
Move setup code into its own package
This commit is contained in:
29
packages/git_setup/lib/loading_error.dart
Normal file
29
packages/git_setup/lib/loading_error.dart
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2019-2021 Vishesh Handa <me@vhanda.in>
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'error.dart';
|
||||
import 'loading.dart';
|
||||
|
||||
class GitHostSetupLoadingErrorPage extends StatelessWidget {
|
||||
final String? errorMessage;
|
||||
final String loadingMessage;
|
||||
|
||||
const GitHostSetupLoadingErrorPage({
|
||||
required this.errorMessage,
|
||||
required this.loadingMessage,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (errorMessage == null || errorMessage!.isEmpty) {
|
||||
return GitHostSetupLoadingPage(loadingMessage);
|
||||
}
|
||||
|
||||
return GitHostSetupErrorPage(errorMessage!);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user