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

No reload activity, Help Me!
I have an Activity where I get a list of documents from a firebase db and shows it. There is also a FAB that i use for change collection and recall the function that print the list in the app page, but when i click it the collection change correctly, but the list in the screen won't change till i hot reload from the editor.there is the code i use:
String collectionFirebase = 'collection1'; class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { All all = new All(context); // int counter = 0; // print(collectionFirebase); return Scaffold( appBar: AppBar(title: Text('Test DB')), body: all._buildBody(context), floatingActionButton: all._refresh(), ); } } class All{ BuildContext context; All(BuildContext _context){ context = _context; } Widget _refresh(){ return FloatingActionButton( child: Icon(Icons.cached), onPressed: (){ if(collectionFirebase == "collection1"){ collectionFirebase = "collection2"; print(collectionFirebase); _MyHomePageState().build(context); } else{ collectionFirebase = "collection1"; print(collectionFirebase); _MyHomePageState().build(context); } }, ); } Widget _buildBody(BuildContext context) { return StreamBuilder<QuerySnapshot>( stream: Firestore.instance.collection(collectionFirebase).snapshots(), builder: (context, snapshot) { if (!snapshot.hasData) return 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(7.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': fresh.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 08, 2019 at 06:44PM by xbobby98x
http://bit.ly/2DWmv3U
New post on /r/flutterdev subreddit:

Note Taking App made in Flutter with Sqlite database
This is a note taking app made with flutter.Concepts used:Sqlite database to store custom Note object.Staggered GridViewCode : https://github.com/bimsina/notes-appVideo demo : https://www.youtube.com/watch?v=Fg68VND8unE

May 08, 2019 at 07:23PM by bimsina
http://bit.ly/2V9CLEh
New tweet from FlutterDev:

We launched the stable release of the Dart 2.3 SDK at #io19! This includes language features that will improve your coding experience when developing user interfaces.

Learn more &darr; https://t.co/1f7g8tqs0v— Dart Language (@dart_lang) May 8, 2019

May 08, 2019 at 08:19PM
http://twitter.com/FlutterDev/status/1126190002189131776
New tweet from FlutterDev:

Flutter can now build apps for iOS, Android, web, and 𝐝𝐞𝐬𝐤𝐭𝐨𝐩 from a single codebase! 🤯

See two developers live code a real-world app across these platforms, while highlighting some of our latest features at #io19.

Start building with us &rarr; https://t.co/eu8RbR5fnY pic.twitter.com/6BU4e4Or1Y— Flutter (@FlutterDev) May 8, 2019

May 08, 2019 at 11:20PM
http://twitter.com/FlutterDev/status/1126235329223102464
New post on /r/flutterdev subreddit:

Is there a way to speed up the IDE by rearranging code?
My Dart analysis server is crawling on medium sized projects and it's a pain having to wait for 5-10 seconds for suggestions and code completion to pop-up each and every time. Intellij and AS are borderline unusable. My project does make use of libraries (using part and part of notation) to connect all the widgets and the state. Does this have something to do with the workload the analyzer has to go through?

May 09, 2019 at 12:24AM by _thinkdigital
http://bit.ly/2Vp9wCo
New post on /r/flutterdev subreddit:

Respository for the I/O 2019 Flutter demo: Become a tech lead, slay bugs, and don't get fired.
http://bit.ly/2H8HvVJ

May 09, 2019 at 12:13AM by Pixelreddit
http://bit.ly/2VmhYlK
New tweet from FlutterDev:

#io19 just keeps getting better!

Learn about the technical preview of Flutter for the web, an update on Flutter for desktop, and more &rarr; https://t.co/VNEBpOldPo pic.twitter.com/R7aW9WtIWW— Google Developers (@googledevs) May 8, 2019

May 09, 2019 at 12:58AM
http://twitter.com/FlutterDev/status/1126260212753522688
New post on Flutter Dev Google group:

SoundCloud widget
Hi I need add a SoundCloud playlist, somebody help me? Att

May 09, 2019 at 12:55AM by Israel Ribeiro
http://bit.ly/2PVfG7k
New post on Flutter Dev Google group:

Cupertino and Material
So I am really confused. I understand flutter apps can run on ios and android. So why are there different UI widgets such as cupertino and material? Can I run a material app on ios, and it just does not look like an IOS app? Thanks Leor

May 09, 2019 at 01:21AM by leor amikam
http://bit.ly/2VPJPdM
New post on /r/flutterdev subreddit:

Search AppBar from Google I/O?
You can see it here: https://www.youtube.com/watch?v=YSULAJf6R6M&t=515s I've tried to search the Internet for this component but without a success. Does anyone knows anything?

May 09, 2019 at 01:44AM by Albert221
http://bit.ly/2vP3xr6
New post on Flutter Dev Google group:

How to structure a multi-target project
I would like to develop a project with a REST server, and mobile, desktop and hummingbird clients. A great deal of the code will be shared. While I’m developing it would be inconvenient to have to synch up multiple separate projects in some way (I think). I imagine some way of putting all the

May 09, 2019 at 02:05AM by Guyren Howe
http://bit.ly/2WwNTwv
New tweet from FlutterDev:

Dart is Flutter's secret sauce 😎 – enabling amazing application experiences without compromises. Produce fast, high-fidelity, production applications that run across multiple platforms.

Get in on the secret at this #io19 talk &rarr; https://t.co/1JIuoKtcnv pic.twitter.com/Wjx0yzZZuS— Flutter (@FlutterDev) May 9, 2019

May 09, 2019 at 02:20AM
http://twitter.com/FlutterDev/status/1126280672379842561
New tweet from FlutterDev:

We built a Flutter game with @2Dimensions for #io19 that puts you in charge of a development team! Assemble a team of heroic coders, slay bugs, and get things done at 60fps!

Find the source at &rarr; https://t.co/4mGrxMkCpN

Read the blog to learn more &rarr; https://t.co/nahCiLbz2l pic.twitter.com/crF85Ub8Ur— Flutter (@FlutterDev) May 9, 2019

May 09, 2019 at 03:05AM
http://twitter.com/FlutterDev/status/1126291953530937344
New post on /r/flutterdev subreddit:

Loading image assets from a package
Hey all, after poking around HERE and trying things out, my main app will happily load images from a package that I made for holding branding images etc, to be shared amongst all apps.All well and good, but in the example shown above, the main app has to know where in the package the image is located.I tried adding a helper function to the package, something like:
class Logos { static Image logoSmall = Image.asset('logos/assets/logo_small.png'); } 
The problem is, when I call this from the main app, it tries to find the .png in its own assets. Yes, I can use:
AssetImage('path/to/image.png', package: 'myPackage'); 
but that still requires the app knowing about the layout of the package, which I'm trying to avoid.So is there a way to do this? Ideally I'd like a package I can hand off to devs, where they just call the helper functions and get the right logo etc.​Cheers!

May 09, 2019 at 04:48AM by Foggerty
http://bit.ly/305wg9f