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

Help improve Flutter! Take our survey :)
Hello from the Flutter team (again)!​As we continue to improve Flutter, we want to make sure your feedback and thoughts are included.​Please take this survey to support us. This anonymous survey helps us plan our work in the coming quarters.Link: https://google.qualtrics.com/jfe/form/SV_bfowrKmM2DjD5tj?Source=Reddit​On behalf of the Flutter team, thank you!

January 30, 2019 at 06:25PM by janim27
http://bit.ly/2G84rpj
New post on /r/flutterdev subreddit:

Track app lifecycle (and check permissions on resume) in a few lines of code. Full source code in video description. Please subscribe my channel if you like it!
https://youtu.be/m_lDo-tcoBE

January 30, 2019 at 07:14PM by impatientdeveloper
http://bit.ly/2sXpQcW
New post on /r/flutterdev subreddit:

Flutter different onTap effects apart from Material ripple
Is there an alternative to the standart ripple effect?​I'm particularly looking for a spotify-like onTap effect where the tapped item would lose some opacity and shrink a little bit, instead of rendering the standart material ripple.​Like in the Reflectly app...

January 30, 2019 at 08:26PM by thisw4y
http://bit.ly/2Rsbafu
New post on Flutter Dev Google group:

Can i reuse my swift code and run in Android emulator ?
Hi, Im starting a new Flutter project since i must to support Android. Im using Flutter because dont want 2 separate codebase (iOS & Android) I have already coded my iOS appplication with Swift (Models, ViewModels, Managers, Utils, Extension, etc...) , but i have question But nothing with

January 30, 2019 at 09:45PM by Mathieu Grenier
http://bit.ly/2DIqBNl
New post on /r/flutterdev subreddit:

<b>How to pass CountdownTimer to another widget</b>
Hi,I have a drawer menu in one widget, and I am starting countdowntimer (i need it, and it will count until zero) and also according to the user choice from drawer menu, user can go different widgets (i am setting body parameter of the WillPopScope of drawer's widget, according to the user choice).&#8203;One of the drawer menu's widget should show the counter, but when user goes to another widget and return, that widget show the proper timer. (I mean timer should work in background). But I couldn't do that, I am getting error when I navigate another widget via drawer:&#8203;<pre>E/flutter ( 9411): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception: E/flutter ( 9411): setState() called after dispose(): ...#6c2be(lifecycle state: defunct, not mounted) E/flutter ( 9411): This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback. The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree. E/flutter ( 9411): This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose(). </pre>&#8203;&#8203;Here is the drawer widget:&#8203;<pre>class _DrawerWidget extends State<UserDrawerMenuPage> { CountdownTimer _countdownTimer; CommonPropertySingleton _commonPropertySingleton; // this is singleton class to get countdowntimer in another widget setCountDownTimer(){ _countdownTimer = CountdownTimer(Duration(seconds: second),Duration(seconds: 1)); _commonPropertySingleton.assignCountdownTimerForQrCode(_countdownTimer); } @override void initState() { super.initState(); setCountDownTimer(); } @override Widget build(BuildContext context) { return WillPopScope( onWillPop: () => _exitApp(context), child: Scaffold( key: _scaffoldKey, appBar: AppBar( title: Text(Localization.of(context).getText(text: "userPage")) ), drawer: Drawer( child: ListView( padding: EdgeInsets.zero, children: <Widget>[ SizedBox(height: 80.0,), ListTile( title: Text(Localization.of(context).getText(text: 'home')), leading: Icon(Icons.home), onTap: () { setState(() { _selectedDrawerItem = 0; Navigator.of(context).pop(); _getDrawerContent(); }); }, ), ListTile( title: Text(Localization.of(context).getText(text: 'profile')), leading: Icon(Icons.person), onTap: () { setState(() { _selectedDrawerItem = 1; Navigator.of(context).pop(); _getDrawerContent(); }); }, ),// it goes like that .... body: _getDrawerContent(), } _getDrawerContent() { switch (_selectedDrawerItem){ case 0: return new SampleWidget(); case 1: return new SampleWidget2(); } } } </pre>&#8203;Here is the SampleWidget()<pre>class SampleWidget extends StatefulWidget { @override _QrCodeWidgetState createState() => _QrCodeWidgetState(); } class _QrCodeWidgetState extends State<QrCodeWidget> { String _log = "_QrCodeWidgetState"; CommonPropertySingleton _commonPropertySingleton; CountdownTimer _countdownTimer; _QrCodeWidgetState(){ print("$_log Constructor "); _commonPropertySingleton = CommonPropertySingleton(); _countdownTimer = _commonPropertySingleton.getCountDownTimer(); } @override void initState() { print("$_log initState"); super.initState(); getCountTimeTimerAsString(); } @override void dispose(){ super.dispose(); } @override Widget build(BuildContext context) { print("$_log build"); return ListView( children: <Widget>[ Text(timer) ], ); } getCountTimeTimerAsString() { if (this.mounted) { // &#305; tried mounted property…
New post on /r/flutterdev subreddit:

A fancy counter for a demo / intro to flutter animation
http://bit.ly/2CZH0uW

January 30, 2019 at 11:53PM by conxtantyn
http://bit.ly/2CPTLIo
New post on Flutter Dev Google group:

Android TV - Best Approach - RawKeyboardListener, or...?
Hi, trying to use flutter for Android TV - and it seems that the only way is to use RawKeyboardListener (http://bit.ly/2G04NiC) - going to be a decent amount of work to handle the arrow keys across multiple widgets, but it should work. Anyone has

January 31, 2019 at 01:55AM by Blue Einstein
http://bit.ly/2GcdsxB
New post on /r/flutterdev subreddit:

Flavour in flutter.
using the link : https://medium.com/@salvatoregiordanoo/flavoring-flutter-392aaa875f36I am able to create flavour and/or targets for iOS in flutter but in this i am having multiple scheme and single targets . But i want multiple targets . For example - App1 is my first target with their Capabilties having background mode enable , and APP2 is another target with their capabilites having pushnotification enbale , icloud enable ,and background mode enable . Both in same project .How to implement that in flutter?

January 31, 2019 at 06:05AM by aashish-singh
http://bit.ly/2HDNsxr
New post on /r/flutterdev subreddit:

Tutorials: Flutter Widgets 16 | Stepper –@niebin_gg-#flutteropen – Medium
http://bit.ly/2Beyo3w

January 31, 2019 at 09:44AM by nb312
http://bit.ly/2Tj5hmN
New post on /r/flutterdev subreddit:

How to Create Custom Layout Widgets in Flutter
http://bit.ly/2FJGdCu

January 31, 2019 at 10:47AM by Hena_Kabeer
http://bit.ly/2MIZTae
New post on /r/flutterdev subreddit:

Setup for Flutter and Firebase release and develop branches?
Hi Everyone!What is your setup for Flutter and Firebase release and develop branches?I am build Flutter app for Android and iOS with Firebase (Cloud Function, FCM, Firestore, Auth, Storage, Analytics).I am only developer now but will bring more onto team. So I need setup Git Flow for release and develop branches.But I have question: how to setup Firebase in Flutter project for release and develop? When I push to develop this will trigger CI/CD service to build app and release to beta/internal testers for android and iOS (TestFlight). How to make sure develop branch only use Firebase setup for testing? I no want Firebase Firestore data from release app mix with Firestore data from testing. Also I no want FCM trigger by testing app send to release app. Also no want analytics data mix between release and develop.How to separate the two branches in Firebase App? Sometimes will merge develop into release and don’t want Firebase also merge.I am search long time but no find simple way to do.What is your setup for manage the environment and branches and your testers?Thanks!

January 31, 2019 at 01:10PM by Flutter_Dev
http://bit.ly/2TpehH1