Flutter Heroes
26.1K subscribers
272 photos
2 videos
31.1K links
Download Telegram
New tweet from FlutterDev:

Need for speed (and performance) ⚡️

Learn how to improve the initial load time for your Flutter web application by minimizing the JavaScript bundle with tree shaking and deferred loading.

Read the blog by @perclasson ↓https://t.co/TFHXxVzF8Z— Flutter (@FlutterDev) June 16, 2020

June 16, 2020 at 08:11PM
http://twitter.com/FlutterDev/status/1272954874309701632
New post on /r/flutterdev subreddit:

<b>Adapt to different screen size- Flutter ( just copy-paste the code and chill ;) )</b>
<pre>import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; double defaultScreenWidth = 400.0; double defaultScreenHeight = 810.0; double screenWidth = defaultScreenWidth; double screenHeight = defaultScreenHeight; class Sizes { static double s0 = 0.0; static double s1 = 1.0; static double s2 = 2.0; static double s3 = 3.0; static double s4 = 4.0; static double s5 = 5.0; static double s6 = 6.0; static double s8 = 8.0; static double s10 = 10.0; static double s12 = 12.0; static double s14 = 14.0; static double s15 = 15.0; static double s16 = 16.0; static double s18 = 18.0; static double s20 = 20.0; static double s25 = 25.0; static double s30 = 30.0; static double s40 = 40.0; static double s50 = 50.0; static double s60 = 60.0; static double s70 = 70.0; static double s80 = 80.0; static double s100 = 100.0; static double s120 = 120.0; static double s150 = 150.0; static double s165 = 165.0; static double s200 = 200.0; static double s300 = 300.0; static double s500 = 500.0; /*Image Dimensions*/ static double defaultIconSize = 25.0; static double defaultImageHeight = 100.0; static double defaultCardHeight = 120.0; static double defaultImageRadius = 40.0; static double snackBarHeight = 50.0; static double texIconSize = 30.0; static double circularImageRadius = 36.0; /*Default Height&Width*/ static double defaultIndicatorHeight = 5.0; static double alertHeight = 200.0; static double appBarHeight = 235.0; static double minWidthAlertButton = 70.0; /*EdgeInsets*/ static EdgeInsets spacingAllDefault = EdgeInsets.all(s8); static EdgeInsets spacingAllSmall = EdgeInsets.all(s10); static EdgeInsets spacingAllExtraSmall = EdgeInsets.all(s10); static Future setScreenAwareConstant(context) async { screenWidth = MediaQuery.of(context).size.width; screenHeight = MediaQuery.of(context).size.height; getSize() async { if (screenWidth == 0 || screenHeight == 0) { screenWidth = MediaQuery.of(context).size.width; screenHeight = MediaQuery.of(context).size.height; await Future.delayed(Duration(milliseconds: 300)); await getSize(); } } await getSize(); if (screenWidth > 300 && screenWidth < 500) { defaultScreenWidth = 450.0; defaultScreenHeight = defaultScreenWidth * screenHeight / screenWidth; } else if (screenWidth > 500 && screenWidth < 600) { defaultScreenWidth = 500.0; defaultScreenHeight = defaultScreenWidth * screenHeight / screenWidth; } else if (screenWidth > 600 && screenWidth < 700) { defaultScreenWidth = 550.0; defaultScreenHeight = defaultScreenWidth * screenHeight / screenWidth; } else if (screenWidth > 700 && screenWidth < 1050) { defaultScreenWidth = 800.0; defaultScreenHeight = defaultScreenWidth * screenHeight / screenWidth; } else { defaultScreenWidth = screenWidth; defaultScreenHeight = screenHeight; } print(''' ========Device Screen Details=============== screenWidth: $screenWidth screenHeight: $screenHeight defaultScreenWidth: $defaultScreenWidth defaultScreenHeight: $defaultScreenHeight '''); ScreenUtil.init( context, width: defaultScreenWidth, height: defaultScreenHeight, allowFontScaling: true, ); FontSize.setScreenAwareFontSize(); /*Padding & Margin Constants*/ s1 = ScreenUtil().setWidth(1.0); s2 = ScreenUtil().setWidth(2.0); s3 = ScreenUtil().setWidth(3.0); s4 = ScreenUtil().setWidth(4.0); s5 = ScreenUtil().setWidth(5.0); s6 = ScreenUtil().setWidth(6.0); s8 = ScreenUtil().setWidth(8.0); s10 = ScreenUtil().setWidth(10.0); s12 = ScreenUtil().setWidth(12.0); s14 = ScreenUtil().setWidth(14.0); s15 = ScreenUtil().setWidth(15.0); s16 = ScreenUtil().setWidth(16.0); s18 = ScreenUtil().setWidth(18.0); s20 = ScreenUtil().setWidth(20.0); s25 = ScreenUtil().setWidth(25.0); s30 = ScreenUtil().setWidth(30.0); s40 = ScreenUtil().setWidth(40.0); s50 = ScreenUtil().setWidth(50.0); s60 = ScreenUtil().setWidth(60.0); s70 = ScreenUtil().setWidth(70.0); s80 = ScreenUtil().setWidth(80.0);…
New post on Flutter Dev Google group:

flutter/firestore
i want to retrieve a variable from my firestore data base and store it in a variable (double) to use it later any help!

June 17, 2020 at 12:10AM by mohamed chirchi
https://ift.tt/2zEohrp
New post on /r/flutterdev subreddit:

Does using BLOC pattern saves development and production time? What is the key benefits from it?
Hi, I have been learning BLOC pattern in Flutter. I know it's about moving business logic and separating it from UI. But apart from this, what are the benefits? I have to create many extra files, and create BLOC there.I also feel that it is a lot of extra work as well as it's hard to switch files again and again from widget to bloc file to look what logic I have implemented inside bloc file. Does BLOC pattern reduces the development time of an app? What are it's benefits in a long term?

June 17, 2020 at 04:50AM by milanpoudel
https://ift.tt/3ftUXTE
New post on Flutter Dev Google group:

Can we check the device to be smartphone or other device by using bluetooth in flutter?
*The issue is when my flutter app is in bluetooth scanning mode it is detecting all the bluetooth devices so i need only smartphone bluetooth devices to detect using my app and other devices like smarTv,smartwatch and bands and headphones i need to reject them in my flutter app* *Is there any

June 17, 2020 at 07:43AM by yashwanth balanagu
https://ift.tt/2US2O5t
New post on /r/flutterdev subreddit:

Github Workflow for Building, Releasing Flutter web app to Github Pages and Firebase Hosting
https://ift.tt/3hxRQfb

June 17, 2020 at 08:31AM by ayushpguptaapgapg
https://ift.tt/3ea2arz
New post on Flutter Dev Google group:

Url_launcher Error While Building Apk
*Hello,* `import‘ package: url_launcher / url_launcher.dart '; class CallsAndMessagesService { void sendEmail (String email) => launch (“mailto: $ email”); } ` *By using this structure, I provide guidance for sending mail when the incoming email address is clicked.* flatbutto the (

June 17, 2020 at 08:50AM by Gökçen Merve Horuk
https://ift.tt/3eaE1RY
New post on /r/flutterdev subreddit:

Flutter coerced me to use a design pattern!
I wanted to create an appbar that was constant over many pages. And I learnt that a hero is something that worked for this.So now I have a heroappbarfactory that allows me to initialise the appbar I need by context. Rather than copying code over that I might have resorted to do otherwise. :D

June 17, 2020 at 09:10AM by MimbleNimble
https://ift.tt/2Y5ZZ2K
New post on /r/flutterdev subreddit:

Can you Help me?
Hi everyone. I am new to flutter. Can anyone tell me if deleting %temp% files on windows10 affects flutter project. I am having an error doing it so i just wnated to know.

June 17, 2020 at 10:33AM by regmibishal42
https://ift.tt/3fD3SCt
New post on /r/flutterdev subreddit:

Adapt to different screen size- Flutter ( just copy-paste the code and chill ;) )
I will provide you with the piece of code that you can simply copy or paste in all your applications to make your world simpler. ;)Adapt to different screen size flutterThanks me later ;)

June 17, 2020 at 11:59AM by navvsinghh
https://ift.tt/3daaYwn
New post on Flutter Dev Google group:

Call_number Error While Creating Apk
*Hello,* *Pubspec.yaml content;* dependencies: flutter: sdk: flutter shared_preferences: 0.5.7+3 path_provider: 1.6.8 sqflite: 1.3.0 http: 0.12.1 xml2json: 4.2.0 carousel_slider: 2.1.0 provider: 4.1.3 flutter_bloc: 4.0.0 stream: 2.5.0 equatable: 1.2.0 get_it: 4.0.2 call_number:

June 17, 2020 at 12:21PM by Gökçen Merve Horuk
https://ift.tt/2YGLJMZ
New post on Flutter Dev Google group:

cupertino picker returns index value instead of String
hey guys. does anyone know what i am setting wrong here? my cuppertinoPicker shows the Texts as children but when i return the value it gets me the index of chosen item? int selectedValue; CupertinoPicker( onSelectedItemChanged: (value) { setState(() { selectedValue = selectedValu

June 17, 2020 at 01:08PM by Error Place
https://ift.tt/2URQIJT
New post on Flutter Dev Google group:

Passing a stream to multiple stateless widgets
I am initialising a websocket stream in initState and passing it to multiple stateless widgets, however I am not getting the stream( it has no data) in the stateless child widgets. I am using a PageView and the children widgets are the the pages for the PageView. void main() => runApp(LinuxMon

June 17, 2020 at 02:02PM by Jake Rener
https://ift.tt/3fzjW8c
New post on Flutter Dev Google group:

Passing a stream to multiple stateless widgets doesn't work
I am initialising a websocket stream in initState and passing it to multiple stateless widgets, however I am not getting the stream( it has no data) in the stateless child widgets. I am using a PageView and the children widgets are the the pages for the PageView. void main() => runApp(LinuxMon()

June 17, 2020 at 02:12PM by Jake Rener
https://ift.tt/37JlOIH
New post on Flutter Dev Google group:

I am getting GRPC failed error whenever I use geolocator plugin...
Hi, I have been trying to solve this error for the past few days but was unable to o so. Error:- PlatformException(ERROR_GEOCODING_COORDINATES, grpc failed, null) Code:- Position position = await Geolocator() .getCurrentPosition( desiredAccuracy: LocationAccuracy.high);

June 17, 2020 at 02:24PM by Souvik
https://ift.tt/2Y71Cx8
New post on /r/flutterdev subreddit:

If you had to guess, will Flutter support the next platforms that replace smartphones?
Whatever is coming to replace smartphones, im guessing some form of glasses, will Flutter be updated to help doing apps for them or will some new tools be introduced? If smartphones start to die out, I cant see how Flutter will be even useful. What is your guess?

June 17, 2020 at 03:32PM by splishyandsplashy
https://ift.tt/2YGDRv7