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

deixar o fromJson estático #15

Open
SamuelGadiel opened this issue May 13, 2024 · 0 comments
Open

deixar o fromJson estático #15

SamuelGadiel opened this issue May 13, 2024 · 0 comments

Comments

@SamuelGadiel
Copy link
Contributor

SamuelGadiel commented May 13, 2024

Acaba sendo necessário criar uma instancia do DSON, ou colocar ele na injeção de dependencia
Não seria possível deixar o método fromJson genérico para que possa invocar ele sem uma instância?

Ai ao invés disso

final dson = DSON();
dson.fromJson(...);
DSON().fromJson(...);

A gente poderia ter apenas

DSON.fromJson(...);

Teria alguma razão pela qual foi feito dentro da instância?

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

No branches or pull requests

1 participant