Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is recommended to call the "commit()" method after adding instances. #835

Closed
nourSleem33166 opened this issue Feb 15, 2023 · 8 comments
Closed
Labels
new New issue request attention

Comments

@nourSleem33166
Copy link

nourSleem33166 commented Feb 15, 2023

**What should we do exactly here? **

@nourSleem33166 nourSleem33166 added the new New issue request attention label Feb 15, 2023
@TaylonKalel
Copy link

What should we do exactly here?

@jacobaraujo7
Copy link
Contributor

fixed

@tihrasguinho
Copy link

Estou usando a versao 6.0.0+2 e ta com esse bug ainda, ou não foi fei o deploy do fix?

@bmsrangel
Copy link
Contributor

The same is happening to me. I'm using flutter_modular version 6.0.3.

I'm using Drift to create database code and accessor classes.

class AppModule extends Module {
  @override
  void binds(Injector i) {
    super.binds(i);
    i.addSingleton(() => KInventoryDatabase());
    i.addInstance<StatusesDao>(
      i.get<KInventoryDatabase>().statusesDao,
    );
    i.addInstance<ItemsDao>(
      i.get<KInventoryDatabase>().itemsDao,
    );
    i.addLazySingleton<StatusesService>(DriftStatusesServiceImpl.new);
    i.addLazySingleton<ItemsService>(DriftItemsServiceImpl.new);
  }

image

image

@eduardoflorence
Copy link

@bmsrangel try to remove line super.binds(i);

@bmsrangel
Copy link
Contributor

@bmsrangel try to remove line super.binds(i);

I've tried that before, same result

@fullflash
Copy link

it is not clear where to call the commit method

@eduardothiesen
Copy link

Same issue. Where to call commit method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new New issue request attention
Projects
None yet
Development

No branches or pull requests

8 participants