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

What is the right way of building infinite list view with FutureBuilder and Provider?
FutureBuilder( future: getPosts(), builder: (BuildContext context, AsyncSnapshot snapshot) { return makeListView(context, snapshot.data); } Widget makeListView(Data data) { final notifier = Provider.of<MyNotifier>(context); notifier.setPosts(data); return buildListView(); } void loadMore(BuildContext context) { final notifier = Provider.of<MyNotifier>(context); //handles pagination, fetches new posts then notifies but wouldn't this cause infinite loop? commentsNotifier.fetchOtherPosts(); } 
I'm trying to build an infinite listview using FutureBuilder and Provider. This is what I'm thinking right now but I could also setPosts() like, future:getPosts().then(setPosts()) Also when loadMore method sets the new posts wouldn't it cause infinite loop? What is the right way of doing this?

June 09, 2019 at 11:22AM by morgothraud
http://bit.ly/2I2sshU
New post on Flutter Dev Google group:

Synchronous call to Flutter from a native plugin
Hello everybody. I am coding a bridge between Flutter and a native software. It is easy to call a native function and process the return value in Dart, awaiting for the future. But I do not know how to do the opposite : call a Flutter function from a native software and process the return value

June 09, 2019 at 03:35PM by Larpoux
http://bit.ly/31jLsQy
New post on /r/flutterdev subreddit:

How can I check in my Firebase whether a user interacted with something?
Hi,​im building a flutter application right now similar to reddit and have to ensure that a user can only upvote once. How can I implement this in my application using Firebase?​In my Firebase I have a collection called "posts", where all the posts are stored. Within that I was thinking on adding a list of users, who already have upvoted the post.​Is that the right approach and technically possible? (I don't think so).​Thanks for any replies,Ducky

June 09, 2019 at 02:40PM by DevDucky
http://bit.ly/2WTSV9D
New post on Flutter Dev Google group:

Synchronous call to flutter from a native plugin
Hello everybody. I am coding a bridge between Flutter and a native software. It is easy to call a native function and process the return value in Dart, awaiting for the future. But I do not know how to do the opposite : call a Flutter function from a native software and process the return value

June 09, 2019 at 04:04PM by Larpoux
http://bit.ly/2ZfOaER
New post on Flutter Dev Google group:

macOS 10.15 beta error related to analysis_server.dart.snapshot
Hi, I've updated to macOS 10.15 Beta, and when I try and run the Dart analysis in Android Studio, I now get the prompt: *“kernel-service.dart.snapshot” can’t be opened because it is from an unidentified developer.* There were several other prompts, but I was able to approve those under

June 09, 2019 at 10:46PM by Adam Jon Richardson
http://bit.ly/2XzzoIQ
New post on Flutter Dev Google group:

Powerflutter wants to become what Rails is for Ruby
I just published an example how to use the dependency injection, setup a model that automatically updates the UI and can be saved and loaded to shared preferences with a single line of code in Powerflutter. http://bit.ly/2WyEoRj Looking for

June 09, 2019 at 11:08PM by Tobias Heidingsfeld
http://bit.ly/2wJH538
New post on /r/flutterdev subreddit:

Custom animated login screen
http://bit.ly/2K60PqE

June 09, 2019 at 11:52PM by Bernardi_23
http://bit.ly/2wJufSD
New post on /r/flutterdev subreddit:

Serializing Your Object In Flutter
http://bit.ly/2ItNZzi

June 10, 2019 at 12:39AM by Purple_Pizzazz
http://bit.ly/2Kd6SKb
New post on /r/flutterdev subreddit:

Dependency Injection using Provider v3 - ProxyProvider
http://bit.ly/31nsd91

June 10, 2019 at 04:41AM by Filledstacks
http://bit.ly/2KCZDdD
New post on /r/flutterdev subreddit:

Flutter: Network Layer
http://bit.ly/2Wr6YPZ

June 10, 2019 at 09:58AM by Purple_Pizzazz
http://bit.ly/2WxoOFV
New post on /r/flutterdev subreddit:

Flutter: Global Access vs Scoped Access with Provider
http://bit.ly/2XD32Nh

June 10, 2019 at 10:30AM by bizz84
http://bit.ly/2ZjiEWv
New post on /r/flutterdev subreddit:

Quickly scaffold flutter BLoC files templates in VS Code project
I create an extension to quickly create files for my BLoC project. I think that BLoC is the most simple and powerful system of state management for Flutter. I change standart template of bloc file ```dart import 'dart:async'; import 'package:bloc/bloc.dart'; import 'package:meows/you_awesome/index.dart';class YouAwesomeBloc extends Bloc<YouAwesomeEvent, YouAwesomeState> { static final YouAwesomeBloc _youAwesomeBlocSingleton = new YouAwesomeBloc._internal(); factory YouAwesomeBloc() { return _youAwesomeBlocSingleton; } YouAwesomeBloc._internal();YouAwesomeState get initialState => new UnYouAwesomeState();@override Stream<YouAwesomeState> mapEventToState( YouAwesomeEvent event, ) async* { try { yield await event.applyAsync(currentState: currentState, bloc: this); } catch (, stackTrace) { print('$ $stackTrace'); yield currentState; } } } ``` The event has an implementation of 'applyAsync' - this allows you to use the write logic in the event class. I can use SOLID principal for BLoC.how use.gifYou can use custom templates for your project. Copy the 'templates' folder to the root directory of your project and set up the template files.custom.gifPlease write your opinion on the extension and any ideasFlutter Files

June 10, 2019 at 01:04PM by Gornivv
http://bit.ly/2K7umjK