New post on Flutter Dev Google group:
geolocation with firebase/ firestore
hi guys. has anyone used the geolocation packages before? i am stuck here. i Am getting the lat & lng of Chosenplace but i cant write it inside Database. this is my serachMapPlaceWidget SearchMapPlaceWidget( darkMode: true, placeType: PlaceType.establishment, language: 'se', apiKey:
May 08, 2020 at 03:37PM by Error Place
https://ift.tt/3cgIphk
geolocation with firebase/ firestore
hi guys. has anyone used the geolocation packages before? i am stuck here. i Am getting the lat & lng of Chosenplace but i cant write it inside Database. this is my serachMapPlaceWidget SearchMapPlaceWidget( darkMode: true, placeType: PlaceType.establishment, language: 'se', apiKey:
May 08, 2020 at 03:37PM by Error Place
https://ift.tt/3cgIphk
Google
Google Groups
Google Groups allows you to create and participate in online forums and email-based groups with a rich experience for community conversations.
New post on /r/flutterdev subreddit:
Help influence Flutter Sound
https://ift.tt/2WAKXQE
May 08, 2020 at 04:56PM by bsutto
https://ift.tt/2YLzUqH
Help influence Flutter Sound
https://ift.tt/2WAKXQE
May 08, 2020 at 04:56PM by bsutto
https://ift.tt/2YLzUqH
GitHub
[HELP] Petition to keep Flutter Sound as a free project · Issue #349 · dooboolab/flutter_sound
Petition to keep Flutter Sound as a free project We (the Flutter Sound developers and users) are very concerned by the apparent attempt of someone (@bsutton ) and his private company to take contro...
New post on Flutter Dev Google group:
Flutter refresh list calling function from other class
Hello I want to build comments with refresh indicator but I get the below error, I am calling the function from class modalcomments.dart and the fuction is in the home.dart, if I try to add the full function in the modalcomments.dart again I get the below error home.dart getComments(postid)
May 08, 2020 at 04:51PM by Evripides Kyriacou
https://ift.tt/2zjTdMX
Flutter refresh list calling function from other class
Hello I want to build comments with refresh indicator but I get the below error, I am calling the function from class modalcomments.dart and the fuction is in the home.dart, if I try to add the full function in the modalcomments.dart again I get the below error home.dart getComments(postid)
May 08, 2020 at 04:51PM by Evripides Kyriacou
https://ift.tt/2zjTdMX
Google
Google Groups
Google Groups allows you to create and participate in online forums and email-based groups with a rich experience for community conversations.
New post on /r/flutterdev subreddit:
<b>Pass Args to Widget Build</b>
Hey all, first post and started with flutter yesterday.I have created the below which I call using; ProductTile()The code renders a box that contains product information, an image etc, along with an increment counter which adjusts itself as buttons - or + are pressed. (this will eventually be quantity to add to basket).My problem is that it is all hard coded, I need to figure out how to make this dynamic.Am i not able to force this to take an argument and pass the argument when i call the function / builder (not sure). i.e..ProductTile(<Product>)<Product> Would be json format? Is this doable or am i barking up the wrong tree with Flutters workings?<pre>import 'package:flutter/material.dart'; class ProductTile extends StatefulWidget { @override _ProductTileState createState() => _ProductTileState(); } class _ProductTileState extends State<ProductTile> { int _counter = 0; void _incrementAdd() { setState(() { _counter++; }); } void _incrementSubtract() { setState(() { if (_counter > 0) { _counter--; } }); } void _basketAdd() { setState(() { _counter = 0; }); } @override Widget build(BuildContext context) { return Padding( padding: EdgeInsets.only(bottom: 10.0), child: Container( padding: const EdgeInsets.all(10), height: 350, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(15)), boxShadow: [ BoxShadow( color: Colors.grey, offset: Offset(-1, 1), blurRadius: 5, ), ], ), child: Column( children: <Widget>[ Container( height: 20, decoration: const BoxDecoration(color: Colors.transparent), child: Row( children: [ Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ Text( '£', style: TextStyle( fontSize: 12, ), ), Text( '199', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16, ), ), Text( '99', style: TextStyle( fontSize: 12, ), ), ], ), ), SizedBox( width: 10, ), Container( child: Text( 'Product Offer', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16, ), ), ), ], ), ), SizedBox(height: 5), Material( elevation: 2.0, borderRadius: BorderRadius.all(Radius.circular(10)), child: Container( height: 250, decoration: const BoxDecoration( color: Colors.deepOrange, borderRadius: BorderRadius.all(Radius.circular(10))), child: Image(image: AssetImage('assets/echo.jpg')), ), ), SizedBox(height: 7.25), SizedBox( width:double.infinity, height: 0.5, child: const DecoratedBox( decoration: const BoxDecoration( color: Colors.grey ), ), ), SizedBox(height: 7.25), Container( height: 40, decoration: const BoxDecoration(color: Colors.transparent), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Material( elevation: 2.0, color: Colors.deepOrange, child: InkWell( splashColor: Colors.white70, onTap: _incrementSubtract, child: Container( width: 30, height: 30, child: Padding( padding: EdgeInsets.all(1.0), child: const Icon( Icons.remove, color: Colors.white, ), ), ), ), ), SizedBox(width: 5.0), Material( elevation: 2.0, borderRadius: BorderRadius.all(Radius.circular(20)), child: Container( width: 50, height: 50, decoration: BoxDecoration( border: Border.all(width: 2, color: Colors.deepOrange), borderRadius: BorderRadius.all(Radius.circular(20)), color: Colors.white), child: Center( child: Text( '$_counter', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 18, ), ), ), ), ), SizedBox(width: 5.0), Material( elevation: 2.0, color: Colors.deepOrange, child: InkWell( splashColor: Colors.white70, onTap: _incrementAdd, child: Container( width: 30, height: 30, child: Padding( padding: EdgeInsets.all(1.0), child: const Icon( Icons.add, color: Colors.white, )), ), ), ), SizedBox(width: 20.0), Material( elevation: 2.0, color: Colors.deepOrange, borderRadius: BorderRadius.all(Radius.circular(5)), child: InkWell( splashColor: Colors.white70, onTap: _basketAdd, child: Row( children: <Widget>[ Container( width: 20, height: 30, child: Padding( padding: EdgeInsets.all(1.0), child:…
<b>Pass Args to Widget Build</b>
Hey all, first post and started with flutter yesterday.I have created the below which I call using; ProductTile()The code renders a box that contains product information, an image etc, along with an increment counter which adjusts itself as buttons - or + are pressed. (this will eventually be quantity to add to basket).My problem is that it is all hard coded, I need to figure out how to make this dynamic.Am i not able to force this to take an argument and pass the argument when i call the function / builder (not sure). i.e..ProductTile(<Product>)<Product> Would be json format? Is this doable or am i barking up the wrong tree with Flutters workings?<pre>import 'package:flutter/material.dart'; class ProductTile extends StatefulWidget { @override _ProductTileState createState() => _ProductTileState(); } class _ProductTileState extends State<ProductTile> { int _counter = 0; void _incrementAdd() { setState(() { _counter++; }); } void _incrementSubtract() { setState(() { if (_counter > 0) { _counter--; } }); } void _basketAdd() { setState(() { _counter = 0; }); } @override Widget build(BuildContext context) { return Padding( padding: EdgeInsets.only(bottom: 10.0), child: Container( padding: const EdgeInsets.all(10), height: 350, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(15)), boxShadow: [ BoxShadow( color: Colors.grey, offset: Offset(-1, 1), blurRadius: 5, ), ], ), child: Column( children: <Widget>[ Container( height: 20, decoration: const BoxDecoration(color: Colors.transparent), child: Row( children: [ Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ Text( '£', style: TextStyle( fontSize: 12, ), ), Text( '199', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16, ), ), Text( '99', style: TextStyle( fontSize: 12, ), ), ], ), ), SizedBox( width: 10, ), Container( child: Text( 'Product Offer', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16, ), ), ), ], ), ), SizedBox(height: 5), Material( elevation: 2.0, borderRadius: BorderRadius.all(Radius.circular(10)), child: Container( height: 250, decoration: const BoxDecoration( color: Colors.deepOrange, borderRadius: BorderRadius.all(Radius.circular(10))), child: Image(image: AssetImage('assets/echo.jpg')), ), ), SizedBox(height: 7.25), SizedBox( width:double.infinity, height: 0.5, child: const DecoratedBox( decoration: const BoxDecoration( color: Colors.grey ), ), ), SizedBox(height: 7.25), Container( height: 40, decoration: const BoxDecoration(color: Colors.transparent), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Material( elevation: 2.0, color: Colors.deepOrange, child: InkWell( splashColor: Colors.white70, onTap: _incrementSubtract, child: Container( width: 30, height: 30, child: Padding( padding: EdgeInsets.all(1.0), child: const Icon( Icons.remove, color: Colors.white, ), ), ), ), ), SizedBox(width: 5.0), Material( elevation: 2.0, borderRadius: BorderRadius.all(Radius.circular(20)), child: Container( width: 50, height: 50, decoration: BoxDecoration( border: Border.all(width: 2, color: Colors.deepOrange), borderRadius: BorderRadius.all(Radius.circular(20)), color: Colors.white), child: Center( child: Text( '$_counter', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 18, ), ), ), ), ), SizedBox(width: 5.0), Material( elevation: 2.0, color: Colors.deepOrange, child: InkWell( splashColor: Colors.white70, onTap: _incrementAdd, child: Container( width: 30, height: 30, child: Padding( padding: EdgeInsets.all(1.0), child: const Icon( Icons.add, color: Colors.white, )), ), ), ), SizedBox(width: 20.0), Material( elevation: 2.0, color: Colors.deepOrange, borderRadius: BorderRadius.all(Radius.circular(5)), child: InkWell( splashColor: Colors.white70, onTap: _basketAdd, child: Row( children: <Widget>[ Container( width: 20, height: 30, child: Padding( padding: EdgeInsets.all(1.0), child:…
New post on /r/flutterdev subreddit:
Flutter Dependency Hell
Every time I introduce a dependency into Flutter, my entire project blows up.For example, just now, I added https://pub.dev/packages/firebase_uiAnd suddenly now I need to update all my other firebase dependencies, and the app mysteriously crashes. I am still trying to fix. It's probably yet again a dependency I am using which is not compatible. This is just my latest example. This happens nearly every time I add a new dependency.This happened with https://pub.dev/packages/rxdart a few months ago too etc.Does anyone have a solution or a way they work with this?
May 08, 2020 at 05:06PM by dolanmiu
https://ift.tt/3fvOlVw
Flutter Dependency Hell
Every time I introduce a dependency into Flutter, my entire project blows up.For example, just now, I added https://pub.dev/packages/firebase_uiAnd suddenly now I need to update all my other firebase dependencies, and the app mysteriously crashes. I am still trying to fix. It's probably yet again a dependency I am using which is not compatible. This is just my latest example. This happens nearly every time I add a new dependency.This happened with https://pub.dev/packages/rxdart a few months ago too etc.Does anyone have a solution or a way they work with this?
May 08, 2020 at 05:06PM by dolanmiu
https://ift.tt/3fvOlVw
Dart packages
firebase_ui | Flutter package
Firebase auth UI, dart package to mimic the firebaseUI(Google,Facebook,Twitter,Email supported)
New post on /r/flutterdev subreddit:
Codepen Challange Rocket Challange - not only for Vue.js
The CodePen Challenge this week was only for Vue.js, so I decided to recreate their starter pen, that we can all participate in the fun. So if you are interested, feel free to join.CodePen Challange - https://codepen.io/challenges/2020/may/
Rocket Challenge Starter - https://codepen.io/md-weber/pen/wvKpRXJ
May 08, 2020 at 05:59PM by MyracleDesign
https://ift.tt/2WCPAtv
Codepen Challange Rocket Challange - not only for Vue.js
The CodePen Challenge this week was only for Vue.js, so I decided to recreate their starter pen, that we can all participate in the fun. So if you are interested, feel free to join.CodePen Challange - https://codepen.io/challenges/2020/may/
Rocket Challenge Starter - https://codepen.io/md-weber/pen/wvKpRXJ
May 08, 2020 at 05:59PM by MyracleDesign
https://ift.tt/2WCPAtv
New tweet from FlutterDev:
What day is it? 🤷‍♀️#FlutterFriday!
Want to know how much to trust a new package?
💡Start with Flutter Favorites -- these are packages by verified publishers and have been checked for good runtime behavior.
💡Look at a package's score on pub -- the closer to 100, the better! pic.twitter.com/iKOJjVo6oa— Flutter (@FlutterDev) May 8, 2020
May 08, 2020 at 06:21PM
http://twitter.com/FlutterDev/status/1258794205393981442
What day is it? 🤷‍♀️#FlutterFriday!
Want to know how much to trust a new package?
💡Start with Flutter Favorites -- these are packages by verified publishers and have been checked for good runtime behavior.
💡Look at a package's score on pub -- the closer to 100, the better! pic.twitter.com/iKOJjVo6oa— Flutter (@FlutterDev) May 8, 2020
May 08, 2020 at 06:21PM
http://twitter.com/FlutterDev/status/1258794205393981442
Twitter
#flutterfriday hashtag on Twitter
35m ago @FlutterDev tweeted: "✳️ Early access to features like HotUI a.." - read what others are saying and join the conversation.
New post on /r/flutterdev subreddit:
Padding (Flutter Widget of the Week)
https://youtu.be/oD5RtLhhubg
May 08, 2020 at 06:05PM by EngineerScientist
https://ift.tt/3dwvmbR
Padding (Flutter Widget of the Week)
https://youtu.be/oD5RtLhhubg
May 08, 2020 at 06:05PM by EngineerScientist
https://ift.tt/3dwvmbR
YouTube
Padding (Flutter Widget of the Week)
In an app with lots of widgets, things often get crowded. By using the Padding widget, you can add some space on any or all sides of a widget!
Learn more about Padding → https://goo.gle/2SZEwEH
DartPad → https://goo.gle/2SCuKt3
This video is also subtitled…
Learn more about Padding → https://goo.gle/2SZEwEH
DartPad → https://goo.gle/2SCuKt3
This video is also subtitled…
New post on /r/flutterdev subreddit:
Flutter Material Animations | Animations package
https://www.youtube.com/watch?v=vWBWfTgUaRI
May 08, 2020 at 06:38PM by RobertBrunhage
https://ift.tt/2YKd4iZ
Flutter Material Animations | Animations package
https://www.youtube.com/watch?v=vWBWfTgUaRI
May 08, 2020 at 06:38PM by RobertBrunhage
https://ift.tt/2YKd4iZ
YouTube
Flutter Material Animations | Animations package
The Best Flutter Course on the Internet 👉 https://www.hungrimind.com/learn/flutter
⭐⭐⭐ SUPPORT ME ⭐⭐⭐
Patreon: https://www.patreon.com/join/RobertBrunhage
PayPal: https://www.paypal.me/RobertBrunhage
⭐⭐⭐ CONNECT WITH ME ON…
⭐⭐⭐ SUPPORT ME ⭐⭐⭐
Patreon: https://www.patreon.com/join/RobertBrunhage
PayPal: https://www.paypal.me/RobertBrunhage
⭐⭐⭐ CONNECT WITH ME ON…
New post on /r/flutterdev subreddit:
Is it worth learning flutter (career wise) if you have no experience of native application development?
I'm a web developer but flutter really looks cool nd I'm interested in learning/developing apps in it nd might consider switching to flutter development full time if got the right opportunity. But I have 0 experience of developing apps so I want to know if it's wroth learning flutter, career wise, if you have no experience in Android or iOS development? Can one possibly gets a job without native application development? I consider myself mid-level developer with 3 years of experience. I don't wanna get hired as freshie.
May 08, 2020 at 07:17PM by one_lame_programmer
https://ift.tt/3fw6bb8
Is it worth learning flutter (career wise) if you have no experience of native application development?
I'm a web developer but flutter really looks cool nd I'm interested in learning/developing apps in it nd might consider switching to flutter development full time if got the right opportunity. But I have 0 experience of developing apps so I want to know if it's wroth learning flutter, career wise, if you have no experience in Android or iOS development? Can one possibly gets a job without native application development? I consider myself mid-level developer with 3 years of experience. I don't wanna get hired as freshie.
May 08, 2020 at 07:17PM by one_lame_programmer
https://ift.tt/3fw6bb8
Reddit
From the FlutterDev community on Reddit
Explore this post and more from the FlutterDev community
New post on /r/flutterdev subreddit:
Robert Felker, a creative artist who uses Flutter to make masterpieces.
https://www.youtube.com/watch?v=zsExBUiGJz4
May 08, 2020 at 07:08PM by irvine5k
https://ift.tt/3fuN1lT
Robert Felker, a creative artist who uses Flutter to make masterpieces.
https://www.youtube.com/watch?v=zsExBUiGJz4
May 08, 2020 at 07:08PM by irvine5k
https://ift.tt/3fuN1lT
YouTube
Robert Felker, a creative artist who uses Flutter to make masterpieces.
** SEJA MEMBRO E AJUDE O CANAL **
https://www.youtube.com/channel/UCplT2lzN6MHlVHHLt6so39A/join
Nossos canais (Facebook, Telegram, Discord, Forum)
https://linktr.ee/Flutterando
CURSO DE FLUTTER COM DESCONTO!!
https://flutterando.page.link/rniX
https://www.youtube.com/channel/UCplT2lzN6MHlVHHLt6so39A/join
Nossos canais (Facebook, Telegram, Discord, Forum)
https://linktr.ee/Flutterando
CURSO DE FLUTTER COM DESCONTO!!
https://flutterando.page.link/rniX
New post on /r/flutterdev subreddit:
Why does Flutter style widgets structurally?
Newbie to Flutter and curious why Flutter expresses styles structurally. The Center and Padding, etc. widgets remind me of the <center>, <font>, <big>, etc tags in HTML that have been replaced by CSS styles. So why did Flutter take this approach?
May 08, 2020 at 07:06PM by JianingTX
https://ift.tt/2zixvcn
Why does Flutter style widgets structurally?
Newbie to Flutter and curious why Flutter expresses styles structurally. The Center and Padding, etc. widgets remind me of the <center>, <font>, <big>, etc tags in HTML that have been replaced by CSS styles. So why did Flutter take this approach?
May 08, 2020 at 07:06PM by JianingTX
https://ift.tt/2zixvcn
Reddit
From the FlutterDev community on Reddit
Explore this post and more from the FlutterDev community
New post on /r/flutterdev subreddit:
Andri Jasinski: CI as Smooth as Flutter
https://www.youtube.com/watch?v=Q_Pk3rBKYMU&feature=share
May 08, 2020 at 07:00PM by Pixelreddit
https://ift.tt/3fsTkXj
Andri Jasinski: CI as Smooth as Flutter
https://www.youtube.com/watch?v=Q_Pk3rBKYMU&feature=share
May 08, 2020 at 07:00PM by Pixelreddit
https://ift.tt/3fsTkXj
YouTube
Andri Jasinski: CI as Smooth as Flutter
Let’s talk about out of the box CI solutions for your Flutter projects. We will show you how to set up and configure publishing to the app store and play store. We will also share some tips and custom scripts to show you how developers have been using Codemagic.…
New post on /r/flutterdev subreddit:
Todo – really simple one-liner package for using Kotlin-style TODO()
https://ift.tt/2YI8Ok9
May 08, 2020 at 07:36PM by MarcelGarus
https://ift.tt/2WfZemU
Todo – really simple one-liner package for using Kotlin-style TODO()
https://ift.tt/2YI8Ok9
May 08, 2020 at 07:36PM by MarcelGarus
https://ift.tt/2WfZemU
Dart packages
todo | Dart Package
🛠 Offers a TODO() method to indicate that code has not been implemented yet.
New tweet from FlutterDev:
😲Are your widgets crowding each other?
👉Use Padding widget to provide widgets with some breathing room. Tell it how much space to give with the padding property, and voilà! You've added some distance between your widgets.#WidgetoftheWeek → https://t.co/6OhZ1j2ime pic.twitter.com/bYzwOC7jYX— Flutter (@FlutterDev) May 8, 2020
May 08, 2020 at 08:04PM
http://twitter.com/FlutterDev/status/1258819997100412933
😲Are your widgets crowding each other?
👉Use Padding widget to provide widgets with some breathing room. Tell it how much space to give with the padding property, and voilà! You've added some distance between your widgets.#WidgetoftheWeek → https://t.co/6OhZ1j2ime pic.twitter.com/bYzwOC7jYX— Flutter (@FlutterDev) May 8, 2020
May 08, 2020 at 08:04PM
http://twitter.com/FlutterDev/status/1258819997100412933
Twitter
#widgetoftheweek hashtag on Twitter
15h ago @FlutterDev tweeted: "✏️ Writing your own button controls from.." - read what others are saying and join the conversation.
New post on /r/flutterdev subreddit:
Tiled map library ?
I am looking forward to make a SimCity Like game with tiled auto-generated map with scrolling. I've found 2 libraries : + https://pub.dev/packages/tiled + https://github.com/DanTup/tilerAny advice about choosing one of them ?
May 08, 2020 at 08:58PM by pseeec
https://ift.tt/3dxnFlp
Tiled map library ?
I am looking forward to make a SimCity Like game with tiled auto-generated map with scrolling. I've found 2 libraries : + https://pub.dev/packages/tiled + https://github.com/DanTup/tilerAny advice about choosing one of them ?
May 08, 2020 at 08:58PM by pseeec
https://ift.tt/3dxnFlp
Dart packages
tiled | Flutter Package
A Dart Tiled library. Parse your TMX files into useful representations. Compatible with Flame.
New post on /r/flutterdev subreddit:
<b>18+ Flutter tips & tricks</b>
If you want to produce (or reproduce) a production ready flutter app, we have 18+ tips and tricks for you. 👇<strong>1. Create Intro Screen in Just 10 Minutes</strong>If you need an awesome intro screen but don’t have an awesome idea, <a href="https://pub.dev/packages/introduction_screen">Introduction Screen</a> will save you. You'll be amazed.<strong>2. Use Flutter Snippet</strong>If you need productivity, Flutter Code Snippet will make you a superstar. You can easily create commonly used Flutter classes and methods. For example, you can create StreamBuilder Widget or SingleChildScrollView Widget by typing the shortcut streamBldr and singleChildSV respectively. You can use the flutter snippet in <a href="https://github.com/benznest/flutter-snippet">Android Studio</a> or <a href="https://marketplace.visualstudio.com/items?itemName=Nash.awesome-flutter-snippets">VSCode</a>.<strong>3. Create Mind-blowing Icons Using Font Awesome</strong>You don’t have to be the designer to include mind-blowing icons in your app. Just use the <a href="https://pub.dev/packages/font_awesome_flutter#-readme-tab-">font awesome for flutter</a> and you will create magic in minutes.<strong>4. Enjoy Dependency Magic Using</strong> <strong>get.it</strong>A good practice is to put your app’s logic in classes separated from your Widgets and then inject it wherever needed. For example, one of my app, we need to access the Prefmanger class from multiple places to read and update the user state stored in the localstorage. We used <a href="https://pub.dev/packages/get_it">get_it</a> so that this class can be injectable as a dependency.<code>GetIt locator = GetIt.instance;</code><code>void setupLocator() async {</code><code>var instance = await PrefManager.getInstance();</code><code>locator.registerSingleton<PrefManager>(instance,signalsReady: true);</code><code>FirebaseDatabase database = FirebaseDatabase.instance;</code><code>database.setPersistenceEnabled(true);</code><code>locator.registerSingleton<DatabaseReference>(database.reference());</code><code>}</code>//Now you can easily access our prefmanger class like below:<code>locator<PrefManager>().color = 12 ;</code>If you want to see the code block properly, please check out the <a href="https://medium.com/programminghero/18-flutter-tips-tricks-to-give-birth-to-a-production-ready-app-95718e51b6be">full article on our Medium blog.</a><strong>5. Reuse Data Using the Singleton Pattern</strong>Singleton means the class has only one instance and also provides a global point of access to it. It is also an easy one to get wrong if you are not using it carefully. We need to access our ThemeColorclass (dark mode or light mode) again and again to set our theme color in widget . 👇<code>class ThemeColor{</code><code>// Singleton instance</code><code>static final ThemeColor _repo = new ThemeColor._();</code><code>// Singleton accessor</code><code>static ThemeColor get instance => _repo;</code><code>// A private constructor. Allows us to create instances of Repository</code><code>// only from within the Repository class itself.</code><code>ThemeColor._();</code><code>Color cardColor(){</code><code>return locator<PrefManager>().darkTheme? Color(0xff221F47):Colors.white;</code><code>}</code><code>Color containerColor(){</code><code>return locator<PrefManager>().darkTheme? Color(0xff161430):Colors.white;</code><code>}</code><code>}</code><code>ThemeColor.instance.cardColor()</code><strong>6. Avoid Widget Rebuild by Using</strong> <strong>const</strong> <strong>Constructor</strong>If you want to prevent unwanted widget rebuilds always use <strong>const</strong> constructor. In the code below, the instance of BoxDecoration will remain the same even if the setState is called.<code>Container(</code><code>width: 250,</code><code>height: 250,</code><code>decoration: const BoxDecoration(</code><code>borderRadius: BorderRadius.only(</code><code>bottomLeft:…
<b>18+ Flutter tips & tricks</b>
If you want to produce (or reproduce) a production ready flutter app, we have 18+ tips and tricks for you. 👇<strong>1. Create Intro Screen in Just 10 Minutes</strong>If you need an awesome intro screen but don’t have an awesome idea, <a href="https://pub.dev/packages/introduction_screen">Introduction Screen</a> will save you. You'll be amazed.<strong>2. Use Flutter Snippet</strong>If you need productivity, Flutter Code Snippet will make you a superstar. You can easily create commonly used Flutter classes and methods. For example, you can create StreamBuilder Widget or SingleChildScrollView Widget by typing the shortcut streamBldr and singleChildSV respectively. You can use the flutter snippet in <a href="https://github.com/benznest/flutter-snippet">Android Studio</a> or <a href="https://marketplace.visualstudio.com/items?itemName=Nash.awesome-flutter-snippets">VSCode</a>.<strong>3. Create Mind-blowing Icons Using Font Awesome</strong>You don’t have to be the designer to include mind-blowing icons in your app. Just use the <a href="https://pub.dev/packages/font_awesome_flutter#-readme-tab-">font awesome for flutter</a> and you will create magic in minutes.<strong>4. Enjoy Dependency Magic Using</strong> <strong>get.it</strong>A good practice is to put your app’s logic in classes separated from your Widgets and then inject it wherever needed. For example, one of my app, we need to access the Prefmanger class from multiple places to read and update the user state stored in the localstorage. We used <a href="https://pub.dev/packages/get_it">get_it</a> so that this class can be injectable as a dependency.<code>GetIt locator = GetIt.instance;</code><code>void setupLocator() async {</code><code>var instance = await PrefManager.getInstance();</code><code>locator.registerSingleton<PrefManager>(instance,signalsReady: true);</code><code>FirebaseDatabase database = FirebaseDatabase.instance;</code><code>database.setPersistenceEnabled(true);</code><code>locator.registerSingleton<DatabaseReference>(database.reference());</code><code>}</code>//Now you can easily access our prefmanger class like below:<code>locator<PrefManager>().color = 12 ;</code>If you want to see the code block properly, please check out the <a href="https://medium.com/programminghero/18-flutter-tips-tricks-to-give-birth-to-a-production-ready-app-95718e51b6be">full article on our Medium blog.</a><strong>5. Reuse Data Using the Singleton Pattern</strong>Singleton means the class has only one instance and also provides a global point of access to it. It is also an easy one to get wrong if you are not using it carefully. We need to access our ThemeColorclass (dark mode or light mode) again and again to set our theme color in widget . 👇<code>class ThemeColor{</code><code>// Singleton instance</code><code>static final ThemeColor _repo = new ThemeColor._();</code><code>// Singleton accessor</code><code>static ThemeColor get instance => _repo;</code><code>// A private constructor. Allows us to create instances of Repository</code><code>// only from within the Repository class itself.</code><code>ThemeColor._();</code><code>Color cardColor(){</code><code>return locator<PrefManager>().darkTheme? Color(0xff221F47):Colors.white;</code><code>}</code><code>Color containerColor(){</code><code>return locator<PrefManager>().darkTheme? Color(0xff161430):Colors.white;</code><code>}</code><code>}</code><code>ThemeColor.instance.cardColor()</code><strong>6. Avoid Widget Rebuild by Using</strong> <strong>const</strong> <strong>Constructor</strong>If you want to prevent unwanted widget rebuilds always use <strong>const</strong> constructor. In the code below, the instance of BoxDecoration will remain the same even if the setState is called.<code>Container(</code><code>width: 250,</code><code>height: 250,</code><code>decoration: const BoxDecoration(</code><code>borderRadius: BorderRadius.only(</code><code>bottomLeft:…
Dart packages
introduction_screen | Flutter package
Introduction/Onboarding package for flutter app with some customizations possibilities
New post on /r/flutterdev subreddit:
Tutorial
Guys why there's no proper tutorials for flutter? I understand theres a lot of docs and YouTube videos but I'm feeling like there are there just for getting something done and there's not a real tutorial for really learning it. Deep learning is different than just watching 3+ hours of tutorials and copying it. I always feel like I don't know enough and it proves me right. After completing tons of tutorials I still need more and more help from forums or other open source projects to understand how everything works and feel lost. If there are some other ways or a good tutorials please let me know.
May 08, 2020 at 10:24PM by armen_652
https://ift.tt/35Uafh7
Tutorial
Guys why there's no proper tutorials for flutter? I understand theres a lot of docs and YouTube videos but I'm feeling like there are there just for getting something done and there's not a real tutorial for really learning it. Deep learning is different than just watching 3+ hours of tutorials and copying it. I always feel like I don't know enough and it proves me right. After completing tons of tutorials I still need more and more help from forums or other open source projects to understand how everything works and feel lost. If there are some other ways or a good tutorials please let me know.
May 08, 2020 at 10:24PM by armen_652
https://ift.tt/35Uafh7
reddit
Tutorial
Guys why there's no proper tutorials for flutter? I understand theres a lot of docs and YouTube videos but I'm feeling like there are there just...
New post on Flutter Dev Google group:
1.17 MaterialColor changed ???
Just playing around with the default app and tried to change colors in primarySwatch, I noticed that none of the "accent" or sub colors are supported now. This works: Colors.blue or Colors.red These examples do not work: Colors.blueAccent Colors.red[200] Colors.grey.shade700 The above
May 08, 2020 at 11:28PM by jerry hamby
https://ift.tt/2SNNw0S
1.17 MaterialColor changed ???
Just playing around with the default app and tried to change colors in primarySwatch, I noticed that none of the "accent" or sub colors are supported now. This works: Colors.blue or Colors.red These examples do not work: Colors.blueAccent Colors.red[200] Colors.grey.shade700 The above
May 08, 2020 at 11:28PM by jerry hamby
https://ift.tt/2SNNw0S
Google
Google Groups
Google Groups allows you to create and participate in online forums and email-based groups with a rich experience for community conversations.
New post on /r/flutterdev subreddit:
How to create Card Carousel in Flutter?
https://ift.tt/3ftiULE
May 08, 2020 at 11:56PM by Elixane
https://ift.tt/2zlGg5q
How to create Card Carousel in Flutter?
https://ift.tt/3ftiULE
May 08, 2020 at 11:56PM by Elixane
https://ift.tt/2zlGg5q
Medium
How to create Card Carousel in Flutter?
As a mobile developer, we sometimes have to create sliding, animated, background image carousels, but sometimes we require to create…
New post on /r/flutterdev subreddit:
When to use For Each vs For In
https://youtu.be/6z60dSlYkHY
May 09, 2020 at 01:38AM by thehappyharis
https://ift.tt/3cjQfqn
When to use For Each vs For In
https://youtu.be/6z60dSlYkHY
May 09, 2020 at 01:38AM by thehappyharis
https://ift.tt/3cjQfqn
YouTube
When to use For Each vs For In
They are both similar. However, one its easier to read and the other is good at repeating widgets in Flutter. Yikes. 👉 Pre Sign Up to Create a Flutter Portfo...