Giter Club home page Giter Club logo

Comments (7)

tusharojha avatar tusharojha commented on September 13, 2024

Hey there,
@RedBrogdon do you want the place_tracker sample to be using a stock state management approach rather than custom InheritedWidget (as it is using now)?

If yes then,
I would like to work on it and switch the app to stock state management (using Stateful Widgets) from custom InheritedWidget to manage the app state.

from samples.

RedBrogdon avatar RedBrogdon commented on September 13, 2024

It's an open issue, so we'd welcome a pull request. That said, it's important that we agree on an approach before the coding starts.

In my head, the way I imagine fixing this issue is by:

  • Removing the app_model.dart file entirely.
  • Converting the AppState class in place_tracker_app.dart to extend ChangeNotifier rather than be stateless.
  • Using ChangeNotifierProvider to hold the AppState object for the app.

It's possible to do things another way. This is an approach used elsewhere in the repo, though, which would make it easy for folks to understand and focus on the map-related code in the sample.

from samples.

tusharojha avatar tusharojha commented on September 13, 2024

I also think we should go with ChangeNotifierProvider to hold the app state as the repository follows the same.
I believe I should wrap the whole MaterialApp inside the ChangeNotifierProvider. Would that be ok sir?

from samples.

RedBrogdon avatar RedBrogdon commented on September 13, 2024

No need to call me "sir." We're all friends here. 😄

Yes, you'd want to have the Provider above MaterialApp so it sits above the Navigator widget that MaterialApp creates.

It sounds like you're on the right approach. Give it a try and see how it goes!

from samples.

tusharojha avatar tusharojha commented on September 13, 2024

@RedBrogdon Please have a look on PR and recommend required changes. I have given an attempt to solve the issue.

from samples.

tusharojha avatar tusharojha commented on September 13, 2024

@RedBrogdon I think now we can close this issue. Also, I would love to contribute more at Flutter. So if there is anything I can do then please let me know.

from samples.

domesticmouse avatar domesticmouse commented on September 13, 2024

Thanks for all your hard work on #424 @tusharojha! It is much appreciated.

As to future work, the real question is what interests you? There are many ways to contribute to the Flutter project, from authoring samples, blog posts, CodePen samples, YouTube videos, all the way through to creating startups using the technology to solve real problems.

I'm not telling you to stop contributing to the Flutter samples repo, but it is worth stepping back and thinking about how you can use this tech to make yourself feel accomplished. =)

from samples.

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.