get_module 1.0.2+1 get_module: ^1.0.2+1 copied to clipboard
A minimal and scalable light-weight module loader library for get.dart
Get Module #
Get Module helps developers split the project by dividing it into multiple independent, pluggable, easy-to-manage modules.
And it makes many community packages easier to install and manage.
Goal #
- Pluggable
- Independent
- Easy to install and manage
Quick Start #
void main() {
GetModular([
// third-party modules installed from pub
GetSplashScreenModule(),
YamlConfigModule(),
SqliteModule(),
GetEasyLoadingModule(),
// your own project modules
UserModule().dependsOn([SqliteModule, YamlConfigModule]), // you specific order by using .dependsOn()
HomeModule().silenceOnError, // you can silence errors and keep code going
ChatModule().silenceOnError,
GalleryModule().silenceOnError,
GetMaterialAppModule(),
]);
}
class UserModule extends GetModule {
@override
List<GetPage> get pages => [
GetPage(
name: '/',
page: () => const EntryPage(),
),
];
@override
Map<String, Map<String, String>> get translations => {
'en': {},
'zh_CN': {},
};
Future<void> install() async {
// module installation
}
}