Flutter Heroes
25.9K subscribers
272 photos
2 videos
31.1K links
Download Telegram
New post on Flutter Dev Google group:

Add to app Android - missing assets
Hey Team, So I've using the add to app functionality for our mobile applications and having some issues when trying to get my Flutter app working on Android (already implemented within iOS app with no issues). Seems the package I'm using (flutter_dotenv) is unable to find the assets listed in my

December 31, 2019 at 01:16AM by Jake Gillingham
https://ift.tt/2ZECLQI
New post on /r/flutterdev subreddit:

Clarification about Provider as a State Management lib
Feel free to correct me if I was wrong at some points below.First, let me declare this. Provider standing alone is not a state management library, it is a providing stuff library.It is considering a state management TECHNIQUE when you combine some pre-defined widgets of Provider like Consumer, Selector with ChangeNotifier or Stream or whatever dynamically changing state holders.Static:If I want to provide something statically up from the top to the bottom widgets (just a couple of widgets or globally based on the scope). I see nothing easier than using Provider. It allows me to not have to define the same parameters in my widget constructor deep down in the widget tree. That's all. In this case, you don't need to pass context for the Provider to get what you want, just a reminder.Dynamic:- In ChangeNotifier, it uses notifyListener() to 'notify' 'listeners' about the changing event.- In Stream, it uses event pipelines. We still have to define listening logic to events emitting.As I said above, there are various techniques to handle state management in Flutter, and addListener(()=>setState()) is the most well-known, but ppl keep asking questions (after watching Pragmatic state management video) seem confused about this.The problem of addListener(()=>setState()) is that it rebuilds the whole widget. So maybe there are nesting widgets that don't need to be rebuilt when the state changes.Nothing fancy about this, just throw your addListener(()=>setState()) inside a stateful widget, making sure the whole widget (meaning every nesting widgets inside) is needed to be rebuilt for your logic. OR, you can use pre-defined widgets that Flutter generously provided for us: AnimatedBuilder, StreamBuilder, FutureBuilder,...Yes, we can use AnimatedBuilder for ChangeNotifier, just a reminder.There is nothing wrong using addListener(()=>setState()) if we use it right waySo basically Consumer is nothing more than a wrapper widget that has addListener(()=>setState()) inside to rebuild itself every time ChangeNotifier fires notifyListeners(), and Selector is just Consumer with conditional checks to avoid unnecessary rebuilds.There is NO PERFORMANCE IMPROVEMENT in using state management libraries. It's essentially how you structure your code to minimize the number of widgets being rebuilt and how you defining logic to minimize the rebuild numbers of those.Conclusion:I use Provider for local scope static holders.I use MultiProvider for providing global static holders.I use ChangeNotifierProvider for proving local scope ChangeNotifier state holders for a couple of widgets.I use MultiProvider + ChangeNotifierProvider for providing global ChangeNotifier state holders.You can't define multiple ChangeNotifierProvider of the same ChangeNotifier, just a reminder.Sometimes I use Consumer, Selector in case the state holders are ChangeNotifier, but sometimes I use AnimatedBuilder, FutureBuilder, StreamBuilder,...instead. It depends on what the state holders are and what I specifically need in rebuilding the widget.I use Provider solely as it had stated in its description, a lightweight DI.The sanity of SM libs:In any case, I try to avoid the sanity of state management libraries as much as possible. Trying to figure out how not using any one of those can solve my problem. If not, I will use the least affect one and then some.Most of the time, big SM libs trying to solve macro-level problems, and most of the time I'm looking for micro-level problem solvers. So choose your SM lib carefully and depends on your own situations.What a no-brainer you are when you can't even control or understand what you wrote, right?Relying too much on libs makes you don't understand a single thing.

December 31, 2019 at 09:23AM by JoeJoe_Nguyen
https://ift.tt/36c4Hxr
New post on /r/flutterdev subreddit:

Can Apple shut down flutter exports?
Apple is known for shutting down competition. How is the back end of flutter handled? Is it written in swift?I really like flutter hopefully iOS exports continue to work indefinitely.Is this something to be worried about?

December 31, 2019 at 08:15PM by Coffee4thewin
https://ift.tt/2u2WQUQ
New post on Flutter Dev Google group:

flutter and mongoDB tutorial source
i love flutter so i decided to develop location based tracking application, ya firebase is good, but i have asked to develop the app by using mongo as a backend, but i can't find any tutorial about flutter and mongo, so i am asking you for the link where can i get the tutorial, or i'm asking

December 31, 2019 at 11:49PM by Elias Ayele
https://ift.tt/2QyDoqQ
New post on /r/flutterdev subreddit:

CupertinoScaffold transparent background
Hello, I am working on an app and have a Stack with container which have gradient color and CupertinoScaffold on top. Am trying to have the Scaffold with transparent background (setting its background to Colors.transparent to display the Container color) but keep getting it as white to display. Is t possible? Thanks.

January 01, 2020 at 02:07AM by medsab
https://ift.tt/2SOv2xI
New post on /r/flutterdev subreddit:

How does Flutter secure it's source code once your apps are released?
If I make a Swift/ObjC iOS app and release it, it goes out as a zip file and you can decompile it down to very hard to read .asm code and IIRC all the var names are scrambled.Basically, it's pretty hard to make much use of it.So what does Flutter go out as and how do you decompile it? I get that it's not compiled, it's runtime interpreted, so does that mean they get 100% usable code? Kinda like looking at a webpage's code... you see all they've done?If that's the case, what would stop someone from downloading any given app and having all the code for it?

January 01, 2020 at 03:22AM by KarlJay001
https://ift.tt/2sEg6HT
New post on /r/flutterdev subreddit:

is flutter really cluttered?
i am trying to switch to FLUTTER but i sill get concerned about how many people say it's code is really cluttered and unmanageable and some developer will even come up with nicknames like CLUTTER for it, by looking at code which looks like this https://pastebin.com/hpr9YSre it seems they are right! but i just wanted to ask here if this is the case or there are work a way around it, because sometimes people talk about problems without knowing they can easily be solved!

January 01, 2020 at 09:59AM by Hiwa_47
https://ift.tt/2Qc7TDV
New post on /r/flutterdev subreddit:

Best Course on Udemy to start learning Flutter?
Hello everyone! I am not totally new to programming but am new to Dart which I hear is what is used to develop in Flutter. I have most of my experience in Java, C++, and some Python too. I am considering purchasing one of the courses taught by Stephen Grider, Angela Yu, or Max Schwarzmuller. Is there any general consensus on which of the three is the best one? Let me know if any comments/suggestions you guys have before purchasing one of the three. Thanks!

January 01, 2020 at 10:19AM by therealopm
https://ift.tt/2N0Q5d5
New post on Flutter Dev Google group:

my personal device isn't recognized / displayed
Hey Guys, today I wanna try my first app with my personal device. But it didnt got recognized. So that means I cant test my app. My device isnt displayed on my explorer/hard disks as well.. So do u have any suggestions what can I do to fix that.

January 01, 2020 at 02:13PM by Trite
https://ift.tt/2QgKUHC
New post on /r/flutterdev subreddit:

Issues Running Flutter in physical iOS Device
Basically what the title says. I started a project and it’s able to run on Android Emulators and iOS simulators but it crashes on a real iOS device after startup.Link here to the GitHub issue: IssueBasically with the latest flutter Sdk I’m unable to load the Flutter Framework.Anyone experienced this as well?

January 01, 2020 at 05:11PM by sportsbum69
https://ift.tt/2QepsTJ
New post on Flutter Dev Google group:

Formatting Date And Time In Flutter During Return Type
Hi, I have created fun: *HomeScreen*() which extends to HomeScreenState(). I have used *HomeScreenState*() to return Timing And Date. But the issue is I'm unable to format time for* HH:MM (am or pm) *and date to *DD/MM/YYYY.* _currentTime(){ return "${DateTime.now().hour} : ${DateTime.now().minu

January 01, 2020 at 06:23PM by Koustubha Bharadvaj
https://ift.tt/2sCpETT
New post on /r/flutterdev subreddit:

Why can't you mix Dart with Flutter code?
I want to run a for loop inside a Column widget and then call my function buildKey() with a parameter passed to it. But I can't. Why is this illegal in Flutter?
import 'package:audioplayers/audio_cache.dart'; import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { Expanded buildKey(int keyp) { return Expanded( child: FlatButton( color: Colors.red, onPressed: () { final player = AudioCache(); player.play('note$keyp.wav'); }, ), ); } @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: SafeArea( child: Column( children: <Widget>[ for (var i=1;i<6;i++) { buildKey(i); } ], ), ), ), ); } } 


January 01, 2020 at 08:19PM by bsd44
https://ift.tt/36hRzH8
New post on /r/flutterdev subreddit:

Updated My Flutter Hive / Provider Example. Persistent storage with Hive. State management with Provider.
https://ift.tt/36nuDqG

January 01, 2020 at 05:43AM by boon4376
https://ift.tt/2u5A5j3