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

Google Maps flutter Gestures are not working inside stack
I am using google_maps_flutter. My widget tree is Scaffold -> SingleChildScrollView -> Stack and then google map. I am unable to zoom in and zoom out using gestures.SingleChildScrollView( Stack( children: <Widget>[ Container( height: MediaQuery.of(context).size.height - 10.0, width: MediaQuery.of(context).size.width * 1, child: _mapView ? GoogleMap( initialCameraPosition: CameraPosition( target: _outletData[0].locationCoords, zoom: 12.0), markers: Set.from(allMarkers), onMapCreated: mapCreated, zoomControlsEnabled: false, zoomGesturesEnabled: true, scrollGesturesEnabled: true, compassEnabled: true, rotateGesturesEnabled: true, mapToolbarEnabled: true, tiltGesturesEnabled: true,
 ) : Container(), ), 
I also tried below code but still unable to zoom in zoom out using two finger touchStack( children: <Widget>[ Container( height: MediaQuery.of(context).size.height - 10.0, width: MediaQuery.of(context).size.width * 1, child: _mapView ? GoogleMap( initialCameraPosition: CameraPosition( target: _outletData[0].locationCoords, zoom: 12.0), markers: Set.from(allMarkers), onMapCreated: mapCreated, zoomControlsEnabled: false, zoomGesturesEnabled: true, scrollGesturesEnabled: true, compassEnabled: true, rotateGesturesEnabled: true, mapToolbarEnabled: true, tiltGesturesEnabled: true, gestureRecognizers: Set() ..add(Factory<PanGestureRecognizer>( () => PanGestureRecognizer())) ..add(Factory<ScaleGestureRecognizer>( () => ScaleGestureRecognizer())) ..add(Factory<TapGestureRecognizer>( () => TapGestureRecognizer())) ..add( Factory<VerticalDragGestureRecognizer>( () => VerticalDragGestureRecognizer()), ), ) : Container(), ),

July 03, 2020 at 12:51PM by bilalrabbi
https://ift.tt/31HCyPK
New post on /r/flutterdev subreddit:

Adding Flutter Web to an existing Flutter phone app project?
I have a few Flutter projects that I'd like to upgrade to also have a Flutter-made website in the project. I have looked around a bit but could only find 1 or 2 Medium articles about how to do this (both about a year old)I'm curious if there is a Flutter official upgrade plan or if this is all still experimental?
Maybe there is a good walk through somewhere on the internet?

July 03, 2020 at 03:53PM by maylortaylor
https://ift.tt/3itUfrZ
New post on /r/flutterdev subreddit:

What exactly is the difference between provider and get_it (state management and services)?
And which is more appropriate in this scenario?I'm using the view – viewmodel – services architecture by FilledStacks, but with a few changes. I'm using only provider and change notifier for state management, I'm not using the stacked library.One thing I learned was that your "Service" classes should be singletons, so that they are not instantiated every time you call a function. Apart from this, since there's only one single instance, I can implement caching of results of expensive functions.I thought I could easily do this like this:
final service = _Service(); // single instance imported everywhere class _Service { // functions here } 
Most examples I see use the get_it package to implement a singleton. Does the get_it locator way add any advantage?Now about Provider. If I'm explaining correctly, Provider allows you to expose a singleton instance of classes to use anywhere in your app. If used with change notifier, you get the changeNotifier() function to update UI. I thought I could use only provider and multi-provider for all my services too so that they're a single instance, but this requires the build context to access them, and this can make code a little messy (because context has to be passed down various functions, in business logic too sometimes)So a few issues:Should I use get_it? Currently, I'm only using Provider along with the way I described above to use servicesIs the singleton pattern the correct way to go in all cases?Can I used only get_it for everything?Thanks for reading. To be honest, it feels like the more I learn about clean architecture, the less I know about clean architecture.

July 03, 2020 at 03:23PM by pyboy10000
https://ift.tt/2YTh8gG
New post on /r/flutterdev subreddit:

Fully featured Qt binding for Flutter/Dart
https://ift.tt/2Y8slZ9

July 03, 2020 at 04:54PM by the_recipe
https://ift.tt/2AstEdF
New post on /r/flutterdev subreddit:

Navigate to a view in Flutter on FCM notification click
/r/Firebase/comments/hkk2m9/navigate_to_a_view_in_flutter_on_fcm_notification/

July 03, 2020 at 04:37PM by do_it_hard
https://ift.tt/3itELnO
New post on /r/flutterdev subreddit:

What does production ready code look like in dart/flutter?
Are there any open source examples of production grade code out there? I’ve built a few apps in flutter, but they’ve always felt messy and amateurish. Would love to see how successful projects have structured their flutter code. Is it just following the common flutter architectures? I think there’s a lot to learn from reading code. This might be hard to find given the lack of flutter jobs on the market but any app with > 1k would be a good example in my opinion.

July 03, 2020 at 05:33PM by Throqaway
https://ift.tt/31HguEQ
New post on /r/flutterdev subreddit:

Flutter Developer Weekly Newsletter - Issue #1 is LIVE
Just published the first issue of Flutter Developer Weekly -- a curated newsletter for all things Flutter!Check it out: https://newsletter.flutterdeveloperweekly.com/issues/1

July 03, 2020 at 06:52PM by FlutterDevWeekly
https://ift.tt/3gunBol
New post on /r/flutterdev subreddit:

Utility widget which writes notifications into event sink
https://ift.tt/2YXP9fy

July 03, 2020 at 07:18PM by lesnitsky_a
https://ift.tt/2BZY5Z9
New post on /r/flutterdev subreddit:

How strictly do you follow your architecture in Flutter?
Say for example, the architecture is something likeView (UI)View model (state management, with provider and change notifier, for example)Services (the "logic" of your app)In short, the View is what the user sees. Any interactions, such as button clicks can be caught by the Vide model. The View model tells the Service, and may or may not receive data back. The View model, in turn may send this data back to the view. I learned of this from FilledStacks.How strictly do you (or are you able to) follow such architecture?Sometimes, having 3 of the above layers seems overkill. You can get away by just using the view and the view model.In some cases, I feel that the view model is not required to sit between the View and Services. For example, my authentication service:
class AuthenticationService { Future<User> currentUser() {} Future<void> register(email, password) {} Future<void> login(email, password) {} Future<void> logout() {} } // (I can access an instance of this class or use a service locator like get_it if I need it as a singleton) // final authService = AuthenticationService(); 
When I have something like this authentication service, I feel that the View model isn't required. I can just put the login or register functions inside my View.Another similar example is when I just want to get some data from a database and display it in the View. In my service, I'm also caching the results so I don't read the database too many times:
class DatabaseService { List _dataCache; Future<List> getData() { // return _dataCache if it is not null // otherwise, get the data from the database } } 
This is also one of the cases where the View model may not be required, as I can directly access the service inside my widget's build method (with FutureBuilder). Should I still use a View model in this case?

July 03, 2020 at 07:35PM by pyboy10000
https://ift.tt/3irp4NH
New post on /r/flutterdev subreddit:

Cinema UI Flutter || Check out this amazing video.
https://youtu.be/uLqf5ReQZow

July 03, 2020 at 10:33PM by Admirable_Ad6745
https://ift.tt/3glJkyw
New post on /r/flutterdev subreddit:

auto_route: 0.6.0 The simplest declarative routing solution for flutter
https://ift.tt/2VKEQtt

July 03, 2020 at 10:59PM by Milad_Alakarie
https://ift.tt/2NWIjk8
New post on /r/flutterdev subreddit:

Simple Calculator for Rookies IOS-STYLE || Flutter
https://youtu.be/hG1LtnE8RcU

July 03, 2020 at 11:12PM by Admirable_Ad6745
https://ift.tt/3gk74D2
New post on Flutter Dev Google group:

Bottom Navigation with a List Screen in Flutter
Hello everyone, I have created a bottom navigation bar on my app and edited it the way I found it appropriate. I have 4 items (Home page, messages, settings, profile). My next task is to add a list screen on my home page. Something like Instagram has, only without the pictures (just info). Is

July 03, 2020 at 11:12PM by Renato Mutavdzic
https://ift.tt/3iptN2y
New post on Flutter Dev Google group:

Convert Image to PNG in flutter_web?
I've got an app that's drawing a complex graphic using a CustomPaint. I would like to be able to offer the user the ability to download the graphic as a PNG (or, really, any device-independent image format). I can capture the graphic using a PictureRecorder and invoke the recorder's endRecording

July 03, 2020 at 11:46PM by Stephen Beitzel
https://ift.tt/38qsJqt