ModuleMasamuneAdapter<TPages extends ModulePages, TOptions extends ModuleOptions> class
abstract
MasamuneAdapter
for creating module plug-ins.
Follow the steps below to create it.
- Create a class that extends ModuleOptions.
- Create a class that inherits from ModulePages.
- Include a list of pages.
- If the page is not needed, create a private class and pass it directly to super.
- Create a class inheriting from ModuleMasamuneAdapter.
- Include the following methods in class 2.
- Static method of
primary
. - When using other plug-ins in the module, specify the related
MasamuneAdapter
andMasamuneControllerBase
as arguments. - Include all
MasamuneAdapter
in masamuneAdapters when using the above.
モジュールプラグインを作成するためのMasamuneAdapter
。
下記の手順で作成します。
- ModuleOptionsを継承したクラスを作成します。
- ModulePagesを継承したクラスを作成します。
- ページの一覧を含めます。
- ページが必要ない場合はプライベートなクラスを作りsuperにそのまま渡します。
- ModuleMasamuneAdapterを継承したクラスを作成します。
- 3のクラスに下記のメソッドを含めます。
primary
のStaticメソッド。- モジュール内で他プラグインを利用する場合は関連の
MasamuneAdapter
とMasamuneControllerBase
を引数にて指定するようにします。 - 上記を利用する場合すべての
MasamuneAdapter
をmasamuneAdaptersに含めます。
- Inheritance
-
- Object
- MasamuneAdapter
- ModuleMasamuneAdapter
- Implementers
- Annotations
Constructors
- ModuleMasamuneAdapter({required TOptions option, required TPages page, AppRef? appRef, AppRouter? router, Functions? function, Authentication? auth})
-
MasamuneAdapter
for creating module plug-ins.const
Properties
- auth → Authentication
-
Configuration for authentication used by
katana_auth
.no setter - functions → Functions
-
Configuration for Functions used by
katana_functions
.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
loggerAdapters
→ List<
LoggerAdapter> -
Adapters can be defined to add logger functionality.
no setteroverride
-
masamuneAdapters
→ List<
MasamuneAdapter> -
Additional
MasamuneAdapter
for internal use.no setter -
Observers can be set up to monitor transitions between pages.
no setteroverride
- option → TOptions
-
Module Options.
final
- page → TPages
-
List of module pages.
final
- ref → AppRef
-
Ref for application scope called by
katana_scoped
.no setter -
routeQueries
→ List<
RouteQueryBuilder> -
Additional pages for internal use.
no setter
- router → AppRouter
-
Config for router used by
katana_router
.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- runZonedGuarded → bool
-
If you set this to
true
, you can wrap runApp with runZonedGuarded.no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onBuildApp(
BuildContext context, Widget app) → Widget -
Widgets can be added during the build of
MasamuneApp
.override -
onError(
Object error, StackTrace stackTrace) → void -
You can describe the process when runZonedGuarded is set to
true
.override -
onInitScope(
MasamuneAdapter adapter) → void -
Called when initializing
MasamuneAdapterScope
.override -
onMaybeBoot(
) → FutureOr< void> -
It may be called during application initialization.
override
-
onPreRunApp(
) → FutureOr< void> -
You can describe the process before runApp.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited