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

I released a Flutter Library for Toast like Badge Message.
A flutter package (library) called `toast_badge` is live now.It can show info badge on any widget and can be called like Toast without context parameter from anywhere in the app.​To use it, wrap your widget inside ToastBadgea. Just Wrap any Widget with ToastBadge() like thischild: ToastBadge(child: SettingPage(),),​b. You can also use the extension method .enableBadge()on any Widget:child: SettingPage().enableBadge(),Finally, call ToastBadge.show() from anywhere in the app.ToastBadge.show("Hello Toast");​This was released as my day 33 of 100 Days of Flutter.You can find daily post on this thread :https://twitter.com/erluxman/status/1246608678486065152See the library here :https://github.com/erluxman/toast_badge#day33 #100DaysofFlutter #flutterdev

May 08, 2020 at 11:04AM by erluxman
https://ift.tt/2zkAvVs
New post on /r/flutterdev subreddit:

Tip #35 Implicit Interface of class
Did you know you can extend and implement a class in Dart?
No need to create `IInterface` to mock a `class`.
No need to extract `IInterface` as Contract / Protocal
Every class implicitly defines an interface containing all the instance variables, methods getter and setters.
1. extends -> must override abstract methods, other methods and variables override optional. i.e can inherit parent's behavior.
2. implements -> Every methdos and variables must be overriden. i.e. can't inherit parent behavior
 Dart has implicit Interface of every class class A { //Optional @override for 'extends' && must for 'implements'. var name; //Optional @override for 'extends' && must for 'implements'. void normalMethod() => print("B -> Normal Method"); } abstract class B{ //must @override in both 'extends' and 'implements'. void abstractMethod(); } //Non abstract class C extends A {} // βœ… class C implements A {} //❌ Must override name & normalMethod() class C extends B {} //❌ Needs to override `abstractMethod()` class C implements B {} //❌ Needs to override `abstractMethod()` //Abstract Child abstract class C extends A {} // βœ… abstract class C implements A {} // βœ… abstract class C implements B {} // βœ… abstract class C extends B {} // βœ… 
See Daily posts on this threadContribute and give feedback

May 12, 2020 at 11:16AM by erluxman
https://ift.tt/2xZxGsM
New post on /r/flutterdev subreddit:

It's super easy Use GestureDetector to detect gestures like tap, double Tap, press, LongPress, pan, drag, zoom, etc. (with video)
37th Flutter Tip on 100 days of Flutter.All those callbacks behave like onClick(){} on Button.
GestureDetector( onTap: //Tapped onDoubleTap: //"Double Tapped onLongPress: //Long Press onLongPressEnd: //Long Press ends onPanStart: // Pan Started onPanUpdate: //"Pan" + paninfo.delta onPanEnd: //Pan Ended onHorizontalDragStart: //"Drag" + draginfo child: Padding( padding: const EdgeInsets.all(48.0), child: InkWell( child: Card( child: Center( child: Text( currentGesture.toUpperCase(), style: TextStyle(fontSize: 20, fontWeight: FontWeight.w700), ), ), ), ), ), ); 
See videohttps://twitter.com/erluxman/status/1260789123452936194​Find all tips here :https://github.com/erluxman/awesomefluttertips

May 14, 2020 at 06:33AM by erluxman
https://ift.tt/2LrwyRI
New post on /r/flutterdev subreddit:

Using short and sweet tear-off instead of A lambda or function call if the caller and calling functions have the same arguments.
https://twitter.com/erluxman/status/1263300974904410112

May 21, 2020 at 04:51AM by erluxman
https://ift.tt/2LJp903
New post on /r/flutterdev subreddit:

Quick & Easy: Create a Gradient / Image overlay/Mask (Like burning text effect) to any Flutter Widget with ShaderMask. [See the snippet and output]
https://twitter.com/erluxman/status/1264034430517014528

May 23, 2020 at 05:28AM by erluxman
https://ift.tt/2LSISKV
New post on /r/flutterdev subreddit:

Are you still confused about Flutter path while installing Flutter in the first try on mac/Linux? This will solve your issue.
https://twitter.com/erluxman/status/1267702470181916672

June 02, 2020 at 08:38AM by erluxman
https://ift.tt/2yZAnLq
New post on /r/flutterdev subreddit:

84 tips done more coming. #100daysOfFlutter
Just added 7 More tips (78-84) to ❀️ Awesome Flutter ❀️ tips and tricks ❀️It has become a pretty good set of tips that I come back when I get stuck.I am really glad that I am able to help folks and absolutely love your messages.😍Thanks so much for your support. πŸ™πŸΌThere are just 84 tips till now but I want to turn it into a repo where one can come and find tips for most of the important aspects of Flutter.For that purpose, your feedback and contributions will help a lot.I am a beginner in Opensource, sometimes I might make silly mistakes but I will cover them up with my good intentions, helpfulness, and consistency.You can make any suggestions/requests for specific or kind of tips on the Github issue [here](https://github.com/erluxman/awesomefluttertips) .I will address them as much as possible.

June 29, 2020 at 09:01PM by erluxman
https://ift.tt/38aSdbr