Skip to content

Commit

Permalink
fix: MasamuneAdapter methods are now predefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed Feb 17, 2023
1 parent fae7011 commit d2209a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions packages/masamune/lib/src/masamune_adapter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ abstract class MasamuneAdapter {
/// If you set this to `true`, you can wrap [runApp] with [runZonedGuarded].
///
/// これを`true`にした場合、[runApp][runZonedGuarded]でラッピングすることができます。
bool get runZonedGuarded;
bool get runZonedGuarded => false;

/// Observers can be set up to monitor transitions between pages.
///
/// ページ間の遷移を監視するためのオブザーバーを設置することができます。
List<NavigatorObserver> get navigatorObservers;
List<NavigatorObserver> get navigatorObservers => const [];

/// Adapters can be defined to add logger functionality.
///
/// ロガー機能を追加するためのアダプターを定義することができます。
List<LoggerAdapter> get loggerAdapters;
List<LoggerAdapter> get loggerAdapters => const [];

/// Widgets can be added during the build of [MasamuneApp].
///
Expand Down Expand Up @@ -91,7 +91,7 @@ abstract class MasamuneAdapter {
/// You can describe the process before [runApp].
///
/// [runApp]前の処理を記述することができます。
FutureOr<void> onPreRunApp();
FutureOr<void> onPreRunApp() {}

/// You can describe the process when [runZonedGuarded] is set to `true`.
///
Expand All @@ -100,7 +100,7 @@ abstract class MasamuneAdapter {
/// [runZonedGuarded]`true`にした場合の処理を記述することができます。
///
/// [error][stackTrace]にエラーが起きた際のオブジェクトが渡されます。
void onError(Object error, StackTrace stackTrace);
void onError(Object error, StackTrace stackTrace) {}
}

/// [MasamuneAdapter] for the entire app by placing it on top of [MaterialApp], etc.
Expand Down
4 changes: 2 additions & 2 deletions packages/masamune/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,10 @@ packages:
dependency: "direct main"
description:
name: masamune_annotation
sha256: "2ff6fabe8618f28b7a2bd60ce68fb1551f708c62b452236d63d6302d633a3aac"
sha256: bbae19221555dfe0c2b273d97003cc39363d2b3ac9e57487206e33e9b0b342b0
url: "https://pub.dev"
source: hosted
version: "1.3.1"
version: "1.3.2"
matcher:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions packages/masamune_builder/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,10 @@ packages:
dependency: "direct main"
description:
name: masamune_annotation
sha256: "2ff6fabe8618f28b7a2bd60ce68fb1551f708c62b452236d63d6302d633a3aac"
sha256: bbae19221555dfe0c2b273d97003cc39363d2b3ac9e57487206e33e9b0b342b0
url: "https://pub.dev"
source: hosted
version: "1.3.1"
version: "1.3.2"
matcher:
dependency: transitive
description:
Expand Down

0 comments on commit d2209a6

Please sign in to comment.