New post on /r/flutterdev subreddit:
I'm looking for study buddies
Hi everyone,I bought "The Complete 2021 Flutter Development Bootcamp with Dart" I'm looking for study buddies -- we will learn everyday, motivate and hold each other accountableI'm on section 6 after 5 days and picked up ebooks from here and there
November 11, 2021 at 08:16AM by LifeLongLearner2030
https://ift.tt/3Hn9UG3
I'm looking for study buddies
Hi everyone,I bought "The Complete 2021 Flutter Development Bootcamp with Dart" I'm looking for study buddies -- we will learn everyday, motivate and hold each other accountableI'm on section 6 after 5 days and picked up ebooks from here and there
November 11, 2021 at 08:16AM by LifeLongLearner2030
https://ift.tt/3Hn9UG3
Udemy
The Complete Flutter Development Bootcamp with Dart
Officially created in collaboration with the Google Flutter team.
New post on /r/flutterdev subreddit:
Some observations about the Flutter router and opening nested routes on the web. onGenerateRoute is called multiple times.
TLDRI request an initial route of /home/1/2/3/4/5 , but onGenerateRoute is called 7 times, 7 states are allocated and 7 widgets are built. One is expected for each.Solution: Use onGenerateInitialRoutes to override the default behavior.Deep Dive:I'm going to share what I've learned out of my own research when facing this issue.When opening a deep link, the flutter router recreates all the prior router/history states of the app.This means that the back button can return the user trough all the screens needed to get there even if it got there via deep linking.This behavior makes sense for mobile devices. However, on the web, this behavior is not wanted.If we load a deep link such as: http://domain/s/lorem-ipsum/all/posts we end up initialising each route level if it has it's own screen definedIf you happen to have the same component on all levels this in turn leads to 5 sets of duplicated API calls which is completely unacceptableTherefore we can use onGenerateInitialRoutes to prevent this behavior from occurring.The default history stack is overridden with a router/history stack with just one statemain.dart
November 11, 2021 at 01:31PM by SpaceInstructor
https://ift.tt/3F4wiBV
Some observations about the Flutter router and opening nested routes on the web. onGenerateRoute is called multiple times.
TLDRI request an initial route of /home/1/2/3/4/5 , but onGenerateRoute is called 7 times, 7 states are allocated and 7 widgets are built. One is expected for each.Solution: Use onGenerateInitialRoutes to override the default behavior.Deep Dive:I'm going to share what I've learned out of my own research when facing this issue.When opening a deep link, the flutter router recreates all the prior router/history states of the app.This means that the back button can return the user trough all the screens needed to get there even if it got there via deep linking.This behavior makes sense for mobile devices. However, on the web, this behavior is not wanted.If we load a deep link such as: http://domain/s/lorem-ipsum/all/posts we end up initialising each route level if it has it's own screen definedIf you happen to have the same component on all levels this in turn leads to 5 sets of duplicated API calls which is completely unacceptableTherefore we can use onGenerateInitialRoutes to prevent this behavior from occurring.The default history stack is overridden with a router/history stack with just one statemain.dart
... return MaterialApp( ... initialRoute: user != null ? '/' : '/login', // The default history stack is overridden with a router/history stack with just one state // In this case I used fluro but any other onGenerateRoute method will do the trick onGenerateInitialRoutes: (initialRoute) => [appRouter.generator(RouteSettings(name: initialRoute))!], onGenerateRoute: appRouter.generator, );router.dart
final appRouter = FluroRouter(); void defineAppRoutes() { final routes = { // Auth '/login': LoginPage(), '/register': RegisterPage(), // Pages '/': MainFeed(), '/s': MainFeed(), '/s/:spaceId': MainFeed(), '/s/:spaceId/:activityId': MainFeed(), '/s/:spaceId/:activityId/posts': MainFeed(), ... many more such routes }; routes.forEach((route, page) { appRouter.define(route, handler: Handler( handlerFunc: (BuildContext? context, Map<String, List<String>> params) => page, )); }); // Not found appRouter.notFoundHandler = Handler( handlerFunc: (BuildContext? context, Map<String, dynamic> params) { return NotFoundPage(); }); }Performance/Billing concernsSome of you might be using Firebase and possibly planning to run an app with high volumes of traffic. Therefore it is quite important to pay attention to what your router does. You might be sending requests for more data than what you actually need to load for your first view of the app. Especially for sharing links on the web this might be costly if you don't optimize your API calls. Since Firebase does everything via websockets make sure you either place print statements in all your API calls or you can also switch to json-server during development to get a better view of the HTTP calls in the developer tools. There are many ways to handle this optimisation. What matters first of all is to be aware of your API calls and how many. I was able to generate 15K api calls with 3-4 work hours using an unoptimised version of my app.Final NotesinitState will be called as many route segments as you have unless you override onGenerateInitialRoutesbuild is called as many times as flutter thinks there's a change event. As long as you don't do any complex logic or any API calls during the build stage it's not that bad. Similar to React or Angular the change detection algo makes sure that if duplicate builds happen only the relevant changes are computed.I'm still learning some of this stuff so please excuse me if I used some wrong terms. Let me know how can I improve this post or if got something completely wrong. Hopefully it helps you.
November 11, 2021 at 01:31PM by SpaceInstructor
https://ift.tt/3F4wiBV
reddit
Some observations about the Flutter router and opening nested...
**TLDR** I request an initial route of **/home/1/2/3/4/5** , but onGenerateRoute is called 7 times, 7 states are allocated and 7 widgets are...
New post on /r/flutterdev subreddit:
Large examples of Provider + ChangeNotifier architecture?
Does anyone have any good example apps of arobust app architecture using ChangeNotifier + Provider?I am looking for complete app examples that go much further than just the counter example. I have yet to find a good example app that is actually of a quality to ship as a professional production ready app.Thanks!
November 11, 2021 at 05:48PM by scorr204
https://ift.tt/3C1JC8l
Large examples of Provider + ChangeNotifier architecture?
Does anyone have any good example apps of arobust app architecture using ChangeNotifier + Provider?I am looking for complete app examples that go much further than just the counter example. I have yet to find a good example app that is actually of a quality to ship as a professional production ready app.Thanks!
November 11, 2021 at 05:48PM by scorr204
https://ift.tt/3C1JC8l
Reddit
[deleted by user] : r/FlutterDev
19 votes, 10 comments. 111K subscribers in the FlutterDev community. A community for the publishing of news and discussion about Flutter. This…
New tweet from FlutterDev:
📲 Don’t waste your user’s data Be a pro and use the cached_network_image package to avoid redownloading images 👌 Check out #PackageoftheWeek → https://t.co/kvfdUtKSUl https://t.co/RC4szTdQnk— Flutter (@FlutterDev) Nov 11, 2021
November 11, 2021 at 07:30PM
https://twitter.com/FlutterDev/status/1458864664603934720
📲 Don’t waste your user’s data Be a pro and use the cached_network_image package to avoid redownloading images 👌 Check out #PackageoftheWeek → https://t.co/kvfdUtKSUl https://t.co/RC4szTdQnk— Flutter (@FlutterDev) Nov 11, 2021
November 11, 2021 at 07:30PM
https://twitter.com/FlutterDev/status/1458864664603934720
YouTube
CachedNetworkImage (Package of the Week)
Learn more about CachedNetworkImage → https://goo.gle/3wovaGc
A picture is worth 1,000 words, but is it worth 2,000? Use CachedNetworkImage to stop re-downloading images in your Flutter apps 🌄💙
This video is also subtitled in Chinese, Indonesian, Italian…
A picture is worth 1,000 words, but is it worth 2,000? Use CachedNetworkImage to stop re-downloading images in your Flutter apps 🌄💙
This video is also subtitled in Chinese, Indonesian, Italian…
New post on /r/flutterdev subreddit:
CachedNetworkImage (Package of the Week)
https://youtube.com/watch?v=fnHr_rsQwDA&feature=share
November 11, 2021 at 07:41PM by Pixelreddit
https://ift.tt/30f0riC
CachedNetworkImage (Package of the Week)
https://youtube.com/watch?v=fnHr_rsQwDA&feature=share
November 11, 2021 at 07:41PM by Pixelreddit
https://ift.tt/30f0riC
YouTube
CachedNetworkImage (Package of the Week)
Learn more about CachedNetworkImage → https://goo.gle/3wovaGc
A picture is worth 1,000 words, but is it worth 2,000? Use CachedNetworkImage to stop re-downloading images in your Flutter apps 🌄💙
This video is also subtitled in Chinese, Indonesian, Italian…
A picture is worth 1,000 words, but is it worth 2,000? Use CachedNetworkImage to stop re-downloading images in your Flutter apps 🌄💙
This video is also subtitled in Chinese, Indonesian, Italian…
New tweet from FlutterDev:
🦋 Chapter 6: Pop Quiz! Which of the following is NOT a benefit of using Provider? #flutterapprentice— Flutter (@FlutterDev) Nov 11, 2021
November 11, 2021 at 10:04PM
https://twitter.com/FlutterDev/status/1458903597014401031
🦋 Chapter 6: Pop Quiz! Which of the following is NOT a benefit of using Provider? #flutterapprentice— Flutter (@FlutterDev) Nov 11, 2021
November 11, 2021 at 10:04PM
https://twitter.com/FlutterDev/status/1458903597014401031
Twitter
Flutter
🦋 Chapter 6: Pop Quiz! Which of the following is NOT a benefit of using Provider? #flutterapprentice
New post on /r/flutterdev subreddit:
How to add signature on pdf
Good evening, I am in a project of digitally signing documents, and I need to add the signatures of each user in a pdf document and I did some research and I can't find much information, any ideas? or any library that can help me.PD: I have the signatures in image format, I capture them with the syncfusion_flutter_signaturepad packageThanks in advance
November 11, 2021 at 11:35PM by SirChavero
https://ift.tt/3wD8jqo
How to add signature on pdf
Good evening, I am in a project of digitally signing documents, and I need to add the signatures of each user in a pdf document and I did some research and I can't find much information, any ideas? or any library that can help me.PD: I have the signatures in image format, I capture them with the syncfusion_flutter_signaturepad packageThanks in advance
November 11, 2021 at 11:35PM by SirChavero
https://ift.tt/3wD8jqo
reddit
How to add signature on pdf
A subreddit for Google's portable UI framework.
New tweet from FlutterDev:
🎉 #DevFest 2021 is an amazing opportunity to get together, catch up on the latest tech news 🌟 and meet fellow developers. You're invited to #DevFestInspire, a European celebration like no other! 🥳 Let's meet on December 9 (5-9 CET). Register now ➡️ https://t.co/LXib4Rnlci https://t.co/QaBMPgn7ny— Flutter (@FlutterDev) Nov 11, 2021
November 12, 2021 at 12:00AM
https://twitter.com/FlutterDev/status/1458932576991825920
🎉 #DevFest 2021 is an amazing opportunity to get together, catch up on the latest tech news 🌟 and meet fellow developers. You're invited to #DevFestInspire, a European celebration like no other! 🥳 Let's meet on December 9 (5-9 CET). Register now ➡️ https://t.co/LXib4Rnlci https://t.co/QaBMPgn7ny— Flutter (@FlutterDev) Nov 11, 2021
November 12, 2021 at 12:00AM
https://twitter.com/FlutterDev/status/1458932576991825920
google
DevFest Inspire
Virtual Event - The Google Developers teams from Europe and Africa will be hosting, for the first time, the “DevFest Inspire” on December 9th to celebrate the end of the DevFest season.
New post on /r/flutterdev subreddit:
Smart/Dump components, Functions and\or Providers
I'm a long term developer who just got into Flutter for a side project I'm working on. I've made a ton of progress with an app that a customer is ordering, but I'm kinda struggling with what should hold my application logic ie. executes a series of steps to maintain state for better user experience. Do note that I'm not talking about business logic. That resides somewhere else.I'm curious to know what is your preferred method of working in regards to what block in your Flutter app is the smart one? Is it the components, the provider or some other class\function. I'd love to have some reading material in regards to this. An example:Let's assume you're working on an app that needs to connect to some other device via a WebSocket connection. So you have a button that when pressed initiates the connection. You also have to let the user know that now you have a connection (flip button from red to green). You also have a requirement to auto connect to that device when the app starts, if it was previously connected to. So that means holding information about having to auto-connect or not, somewhere in a local database of sorts, let's say SQLite or Hive.So, what is your preferred solution here?Do you have your component do the connecting, putting that connection in a Provider and putting that connection information (like a device ID or smth) into a local database for auto-connect, ie. your component holds all the cards like WebSocket, Provider and SQLite or Hive?Does your component call a Provider to do all of that stuff for you and the component just listens to changes there and maybe flips a "Connect" button to "Disconnect"Do you create a class or a function that holds application logic and handles orchestration (as small as it is?)Do you just put that stuff all over the place and pull out your hair trying to find it later on.
November 12, 2021 at 08:10AM by rcls0053
https://ift.tt/3F8BVyX
Smart/Dump components, Functions and\or Providers
I'm a long term developer who just got into Flutter for a side project I'm working on. I've made a ton of progress with an app that a customer is ordering, but I'm kinda struggling with what should hold my application logic ie. executes a series of steps to maintain state for better user experience. Do note that I'm not talking about business logic. That resides somewhere else.I'm curious to know what is your preferred method of working in regards to what block in your Flutter app is the smart one? Is it the components, the provider or some other class\function. I'd love to have some reading material in regards to this. An example:Let's assume you're working on an app that needs to connect to some other device via a WebSocket connection. So you have a button that when pressed initiates the connection. You also have to let the user know that now you have a connection (flip button from red to green). You also have a requirement to auto connect to that device when the app starts, if it was previously connected to. So that means holding information about having to auto-connect or not, somewhere in a local database of sorts, let's say SQLite or Hive.So, what is your preferred solution here?Do you have your component do the connecting, putting that connection in a Provider and putting that connection information (like a device ID or smth) into a local database for auto-connect, ie. your component holds all the cards like WebSocket, Provider and SQLite or Hive?Does your component call a Provider to do all of that stuff for you and the component just listens to changes there and maybe flips a "Connect" button to "Disconnect"Do you create a class or a function that holds application logic and handles orchestration (as small as it is?)Do you just put that stuff all over the place and pull out your hair trying to find it later on.
November 12, 2021 at 08:10AM by rcls0053
https://ift.tt/3F8BVyX
Reddit
r/FlutterDev on Reddit: Smart/Dump components, Functions and\or Providers
Posted by u/rcls0053 - 2 votes and 11 comments
New post on /r/flutterdev subreddit:
Your view on using 3rd party library for responsiveness in flutter application
Is it professional to use 3rd party library like flutter_screenutils for responsive app design?AS IN:Text responsiveness throughout different devices.UI responsiveness throughout the different layoutHandling flutter font size issue, where 20 px will be something else on another device's screenIt's confusing.#Flutter
November 12, 2021 at 10:16AM by Lucky_Looper
https://ift.tt/30jcjAt
Your view on using 3rd party library for responsiveness in flutter application
Is it professional to use 3rd party library like flutter_screenutils for responsive app design?AS IN:Text responsiveness throughout different devices.UI responsiveness throughout the different layoutHandling flutter font size issue, where 20 px will be something else on another device's screenIt's confusing.#Flutter
November 12, 2021 at 10:16AM by Lucky_Looper
https://ift.tt/30jcjAt
Dart packages
flutter_screenutil | Flutter package
A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
New post on /r/flutterdev subreddit:
Tip: How to avoid badly cropped rounded avatars: round your animation values
I've been noticing that in certain cases the avatars of my app tend to be slightly cropped. Although I made sure that all dimensions match from PSD to Widget sometimes this crop shows up. After brainstorming a bit I've figured out that this is due to the animation that I apply to this particular sidebar (Container). Due to the way the numbers are computed the final animation ends up in a state where the position includes a decimal value. This slight missalignment is enough to trick the the image rastering algo to "skip a row of pixels". That is just enough to make the avatar look clipped. The solution was to round the final value thus eliminating the subpixel missalignment.Here's a little demo image to compare the results: https://imgur.com/a/ZfOdjvO
November 12, 2021 at 01:08PM by SpaceInstructor
https://ift.tt/3naGfYy
Tip: How to avoid badly cropped rounded avatars: round your animation values
I've been noticing that in certain cases the avatars of my app tend to be slightly cropped. Although I made sure that all dimensions match from PSD to Widget sometimes this crop shows up. After brainstorming a bit I've figured out that this is due to the animation that I apply to this particular sidebar (Container). Due to the way the numbers are computed the final animation ends up in a state where the position includes a decimal value. This slight missalignment is enough to trick the the image rastering algo to "skip a row of pixels". That is just enough to make the avatar look clipped. The solution was to round the final value thus eliminating the subpixel missalignment.Here's a little demo image to compare the results: https://imgur.com/a/ZfOdjvO
November 12, 2021 at 01:08PM by SpaceInstructor
https://ift.tt/3naGfYy
Imgur
Tip: How to avoid badly cropped rounded avatars: round your animation values
Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users.
New post on /r/flutterdev subreddit:
App Feedback Thread - November 12, 2021
This thread is for getting feedback on your own apps.Developers:must provide feedback for othersmust include Play Store, App Store, GitHub, GitLab, or BitBucket linkmust make top level commentmust make effort to respond to questions and feedback from commentersmay be open or closed sourceCommenters:must give constructive feedback in replies to top level commentsmust not include links to other appsTo cut down on spam, accounts who are too young or do not have enough karma to post will be removed. Please make an effort to contribute to the community before asking for feedback.As always, the mod team is only a small group of people, and we rely on the readers to help us maintain this subreddit. Please report any rule breakers. Thank you.- r/FlutterDev Mods
November 12, 2021 at 03:00PM by AutoModerator
https://ift.tt/3c7XoeQ
App Feedback Thread - November 12, 2021
This thread is for getting feedback on your own apps.Developers:must provide feedback for othersmust include Play Store, App Store, GitHub, GitLab, or BitBucket linkmust make top level commentmust make effort to respond to questions and feedback from commentersmay be open or closed sourceCommenters:must give constructive feedback in replies to top level commentsmust not include links to other appsTo cut down on spam, accounts who are too young or do not have enough karma to post will be removed. Please make an effort to contribute to the community before asking for feedback.As always, the mod team is only a small group of people, and we rely on the readers to help us maintain this subreddit. Please report any rule breakers. Thank you.- r/FlutterDev Mods
November 12, 2021 at 03:00PM by AutoModerator
https://ift.tt/3c7XoeQ
Reddit
From the FlutterDev community on Reddit
Explore this post and more from the FlutterDev community
New post on /r/flutterdev subreddit:
Building my first Flutter app | Learning to fly
https://youtube.com/watch?v=CkcvVZZEsJE&feature=share
November 12, 2021 at 07:00PM by Pixelreddit
https://ift.tt/3qyKLlK
Building my first Flutter app | Learning to fly
https://youtube.com/watch?v=CkcvVZZEsJE&feature=share
November 12, 2021 at 07:00PM by Pixelreddit
https://ift.tt/3qyKLlK
YouTube
Building my first Flutter app | Learning to Fly
Follow along with Khanh’s journey as she builds her first Flutter app. From ideation down to the moments of confusion, learn alongside her as she asks important questions like: “What is the best way to build out a theme? How to approach using fonts?” And…
New post on /r/flutterdev subreddit:
flutter how to install?
/r/archlinux/comments/qsgu9s/flutter_how_to_install/
November 12, 2021 at 06:59PM by infinitecoolname
https://ift.tt/3or5KUz
flutter how to install?
/r/archlinux/comments/qsgu9s/flutter_how_to_install/
November 12, 2021 at 06:59PM by infinitecoolname
https://ift.tt/3or5KUz
Reddit
From the FlutterDev community on Reddit: flutter how to install?
Posted by infinitecoolname - No votes and 1 comment
New post on /r/flutterdev subreddit:
Cool Flutter Notes App with complex UI, Feedback Appreciated 💫
https://ift.tt/3q1Jotz
November 12, 2021 at 06:22PM by 31Carlton7
https://ift.tt/3qFC1tM
Cool Flutter Notes App with complex UI, Feedback Appreciated 💫
https://ift.tt/3q1Jotz
November 12, 2021 at 06:22PM by 31Carlton7
https://ift.tt/3qFC1tM
GitHub
GitHub - 31Carlton7/flutter_notes_app: A clean, and modern note taking app that has a complex ui, entirely built with Flutter. 🚀
A clean, and modern note taking app that has a complex ui, entirely built with Flutter. 🚀 - GitHub - 31Carlton7/flutter_notes_app: A clean, and modern note taking app that has a complex ui, entirel...
New tweet from FlutterDev:
🌟 What's it like building a Flutter app for the first time? 💙 Find out in our new vlog series! Tune into our new series #LearningtoFly to walk through the process of building a Flutter app with fellow newbie @KhanhNwin & seasoned pro @Fitzface! 📺 → https://t.co/3rMnRaRccB https://t.co/IoicmaqMzj— Flutter (@FlutterDev) Nov 12, 2021
November 12, 2021 at 07:30PM
https://twitter.com/FlutterDev/status/1459227075366330372
🌟 What's it like building a Flutter app for the first time? 💙 Find out in our new vlog series! Tune into our new series #LearningtoFly to walk through the process of building a Flutter app with fellow newbie @KhanhNwin & seasoned pro @Fitzface! 📺 → https://t.co/3rMnRaRccB https://t.co/IoicmaqMzj— Flutter (@FlutterDev) Nov 12, 2021
November 12, 2021 at 07:30PM
https://twitter.com/FlutterDev/status/1459227075366330372
YouTube
Building my first Flutter app | Learning to Fly
Follow along with Khanh’s journey as she builds her first Flutter app. From ideation down to the moments of confusion, learn alongside her as she asks important questions like: “What is the best way to build out a theme? How to approach using fonts?” And…
New post on /r/flutterdev subreddit:
Flutter Lifecycle In 15 Minutes
https://ift.tt/30r27Gr
November 12, 2021 at 07:15PM by fredgrott
https://ift.tt/30fcPzi
Flutter Lifecycle In 15 Minutes
https://ift.tt/30r27Gr
November 12, 2021 at 07:15PM by fredgrott
https://ift.tt/30fcPzi
Medium
Flutter Lifecycle In 15 Minutes
Why should we care about the Flutter App lifecycle? I mean, we only have these app lifecycle events; push, visible, active, inactive…
New post on /r/flutterdev subreddit:
How do you comprehend abstraction
Hey all, I have been learning Bloc and I thought I was at a decent level enough to dive deeper into the tutorials but I don't understand why some things are done at this point. I know that Bloc is famous for its boilerplate but that's not at all the issue here. It's everything else.I know you are supposed to abstract certain details in your app so that they are reusable or can be changed without affecting other components too much but it gets to a point where I'm lost and I don't understand what does what and why we are separating it into its own module.It was a simple weather app that I got lost with and I don't know how anyone can understand production level code. I've only built apps for myself and only recently started collaborating on GitHub so that might be it but the confusion I get from reading some code and not immediately understanding what it does makes me want to give up sometimes.I do understand the code I see in front of me but conceptualizing how everything comes together seems too much for my head. It's strange to look like a chore especially when it comes to testing large swaths of code.
November 12, 2021 at 09:39PM by HenryNanaAdu
https://ift.tt/3FhmS6l
How do you comprehend abstraction
Hey all, I have been learning Bloc and I thought I was at a decent level enough to dive deeper into the tutorials but I don't understand why some things are done at this point. I know that Bloc is famous for its boilerplate but that's not at all the issue here. It's everything else.I know you are supposed to abstract certain details in your app so that they are reusable or can be changed without affecting other components too much but it gets to a point where I'm lost and I don't understand what does what and why we are separating it into its own module.It was a simple weather app that I got lost with and I don't know how anyone can understand production level code. I've only built apps for myself and only recently started collaborating on GitHub so that might be it but the confusion I get from reading some code and not immediately understanding what it does makes me want to give up sometimes.I do understand the code I see in front of me but conceptualizing how everything comes together seems too much for my head. It's strange to look like a chore especially when it comes to testing large swaths of code.
November 12, 2021 at 09:39PM by HenryNanaAdu
https://ift.tt/3FhmS6l
reddit
How do you comprehend abstraction
Hey all, I have been learning Bloc and I thought I was at a decent level enough to dive deeper into the tutorials but I don't understand why some...
New tweet from FlutterDev:
D. UI whitespace is the correct answer! 🥳— Flutter (@FlutterDev) Nov 12, 2021
November 12, 2021 at 10:30PM
https://twitter.com/FlutterDev/status/1459272312721604610
D. UI whitespace is the correct answer! 🥳— Flutter (@FlutterDev) Nov 12, 2021
November 12, 2021 at 10:30PM
https://twitter.com/FlutterDev/status/1459272312721604610
Twitter
Flutter
D. UI whitespace is the correct answer! 🥳
New post on /r/flutterdev subreddit:
ListView Render Behaviour
I am creating a chat page as part of a project I'm working on. In a demo, I run a bit of logic in the ListView.builder to obtain the details of the next chat message to inform specific UI rendering. To be precise, the structure of the message widget should change if it was the last of its "kind" like WhatsApp does.To test this, I passed two arguments to the message widget; <message> the actual message, and <next>, the one after. If the message was the last in the list, then <next> would be null.I gave it a test run with some dummy data. The messages would not render a date unless they were the last from either myself or someone else. All was well.At least, until I tried to update the dummy message list with new data. The previous "last" message widgets seem to maintain the "null" value of <next> even though they are no longer the last. It's quite an interesting situation because values like the index and message list length were refreshing predictably when I chose to display them. InitState was also being called for each widget.Does anyone have an idea of what is happening behind the scenes?PS: I plan to achieve this differently, in practice. The chat pages are ephemeral, so I assume I can get away with some stuff, but any advice is still welcome.
November 13, 2021 at 01:27AM by GingsWife
https://ift.tt/2YFJzBi
ListView Render Behaviour
I am creating a chat page as part of a project I'm working on. In a demo, I run a bit of logic in the ListView.builder to obtain the details of the next chat message to inform specific UI rendering. To be precise, the structure of the message widget should change if it was the last of its "kind" like WhatsApp does.To test this, I passed two arguments to the message widget; <message> the actual message, and <next>, the one after. If the message was the last in the list, then <next> would be null.I gave it a test run with some dummy data. The messages would not render a date unless they were the last from either myself or someone else. All was well.At least, until I tried to update the dummy message list with new data. The previous "last" message widgets seem to maintain the "null" value of <next> even though they are no longer the last. It's quite an interesting situation because values like the index and message list length were refreshing predictably when I chose to display them. InitState was also being called for each widget.Does anyone have an idea of what is happening behind the scenes?PS: I plan to achieve this differently, in practice. The chat pages are ephemeral, so I assume I can get away with some stuff, but any advice is still welcome.
November 13, 2021 at 01:27AM by GingsWife
https://ift.tt/2YFJzBi
reddit
ListView Render Behaviour
I am creating a chat page as part of a project I'm working on. In a demo, I run a bit of logic in the ListView.builder to obtain the details of...
New post on /r/flutterdev subreddit:
Have you switched from stream-based state management to any other and why?
I've been developing Flutter apps since the early 2018, and what got me in love with streams was a 2018 I/O talk by Matt and Filip from the Flutter team, which looks like it has since been deleted.I've lucked out at my current job and got to decide on the state management approach, obviously I've went for something I'm well familiar with, and that's using StreamBuilder, StreamSubscription and Stream objects to handle state management (alongside some setState and StatefulBuilder widgets here and there). We've built a functionally very large webshop, and are on the track to release it! I'm actually surprised by how little bugs we've encountered, so I don't think complexity is an issue.My question is: have you used stream-based solutions in a professional capacity, and have you switched from it to any other solution and why? If it means anything, my colleagues seem to have gotten a good grip on streams, so that's not a concern.Many thanks.EDIT: Any issues you've noticed that resulted in you not choosing stream-based state management?
November 13, 2021 at 01:24AM by No_Appearance4886
https://ift.tt/3C9Hnjd
Have you switched from stream-based state management to any other and why?
I've been developing Flutter apps since the early 2018, and what got me in love with streams was a 2018 I/O talk by Matt and Filip from the Flutter team, which looks like it has since been deleted.I've lucked out at my current job and got to decide on the state management approach, obviously I've went for something I'm well familiar with, and that's using StreamBuilder, StreamSubscription and Stream objects to handle state management (alongside some setState and StatefulBuilder widgets here and there). We've built a functionally very large webshop, and are on the track to release it! I'm actually surprised by how little bugs we've encountered, so I don't think complexity is an issue.My question is: have you used stream-based solutions in a professional capacity, and have you switched from it to any other solution and why? If it means anything, my colleagues seem to have gotten a good grip on streams, so that's not a concern.Many thanks.EDIT: Any issues you've noticed that resulted in you not choosing stream-based state management?
November 13, 2021 at 01:24AM by No_Appearance4886
https://ift.tt/3C9Hnjd
Reddit
Have you switched from stream-based state management to any other and why? : r/FlutterDev
15 votes, 13 comments. 111K subscribers in the FlutterDev community. A community for the publishing of news and discussion about Flutter. This…