Skip to content

refactor(#46): Singleton NStack instance to expose business logic features #49

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

Conversation

nivisi
Copy link
Contributor

@nivisi nivisi commented Dec 6, 2022

Resolves #46

  • NStack was renamed to NStackSdk, localization was moved to a separate class, NStackLocalization
  • NStack is now a global variable of type NStackSdk
  • Improved doc comments in the generated file
  • The generated file now has a different structure. This is to make it easier to go through during development. The structure now is:
    • NStack object creation + config
    • Languages list + bundled translations
    • Localization sections & delegate keys
    • Flutter widgets & extensions

I feel like NStackSdk and NStackLocalization need some refactoring to make the code cleaner — but that's a separate ticket.

Also, atm if you change the language from the domain layer by doing NStack.localization.changeLocalization(locale), the UI won't be updated. It's not complex to implement, but I'd like to move it to a separate ticket. (update: here it is #50)

@nivisi nivisi requested a review from johsoe December 6, 2022 13:09
@johsoe johsoe merged commit 03e9767 into nstack-io:master Dec 9, 2022
@nivisi nivisi deleted the refactor/#46-singleton-nstack-instance-to-expose-business-logic-features branch December 9, 2022 11:32
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

Successfully merging this pull request may close these issues.

Singleton NStack instance to expose business logic features
2 participants