-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from nozomi-koborinai/feature/fix-ui
Feature/fix UI
- Loading branch information
Showing
6 changed files
with
194 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class AppException implements Exception { | ||
final String message; | ||
const AppException([this.message = 'エラーが発生しました']); | ||
|
||
@override | ||
String toString() { | ||
return message; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class FailureSnackBar extends SnackBar { | ||
FailureSnackBar._({required String message}) | ||
: super( | ||
content: Text(message), | ||
backgroundColor: Colors.redAccent, | ||
behavior: SnackBarBehavior.floating, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(8.0), | ||
), | ||
); | ||
|
||
static void show( | ||
ScaffoldMessengerState scaffoldMessenger, { | ||
required String message, | ||
}) { | ||
scaffoldMessenger.showSnackBar(FailureSnackBar._(message: message)); | ||
} | ||
} |