Flutter Heroes
26.1K subscribers
272 photos
2 videos
31.1K links
Download Telegram
New post on /r/flutterdev subreddit:

Proper state management across routes
Using a TODOs app as an example, imagine you have a simple app with a list of TODOs displayed on the main screen, as well as second settings screen. In the settings screen, say you have a setting to that changes whether the text of each TODO is displayed in uppercase or lowercase.I can imagine a couple different methods that to achieve this:When pushing the settings screen, you could await the Navigator for a result. The settings screen must pop the Navigator with a result and the main screen interprets it and updates its state accordingly.Pass a callback to the settings screen which the settings screen calls when it updates the setting. The main screen rebuilds itself when the callback is called.(Similar to #2) Using the controller approach. For example, have a ValueNotifier<bool> in the main screen that contains the true/false value of whether or not to capitalize the text. The main screen uses ValueListenableBuilder as a parent to the ListView so it is rebuilt when the value changes. Then pass the notifier to the settings screen and when the settings screen updates the notifier, the list will rebuild.Use RouteAware on the main screen. When the navigation returns back to the main screen (onPopNextRoute), check if the setting is now different and rebuild if so.My problem is that none of these solutions seem good to me or I don't know which is best. Or maybe I'm missing something else.Solution #1 seems like the proper approach in that it waits for the settings screen to be finished and then you can determine whether to rebuild. But this seems like it would not be good with more complex routing. Like if the settings screen could navigate to other screens which might return back to the main screen. Ensuring the proper result is returned to the main screen sounds like it could get very tedious.Solutions #2 and #3 have the problem where updating the value on the settings screen will cause the main screen to be notified and rebuilt even when it is not being displayed to the user. Sure Flutter might be efficient but this just feels wrong. Or am I wrong to worry about this? I worry more for a larger app with many screens. Imagine updating a setting that rebuilds many different widgets on previous screens. Also, passing the callback/notifier around could get tedious with additional routes as well.Solution #4 seems okay, but it means caching each setting's previous value and comparing for differences, even if they have not even been touched in the settings screen. This approach is not one I've seen anyone else really use so I'm not too confident about using it even though this is what I'm currently using in my real app.

May 10, 2020 at 11:28AM by dumbnormie
https://ift.tt/2YN05NC
New post on /r/flutterdev subreddit:

Which course should I do next?
Hi Flutter devs,I've made a few flutter apps by now, but i feel that some structure is missing in them (and still have a few problems scaling sometimes) and I would like to do a course that would teach best practices. From what I have seen, people suggest the following:https://www.udemy.com/course/flutter-bootcamp-with-dart/https://www.udemy.com/course/flutter-firebase-build-a-complete-app-for-ios-android/https://www.udemy.com/course/learn-flutter-dart-to-build-ios-android-apps/If you have done any of all of this, which do you believe to be the one that makes you more "industry ready" ?Thanks for the help!

May 10, 2020 at 11:23AM by jd_portugal
https://ift.tt/3fwF67P
New post on /r/flutterdev subreddit:

Flutter UI - Animate emotions | Make emotions programmable using Rive / Flare !
Hey!I have uploaded my speedcode for the following UI usinf Rive/ Flare and a full tutorial series about is coming up!So subscribe for more such videos and tutorials!The code will be in the description of the video ! 📷:)Cheers!video link:https://www.youtube.com/watch?v=gr4C5_0edjc&feature=youtu.be

May 10, 2020 at 01:28PM by abhishekmah98
https://ift.tt/2WM732C
New post on /r/flutterdev subreddit:

FlutterForce — Week 76
https://ift.tt/2SM0QCP

May 10, 2020 at 02:00PM by flutterist
https://ift.tt/2xPm6Al
New post on Flutter Dev Google group:

Google Bucket Problem
Why we can't use google bucket from Bangladesh. We do everything but it wont work. What should we do to solve this problem?. :(

May 10, 2020 at 01:57PM by Shadman Sakib
https://ift.tt/3fCDF7x
New post on /r/flutterdev subreddit:

Open-Bonfire source code
As for the last weeks, I was updating a project I worked on to learn advanced Flutter.This app is quite simple, you create a post at a geographic location and your post is only available at this location. There are daily quests that give experience at completion or penalties at failure.The big challenge during those last weeks was to be able to run background tasks with BLoC state management. It works but I am aware that big improvement can be made performance-wise.The entire source code for Bonfire is available here. If you want to see the app in action check out the Google Play page.Disclaimer: The project is quite big, it may not be suited for complete beginners. Disclaimer 2: The code can be very messy at times (I was bored or something).

May 10, 2020 at 02:05PM by SSebigo
https://ift.tt/3fziT95
New post on /r/flutterdev subreddit:

Hyperlink Flutter Wordpress hyperlinks
Hi everybody!I'm building an app that gets data from a wordpress website. I set up the API and everything is working except hyperlinks that are embedded in the wordpress post.Right now I'm using this code to convert the html text to normal text: (wppost['content']['rendered']
                              ).toString()).documentElement.text),
                               style: TextStyle(
                                  fontWeight: FontWeight.normal, fontSize: 18),Is there a way to show the text with working hyperlinks?Thanks!

May 10, 2020 at 02:04PM by Benjaminvdm
https://ift.tt/3bh2rXz
New post on Flutter Dev Google group:

Show Slider.adaptive widget in Timestamp format
Hi, I want to implement a countdown timer. And i want to set the timer in the slider widget. But the slider widget wants a double. How can i show this in timestamp format? The time should go from 10 minutes to 12 hours and when i move the slider i want to see the hour and minute. I hope you can

May 10, 2020 at 02:24PM by Tolga Yildirim
https://ift.tt/3clTQnZ
New post on Flutter Dev Google group:

Publishing flutter web build to static hosting with new version will result in remnants of previous version still being shown in browser.
Publishing a flutter web build to static hosting with a new version will result in remnants of previous version still being shown in browser. Any idea why this occurs? And how do I prevent it from happening with new builds?

May 10, 2020 at 03:02PM by Daniel Legut
https://ift.tt/2LeWboH
New post on Flutter Dev Google group:

Plugins not working
Plugin Google Sign in and Facebook Login are not working on flutter 1.17 update Plugins not found

May 10, 2020 at 03:27PM by Waleed Abdel-Aziz
https://ift.tt/2yI7ZgB
New post on Flutter Dev Google group:

Im Slider.adaptive Widget einen Countdown-Timer einstellen
Hi Leute Ich möchte einen Slider.adaptive Widget implementieren. Ich möchte die Zeit ab 10 Minuten bis zu 12 Stunden einstellen können. Wenn ich das einstelle möchte ich nur die Stunden und Minuten einstellen können. Die Sekunden sollen dann wenn es eingestellt wurde auch angezeigt werden. Das

May 10, 2020 at 04:00PM by Tolga Yildirim
https://ift.tt/3cl7wj3
New post on /r/flutterdev subreddit:

Flutter and the Web. Your experience?
So how's Flutter for the web?Good aspects, bad ones, what is it good for, and bad for.. what's your experience?

May 10, 2020 at 09:21PM by Robert_Bobbinson
https://ift.tt/3bmLET3
New post on /r/flutterdev subreddit:

<b>I made a simple meditation app with Flutter in ONE WEEK</b>
I was just looking for a clean implementation of a meditation app. I just want something that would get me to meditating as fast as I can.I don't want to sign up or be offered a subscription or a paid course, or to even hear a guide. The most popular ones, <strong>Headspace</strong>, and <strong>Calm</strong> had IAPs and probably some sort of tracking (to keep the shareholders informed! Results have to be measured somehow!).I really just wanted a simple meditation app that got to the point as fast and as beautiful as possible.So I made my own app: <strong>justBreathe</strong>It's simple a meditation timer. You determine how long the session is; if you want a ticking timer or a beautiful animation; and if you want to hear a gong at the beginning and end of the session.This is my gift to the world. If this app helps someone attain clarity, and relaxation, even just one person, then all of the man-hours I've put into it would be worth it.How Flutter enabled my VisionFlutter really helps developers iterate VERY quickly. Especially for a solo-project, where you literally have the control to create and define your own features, the sky is the limit.I didn't need much to get started. I just needed a State Management solution outside of SetState (because I needed an easy way to pass and share data between Widgets, without implementing my own InheritedWidget or ScopedModel). I read a few articles on it, like <a href="https://flutter.dev/docs/development/data-and-backend/state-mgmt/simple">Simple App State Management</a> and <a href="https://medium.com/coding-with-flutter/flutter-state-management-setstate-bloc-valuenotifier-provider-2c11022d871b">Flutter State Management: setState, BLoC, ValueNotifier, Provider</a>. <strong>Provider and ChangeNotifier were more than enough for this use-case.</strong>The implementation doesn't have a clear or strong architecture. I just went with what I knew, which was a typical MVC-U architecture. Well, in this case, Data-Screen-Utils architecture. I separated the domain of data, business logic, and UI. Though there's much more work to be done in terms of refactoring, getting to an MVP took less than 3 days.The animations were easy to work with. Having had experience with Pebble and animations using C language, working with Dart was a breeze and an absolute pleasure. I implemented page Route transitions with the help of some code from <a href="/user/gskinner_team">u/gskinner_team</a> with their article <a href="https://blog.gskinner.com/archives/2020/03/flutter-simplify-your-pageroutes.html">Flutter: Simplify your PageRoutes</a>.It was easy to add simple animations through the app to make the experience better.Then when I had my MVP, I began to work on localization. I used the <a href="https://pub.dev/packages/intl">intl</a> package and with the help of <a href="https://marketplace.visualstudio.com/items?itemName=localizely.flutter-intl">Localizely's Intl extension</a>, (and with the help of my GF and a generous and skilled translator on Reddit), I manage to implement french localizations!PublishingI was eager to publish. I just had to follow this <a href="https://flutter.dev/docs/deployment/android">article from flutter.dev on how to release an Android App.</a> It was easy to do.I used a fastlane as my CD, but to get to the market fast, I just literally did flutter build appbundle. Took screenshots and published to production on Google Play Console.The review process took 6 days? <strong>This means between planning, developing, publishing this app, the publishing review process took longer than the app creation process!</strong> Granted it's a simple MVP, but I just want to emphasize how quick the development process was.Final ThoughtsOverall, creating a Flutter App allows for the creation of beautiful and performant apps, very quickly. As a one-man team, this project was enjoyable. Flutter really allowed…
New post on /r/flutterdev subreddit:

Flutter Web and Chrome (browser) extensions
Will there be a way for Chrome (browser) extensions to work with websites made with Flutter Web?For example:Password managersContent (ad) blockersAs I understand, Flutter Web is just a canvas on which the UI is painted, so it has noting to do with DOM elements that can be interacted with.

May 10, 2020 at 10:00PM by momentumiseverything
https://ift.tt/2YQT668
New post on /r/flutterdev subreddit:

Why decode HTTP response if a json response is returned from the server?
Hello,I was wondering about why it is necessary to call json.decode() on an http response.body if the server sends the result as a json object already. I understand that the Response object stores 'body' as a string, but why? Why doesn't it store 'body' as json object if it was sent as json from the backend.I'm just thinking about this from a performance point of view as serializing and deserializing are a bit computationally expensive.

May 10, 2020 at 09:37PM by ju_98u
https://ift.tt/2YPPWzJ
New post on /r/flutterdev subreddit:

Best practice for UI scaling / responsiveness
So I made the whole design without having the responsive part on my mind, loaded app on smaller screen device and everything was huge. What would be the best approach to deal with this? I saw some plugin ScreenUtil or something. Can someone just tell me what is the most correct way to deal with this?

May 10, 2020 at 10:29PM by itsdjoki
https://ift.tt/2YSns8u