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

Custom icons creator
Hi guys I'm trying to create simple flat custom icons for my app. I've already tried Vectornator and Gravit to make svg file. However I get stuck on converting it to fonts on http://fluttericon.com I get an error If image looks not as expected please convert to *compound path < https://github.co

February 15, 2020 at 03:02PM by jet app
https://ift.tt/2uFkk3g
New post on Flutter Dev Google group:

flutter sdk is not found in the specified location
[image: 15817860475424321030341777689912.jpg] Dear team, Same problems in flutter sdk is not found in the specified location. Many time I am try but not resolved my problem. I am flutter install in C drive but..... I don't know where sdk path? Please help me Thanks and regards

February 15, 2020 at 06:04PM by Indrajeet Patil
https://ift.tt/38vT8Tb
New post on Flutter Dev Google group:

Page refreshes when it's resumed
I have simple page with AppBar, whenever app is paused and I come back to it, I see the whole page being refreshed - appBar, its title, body of the page. What should I do to keep page from being refreshed on resume?

February 15, 2020 at 07:59PM by Alex Kravets
https://ift.tt/2Htqh5U
New post on /r/flutterdev subreddit:

Pinterest UI/UX
I have two questions:How do I make the bottom navigation like Pinterest bottom navigation?How do I implement Pinterest long press and à pop icons appear and draging to the desired icon selects that?

February 15, 2020 at 08:54PM by MrYop
https://ift.tt/2UWB6FE
New post on /r/flutterdev subreddit:

How to change PageView physics dynamically with setState?
I am trying to create a way to slide to my second screen ONLY from the Home screen of my Child widget. This means if I am on the Search, Profile, etc. screen, the Physics of the PageView will switch to NeverScrollableScrollPhysics so that the second screen in the PageView can only be navigated to from the Home Screen.This is the DualScreen Class that is handing the PageView and controlling the switching between the two screens. The Physics is NOT rebuilding when I grab a new Index and change the _mainScreenCurrentIndex value in setState with the _getMainIndex callback function.
import 'package:flutter/material.dart'; import 'main_screen.dart'; import 'transaction_screen.dart'; class DualScreen extends StatefulWidget { @override _DualScreenState createState() => _DualScreenState(); } class _DualScreenState extends State<DualScreen> { @override Widget build(BuildContext context) { int _mainScreenCurrentIndex = 0; void _getMainIndex(int index) { setState(() { _mainScreenCurrentIndex = index; }); print(_mainScreenCurrentIndex); } final _pageController = PageController( initialPage: 0, ); return Scaffold( body: PageView( controller: _pageController, children: <Widget>[MainScreen(parentAction: _getMainIndex,), TransactionScreen()], pageSnapping: true, physics: _mainScreenCurrentIndex == 0 ? ClampingScrollPhysics() : NeverScrollableScrollPhysics())); } } 
This is the MainScreen that I am grabbing the index from.
import 'package:flutter/material.dart'; import 'home_screen.dart'; import 'search_screen.dart'; import 'qr_screen.dart'; import 'wallet_screen.dart'; import 'profile_screen.dart'; class MainScreen extends StatefulWidget { final void Function(int index) parentAction; MainScreen({this.parentAction}); @override _MainScreenState createState() => _MainScreenState(); } class _MainScreenState extends State<MainScreen> { int _currentIndex = 0; final List<Widget> _screens = <Widget>[ HomeScreen(), SearchScreen(), QrScreen(), WalletScreen(), ProfileScreen() ]; void onTabTapped(int index) { setState(() { _currentIndex = index; }); widget.parentAction(index); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Color(0xfffafafa), body: _screens.elementAt(_currentIndex), bottomNavigationBar: BottomNavigationBar( showSelectedLabels: false, showUnselectedLabels: false, items: [ BottomNavigationBarItem( icon: Icon( Icons.home, color: _currentIndex == 0 ? Colors.amber : Colors.black, ), title: Text( 'Home', style: TextStyle(color: Colors.black), ), ), BottomNavigationBarItem( icon: Icon( Icons.search, color: _currentIndex == 1 ? Colors.amber : Colors.black, ), title: Text( 'Search', style: TextStyle(color: Colors.black), ), ), BottomNavigationBarItem( icon: _currentIndex == 2 ? Image.asset('assets/images/qr-code-2.png', height: 25, width: 25) : Image.asset('assets/images/qr-code.png', height: 25, width: 25), title: Text( 'Scan', style: TextStyle(color: Colors.black), )), BottomNavigationBarItem( icon: Icon(Icons.credit_card, color: _currentIndex == 3 ? Colors.amber : Colors.black), title: Text( 'Wallet', style: TextStyle(color: Colors.black), ), ), BottomNavigationBarItem( icon: Icon( Icons.person, color: _currentIndex == 4 ? Colors.amber : Colors.black, ), title: Text( 'Profile', style: TextStyle(color: Colors.black), )) ], type: BottomNavigationBarType.fixed, onTap: onTabTapped, currentIndex: _currentIndex, )); } } 


February 15, 2020 at 08:47PM by beardedblack
https://ift.tt/2UUcRaZ
New post on /r/flutterdev subreddit:

Convert Scikit-learn models to pure Dart code for on-device, offline ML using m2cgen Python tool with zero dependencies.
Disclaimer: I did not create m2cgen. I am only in the process of adding functionality to the project to convert sklearn models to Dart (my fork). My pull request is awaiting review, but I wanted to get this in front of some Flutter dev eyes asap. Big thanks to the contributors of the project!m2cgen is a great tool for allowing the conversion of sklearn models into native code, which allows sklearn capabilities almost anywhere. I think the number of on-device ML solutions for Flutter is bit lackluster, but I am excited to see how Google further implements Tensorflow Lite functionality into the framework.For relatively simple use cases and models, the less exciting approaches (linear/logistic regression, decision trees, etc.) actually are preferred due to simplicity and explainability. It is hard to argue for using a complex, resource-hungry neural network when a quick random forest model gets close to the same accuracy. On-device models are growing in popularity due to being completely private, offline, and more secure than sending data over the wire. Even with an absolute beast of a model hosted on a server, network latency could kill performance altogether, especially if the user needs to go offline and still use your app. List of supported models with m2cgen.This library opens up many of the capabilities of sklearn's powerful library for many languages. I hope that the soon to be added Dart support will come in handy for at least one of you in your various projects.I would appreciate if you could take a look at the pull request and offer any insight into the most effective way to structure the Dart code. It is pretty straightforward though.If you want to try it out before it gets merged into the main repo, you can check out my fork. It is working based on my testing. You can see a quick example in this jupyter notebook gist.I am happy to discuss in the comments! Happy fluttering.

February 15, 2020 at 10:09PM by FeelTheDataBeTheData
https://ift.tt/2Sw21GT
New post on /r/flutterdev subreddit:

Tree shake icon fonts (since v1.15.1)
Flutter now has functionality to shake out unused icons from Material, Cupertino, FontAwesome, etc. fonts. For now the functionality is opt in. It is also only available in profile or release builds (in a dev build we're likely to do more harm than good by slowing down hot reload/restart and probably still getting it wrong with the way incremental kernel compiles work).You can try this out on the latest dev releases (not on beta yet). Word of warning, there are some known issues with the current dev channel. The command is flutter run --tree-shake-icons --profile. It can also be run with the various flutter build commands. If you're building from Xcode, you can set the TREE_SHAKE_ICONS environment variable; from gradle, it would be setting the tree-shake-icons property in the gradle properties.We're using this feature for builds of Google apps and should get good coverage there, but it would be great to hear from the community how this is working out. For typical apps using Material icons, you can expect to save between 60 and 100kb.​If you're interested in the implementation details, you can review the following:https://github.com/flutter/flutter/pull/49737https://github.com/flutter/engine/pull/14828https://github.com/flutter/engine/pull/15668​We'd like to eventually make this opt-out (on by default), but want to make sure it's working for various use cases out there first.Oh, and it's currently only available for iOS, Android, and macOS. Linux and Windows should be fairly easy to do, web will be a bit harder but possible.

February 15, 2020 at 11:42PM by dnfield
https://ift.tt/38Hdk4J
New post on /r/flutterdev subreddit:

scaff | scaff is a simple command-line utility for generating Dart and Flutter components from template files.
https://ift.tt/2P0iNf4

February 15, 2020 at 03:38PM by ganeshrnet
https://ift.tt/38yMg7t
New post on /r/flutterdev subreddit:

Reveal under mask (cookie cutter effect)
I'm a Flutter beginner and looking to implement a mask feature where the shape of the image "cuts-through" the image underneath it. Like a cookie-cutter. Unity3d has something similar feature in Sprite MaskBased on the research I have done, it seems to me that it can be done using ShaderMask or CustomPainter. Any other solutions ?

February 16, 2020 at 01:39AM by jamesmillerenium
https://ift.tt/37oLPeE
New post on /r/flutterdev subreddit:

How to control device back button?
Is there any way to control device back button.

February 16, 2020 at 08:24AM by BlueBoxxx
https://ift.tt/2wlu1UV
New post on /r/flutterdev subreddit:

Real time Theme chat app
https://github.com/Chunlee17/flutter_theme_chat
a chat app that allow Light theme user and dark theme user can chat with each other with emoji support and dummy story viewer

February 16, 2020 at 10:28AM by Fienases
https://ift.tt/2SywgwJ