get_module 1.0.2+1 copy "get_module: ^1.0.2+1" to clipboard
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.

pub package license stars

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
  }
}
0
likes
120
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

A minimal and scalable light-weight module loader library for get.dart

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, get, get_event_bus

More

Packages that depend on get_module