Comments (7)
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.
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.
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.
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.
@RedBrogdon Please have a look on PR and recommend required changes. I have given an attempt to solve the issue.
from samples.
@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.
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)
- Flutter samples contains the default useMaterial3 = true HOT 10
- [Feature Request] Update sample 'web-element-embedding' to new Js-interop Api HOT 1
- navigation_and_routing: Incorrect Redirection and Button Behavior in Author Details Screen and Settings Page HOT 1
- App Store Connect Issues: ITMS-91053: Missing API declaration / Required Reasons API #2527 HOT 1
- Multi_Flutters sample does not work with Flutter 3.19.5 HOT 3
- android_books Build errors HOT 1
- material_3_demo content.css downloaded twice HOT 4
- Time Picker UI breaks HOT 4
- Update `material _3_demo` for ColorScheme updates HOT 1
- Update `web_embedding` to new bootstrapping templates HOT 10
- [ai_recipe_generation] Unsupported operation: removeAt HOT 2
- Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'. HOT 6
- Navigation between Native iOS App and Flutter App HOT 1
- [testing_app] meta tracking issue for missing or inaccurate examples HOT 10
- Android presubmit does not pass on head
- [simplistic_editor] How to I get a copy of text and display it in a separate widget HOT 1
- Use 'baseline environment' for IDX templates
- Update dependencies for add to app examples
- Update docs related to Flutter spash screen HOT 3
- Error in ai_recipe_generation - encodable object: Instance of '_JsonMap'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samples.