Flutter Heroes
26.1K subscribers
272 photos
2 videos
31.1K links
Download Telegram
New tweet from FlutterDev:

💙 🔥 DartPad support is here! Making it easier to write code with Firebase and Flutter together. Tune in to #FirebaseSummit to ask the team your questions live → https://t.co/7QGJ2SSna4 https://t.co/fXiBE0bFIP— Flutter (@FlutterDev) Nov 10, 2021

November 10, 2021 at 07:10PM
https://twitter.com/FlutterDev/status/1458497358270844931
New tweet from FlutterDev:

B. ListView is the correct answer! 🥳— Flutter (@FlutterDev) Nov 10, 2021

November 10, 2021 at 08:30PM
https://twitter.com/FlutterDev/status/1458517389876756483
New post on /r/flutterdev subreddit:

Firebase Auth/CloudStore support for DartPad
Earlier today on the Firebase Summit keynote, they mentioned that <dartpad.dev> now supports firebase_auth und cloud_firestore. I'm not sure whether this is useful beyond simple examples but still, it's nice, and perhaps more packages (like provider etc.) will be supported in the future.https://twitter.com/FlutterDev/status/1458497358270844931

November 10, 2021 at 11:17PM by eibaan
https://ift.tt/3wxs7LQ
New post on /r/flutterdev subreddit:

How to add signature on pdf
Good evening, I am in a project of signing documents digitally, and I need to add the signatures in a pdf document and researched and I can't find much information, any ideas? or any library that can help me.Thanks in advance

November 11, 2021 at 06:47AM by SirChavero
https://ift.tt/2YyIHhM
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
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
... 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
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
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
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 package​Thanks in advance

November 11, 2021 at 11:35PM by SirChavero
https://ift.tt/3wD8jqo
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
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
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
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
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
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