Skip to content

Commit

Permalink
update: 各種エラー画面にAppBarを追加し、前の画面に戻れるようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
Stella2211 committed Oct 1, 2023
1 parent 1a8ca5d commit c07410e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
5 changes: 3 additions & 2 deletions lib/screens/error/data_not_found_error_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ class DataNotFoundErrorScreen extends HookConsumerWidget {

@override
Widget build(context, ref) {
return const Scaffold(
body: DataNotFoundErrorContainer(),
return Scaffold(
appBar: AppBar(title: const Text('')),
body: const DataNotFoundErrorContainer(),
);
}
}
5 changes: 3 additions & 2 deletions lib/screens/error/empty_data_error_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ class EmptyDataErrorScreen extends HookConsumerWidget {

@override
Widget build(context, ref) {
return const Scaffold(
body: DataEmptyErrorContainer(),
return Scaffold(
appBar: AppBar(title: const Text('')),
body: const DataEmptyErrorContainer(),
);
}
}
1 change: 1 addition & 0 deletions lib/screens/error/operation_error_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class OperationErrorScreen extends HookConsumerWidget {
@override
Widget build(context, ref) {
return Scaffold(
appBar: AppBar(title: const Text('')),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down
5 changes: 3 additions & 2 deletions lib/screens/error/unexpected_error_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ class UnexpectedErrorScreen extends HookConsumerWidget {

@override
Widget build(context, ref) {
return const Scaffold(
body: UnexpectedErrorContainer(),
return Scaffold(
appBar: AppBar(title: const Text('')),
body: const UnexpectedErrorContainer(),
);
}
}
6 changes: 1 addition & 5 deletions lib/screens/folder/folder_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ class FolderScreen extends HookConsumerWidget {
builder: (context, response) {
final folder = response.data?.folder;
if (folder == null) {
return Scaffold(
appBar: AppBar(
title: Text('フォルダ'.i18n),
),
body: const DataNotFoundErrorScreen());
return const DataNotFoundErrorScreen();
}
return Scaffold(
resizeToAvoidBottomInset: true,
Expand Down

1 comment on commit c07410e

@Stella2211
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

エラー画面で前に戻れないのは不便なので、戻れるようにしました。 #87 に関連しています。

Please sign in to comment.