Giter VIP home page Giter VIP logo

Comments (4)

dlemures avatar dlemures commented on June 16, 2024

Hi @markchristopherng !

  1. Yes, with D&H3 all components where you want to be able to navigate to must use NavigationModels. That way we encapsulate our navigation info in one single place. It also allows D&H3 to be compatible with modularized apps.

  2. You need to create a NavigationModel as well.

  3. There are 2 ways to bind NavigationModels at runtime on the version 3:

class MyFragment {
    @DartModel MyFragmentNavigationModel nm;

   onCreate() {
       Dart.bind(this); // It will create the navigation model and bind the fields inside it to the fragment arguments.
   }
}
class MyFragment {
    MyFragmentNavigationModel nm = new MyFragmentNavigationModel();

   onCreate() {
       Dart.bindNavigationModel(nm, this); // It will bind the fields inside the navigation model to the fragment arguments.
   }
}

I think you are looking for the second one option.

  1. Actually this is an issue, we never updated it and we should have. The fix is just to update the reference inside the Dart class. You wanna give it a try and open a PR?

from dart.

markchristopherng avatar markchristopherng commented on June 16, 2024

Hi Daniel, thanks for answering all our questions really promptly. It's going to save us a lot of time. We will try to put a PR for issue 4. Just wondering why jeftifier failed to convert it to Android X.

from dart.

dlemures avatar dlemures commented on June 16, 2024

Cause we are actually using the one from android.app 😅...

At Groupon we do not bind fragment extras, so we didn't encounter the issue...

from dart.

markchristopherng avatar markchristopherng commented on June 16, 2024

I spoke to a few of the other senior developers in our team and we are going down the approach of removing the @InjectExra now @BindView annotations from our fragments, we believe that is a cleaner solution than creating NavigationModels. Thanks again for your assistance.

from dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.