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

Getting instance of function with parameter
Hi, I am beinner in Flutter. I am working on OTP (one time password) authentication and I am struggling to access data which is response from http.post request. When user enters phone number confirmation code is sent and API object called 'secret' is created. User enters phone number from LoginScreen and I should have access 'secret' object from ConfirmationScreenThe problem is when I initialized likeNajotCreateUser najotcreateUser = NajotCreateUser;var secretData = najotcreateUser.createUser()String secret = secretData.data.secretI cant initialize secretData because it has parameter of String phone. My question is how to access instance of createUser() without typing parameter. Below are my code and APIclass NajotCreateUser {
Future<User> createUser(String phoneNumber) async {
final response = await http.post(url,
headers: {"client-id": clientId},
body: jsonEncode(<String, String>{"phone": phoneNumber}));
if (response.statusCode == 200) {
var result = response.body;
var data = User.fromJson(jsonDecode(result));
var secret = data.secret;
print('Secret is: '+ secret);
return data;
} else {
var result = response.body;
print(result.toString());
return null;
}
}
}This is getting instance of createUserNajotCreateUser najotcreateUser;
var secretData = najotcreateUser.createUser('phoneNumber');
/* I have to access to createUser without phoneNumber*/
String secret = secret.data.secret;And this is API"secret": "string","student": {"active": true,"created_at": "string","id": "string","image": { "url": "string", "uuid": "string" },"login_at": "string", "name": "string", "phone": "string", "updated_at": "string"}

February 25, 2021 at 08:17AM by Wild-Film673
https://ift.tt/3qTuqoY
New post on /r/flutterdev subreddit:

How to Pass a Message From Flutter to Native ??
Hey Flutter Enthusiasts!!I have found this article which is very helpful for me regarding How to Pass a Message From Flutter to Native. https://flutteragency.com/pass-a-message-from-flutter-to-native/

February 25, 2021 at 09:50AM by lil_dragplix
https://ift.tt/3knZbQr
New post on /r/flutterdev subreddit:

How Flutter renders the contents on the screen?
https://ift.tt/3kkIkxX

February 25, 2021 at 10:14AM by cheerfulboy
https://ift.tt/3aUiptX
New post on Flutter Dev Google group:

BAD STATE NO ELEMENT
In this code I am trying to load a list from the database but the error shows bad state no element the first time I run it but when I hot reload the error disappears. Please help how can I solve this problem List
New post on Flutter Dev Google group:

Error updating information on Firebase
Hello! I want to update information on the database on Firebase with the following code: class _PostXXXState extends State
New post on Flutter Dev Google group:

Firebase Connect ( problem )
Hi Guys I try to connect my project to firebase ..and there problem appear (Could not find the Android Application module. Only Android Application Modules can be connected to Firebase online projects. Create a new Android Application Module or create/import a different Android Studio project )

February 25, 2021 at 05:37PM by Black Bird
https://ift.tt/3pS7ViY
New post on /r/flutterdev subreddit:

Flutter - How can draw route on google map between two locations?
https://ift.tt/2ZRlmVC

February 25, 2021 at 05:28PM by rrtutors
https://ift.tt/3uxzCRK
New post on Flutter Dev Google group:

VS Code localhost refused to connect
Hi, When i create a new project, i can start a debugging session in Chrome by pressing F5 in VS Code. When i terminate debugging and then later try to start a new debugging session using F5 i get a message in the browser that says "*localhost* refused to connect". I've tried changing port

February 25, 2021 at 06:12PM by Jair-Rohm Parker Wells
https://ift.tt/3uw1be0
New post on Flutter Dev Google group:

iOS build
I keep running into this issue for iOS app *ITMS-90713: Missing Info.plist value* - A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'com.paymetoconnect.coupanda.dev'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a

February 25, 2021 at 07:03PM by prasad mokkapati
https://ift.tt/3bGkOaM
New post on /r/flutterdev subreddit:

AWS Amplify w/ flutter - How bad is it ?
https://news.ycombinator.com/item?id=26263097This comment thread really is not positive about it at all. Just curious if this is other peoples experience or what is your experience like ? What about vs firebase products

February 25, 2021 at 06:58PM by cmdrNacho
https://ift.tt/2NG6o2b
New post on /r/flutterdev subreddit:

Which database should I use?
I am building an app that will be monitoring crypto prices and I have most of it all figured out except this one part of the design. I am doing a callout to binance every 30 seconds and storing the ~ 63 coin prices into their own tables which will later be used by users for graphing purposes. The data stored will just be the symbol, price, and datetime which I estimate is ~30 bytes of data let row. The callout happening every 30 seconds is 2880 callouts per day and 181k rows being written to the db per day. With that being said firebase firestone would cost me $131 per year in writes alone. I think I am leaning towards firebase realtime db since reads and writes don't matter and it's just about the size of download which would just be when a user wants to graph the points, it downloads that coins table.I am building this for myself but am gonna release it to others so I'm not sure how many users there will actually be. So starting out, I want to do this for $0 of possible since it could theoretically only be me that uses it.What other db options are there that would fit my use case here? I looked into aws dynamo db and determined (if I calculated correctly) that my writes would require 126 wcus which would result in something like $500 yearly. There will be other data stored as well but this will be the bulk of it.Thanks for the feedback, really trying to pick the right solution the first time!

February 25, 2021 at 07:59PM by rdh24
https://ift.tt/3uwcSkU
New post on Flutter Dev Google group:

AppBar Scrolling List
I am trying to make a tiny horizontal scrolling list on my AppBar but am coming into some issues due to the size of the cards. I am new to flutter so I am not quite sure how to fix this? Here is the code. I essentially want it to look like a small oval shaped card list scrolling horizontally on

February 25, 2021 at 08:22PM by Mark Valeriani
https://ift.tt/3pTj56X
New post on /r/flutterdev subreddit:

Flutter app’s state in Isolate
There are many ways to manage state in Flutter, but most of them are built in such a way that all the logic is executed in the main isolate of your application. Execution of network requests, working with WebSocket, potentially heavy synchronous operations (like local search), all this, as a rule, is implemented in the main isolate. This article shows other doors as well.

February 25, 2021 at 10:11PM by congolomera
https://ift.tt/3usccx3