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

Firestore collection to Class Map
Good night my friends, I´m trying to use Firestore with my map classes but I DON´T KNOW how to make this thing work. Please help me. static Future
New post on /r/flutterdev subreddit:

Flutter Voting App
Hi everyone. Help me on how to make users vote only once in an app using flutter and Firestore as backend? My app demands users to login/register. i have done a that. Now i need users to vote only once and this i am having issues with. Anyone done this before? Anyone willing to help?​
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'dart:async'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Baby Names', home: MyHomePage(), ); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() { return _MyHomePageState(); } } class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Baby Name Votes')), body: _buildBody(context), ); } Widget _buildBody(BuildContext context) { // TODO: get actual snapshot from Cloud Firestore return StreamBuilder( stream: Firestore.instance.collection('baby').snapshots(), builder: (context, snapshot) { if (!snapshot.hasData) { LinearProgressIndicator(); } return _buildList(context, snapshot.data.documents); }, ); } Widget _buildList(BuildContext context, List<DocumentSnapshot> snapshot) { return ListView( padding: const EdgeInsets.only(top: 20.0), children: snapshot.map((data) => _buildListItem(context, data)).toList(), ); } Widget _buildListItem(BuildContext context, DocumentSnapshot data) { final record = Record.fromSnapshot(data); return Padding( key: ValueKey(record.name), padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), child: Container( decoration: BoxDecoration( border: Border.all(color: Colors.grey), borderRadius: BorderRadius.circular(5.0), ), child: ListTile( title: Text(record.name), trailing: Text(record.votes.toString()), onTap: () { Firestore.instance.runTransaction((transaction) async { final freshSnapshot = await transaction.get(record.reference); final fresh = Record.fromSnapshot(freshSnapshot); await transaction .update(record.reference, {'votes': record.votes + 1}); }); }, ), ), ); } } class Record { final String name; final int votes; final DocumentReference reference; Record.fromMap(Map<String, dynamic> map, {this.reference}) : assert(map['name'] != null), assert(map['votes'] != null), name = map['name'], votes = map['votes']; Record.fromSnapshot(DocumentSnapshot snapshot) : this.fromMap(snapshot.data, reference: snapshot.reference); @override String toString() => "Record<$name:$votes>"; } 


May 30, 2020 at 06:33AM by Kobbydiscount
https://ift.tt/3eyu2pj
New post on /r/flutterdev subreddit:

A Completed Functional Flutter App - FindSeat (BLoC + Json API + Unit Test + Firebase Auth)
I’m Android Developer and I’m working in a software company in Vietnam. I have experience in both kind project: outsourcing project and product project. I decided to study Flutter, because I believe it’s promised in future. As experienced developer, I care about clean architecture, testing, performance and maintainability that why I keep searching for an example of completed application. Unfortunately, community now full of project such as speedcode, UI challenges, … it’s just small pieces of real world application. In fact, most of the project doesn’t have fancy UI like that. That why I build this project by myself and now share it to the community, I hope you can get something from it then apply to your work.The first version of project (v1.0) is just about UI + simple logic. In this version v2.0, I applied BloC pattern by using Flutter Bloc to project and also have unit tests for it. I also built simple Mock API for the app, it just static json file uploaded to a my private hosting. I hope I have time to do cache local data by SQLite but I have not, so hope next version will be soon available.Check the soure code herehttps://github.com/KhoaSuperman/findseat

May 30, 2020 at 10:22AM by khoahoang668
https://ift.tt/2yMjjs1
New post on Flutter Dev Google group:

Printing to a Bluetooth receipt Zebra Printer ZQ310
Hi, everybody, I have a parking app developed using flutter, and I can connect to my zebra printer via Bluetooth using the flutter_blue (thanks for the plugins), but i couldn't print or send any zpl text to print on my zq310 printer. Please help if there is any solution on printing to the device

May 30, 2020 at 10:17AM by samson dawit
https://ift.tt/3gDpS1i
New post on Flutter Dev Google group:

Send Mails from user side
Is there a package or other solution to send mails from the user side. Without mail server and so on?

May 30, 2020 at 12:07PM by Marlene Rahm
https://ift.tt/3gBB6Dp
New post on /r/flutterdev subreddit:

Using the Super Enum package for Swift-like enums in Dart
https://ift.tt/2AnGUQp

May 30, 2020 at 03:48PM by englishman_in_china
https://ift.tt/2XIJ593
New post on /r/flutterdev subreddit:

Why are not all widgets stateful?
Presumably, stateless widgets are more efficient in some way, which is why they exist. If so, what specifically makes them more efficient?I understand what stateful and stateless widgets are, this is a question about internal implementation.

May 30, 2020 at 04:27PM by falconberger
https://ift.tt/2TU1m1Z
New post on Flutter Dev Google group:

Could not determine the dependencies of task ':firebase_admob:generateDebugRFile' #
I get an error when trying to run my flutter app [Fatal Error] play-services-measurement-sdk-api-17.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] play-services-measurement-sdk-api-17.0.0.pom:2:1: Content is not allowed in prolog. [Fatal Error] play-services-measurement-sdk-api-17

May 30, 2020 at 04:30PM by I
https://ift.tt/3cjwwGm
New post on Flutter Dev Google group:

Implemention
Hi Team, [image: image.png] How can I achieve this? Please let me know your suggestions. Thank you.

May 30, 2020 at 07:45PM by Ram Kumar
https://ift.tt/2yS8FQI
New post on Flutter Dev Google group:

Apply Dark mode is triggering the build method a couple of time why is that ?
Hi All, I am trying to apply Dark theme to the application, when I turn on and off the Switch for the dark theme I can see the build method is called a couple of times why is that? is this normal behaviour of flutter? Note: I have added a print statement in the build method to find out why

May 30, 2020 at 07:49PM by Srinath
https://ift.tt/2XkciIB
New post on /r/flutterdev subreddit:

My first flutter app
Hey everyone,I don't know whether this post belongs here, but I finished making my first actual project with Flutter. It's an app which compiled quotes from ancient greek and stoic philosophers. As of now, it is only on Android but I'm planning to release on the App Store soon. For those of you who are on Android, can you please try out the app on the Google Play Store? Appreciate it!

May 30, 2020 at 07:44PM by newtonseitz
https://ift.tt/2Xk9POl
New post on Flutter Dev Google group:

Ralpasoft student program (RSP)
Dear all, Ralpasoft invites you to *join community* on ============================ *Ralpasoft Student Program (RSP)* ============================ *Free For Students....!!!* Ralpasoft a revolutionary innovation in digitisation order to train students on the latest trending, we ralpasoft

May 30, 2020 at 08:41PM by Anonymous Patel
https://ift.tt/3eu2Ckc
New post on Flutter Dev Google group:

Re: Digest for flutt...@googlegroups.com - 25 updates in 8 topics
Dear all, Ralpasoft invites you to *join community* on ============================ *Ralpasoft Student Program (RSP)* ============================ *Free For Students....!!!* Ralpasoft a revolutionary innovation in digitisation order to train students on the latest trending, we ralpasoft

May 30, 2020 at 08:42PM by Anonymous Patel
https://ift.tt/2Xfm2na
New post on Flutter Dev Google group:

Create pdf containing a image from internet
Can I create a pdf file in flutter with a package containing an image from the internet? If so how?

May 30, 2020 at 09:16PM by Marlene Rahm
https://ift.tt/2TWqplf
New post on Flutter Dev Google group:

Suggestion of tag names in TextField
Hi Flutter developers, Do you know whether it’s possible to implement a tag name suggestion in TextField in a similar manner as Twitter does? While there are several plugins (flutter_typeahead, autocomplete_textfield) that helps autocomplete for an entire textfield, I couldn’t find one to

May 30, 2020 at 10:31PM by Tomo
https://ift.tt/3djqwyU