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

LimitedBox gives children boundaries when parents don't.

The LimitedBox widget gives you control over widget size constraints in cases where their dimensions are unbounded.

Click here for more #WidgetoftheWeek tips → https://t.co/ZJR6JtHpDu pic.twitter.com/oFJqhmENxO— Flutter (@FlutterDev) June 26, 2019

June 26, 2019 at 09:10PM
http://twitter.com/FlutterDev/status/1143959616759291904
New post on /r/flutterdev subreddit:

<b>Dart is held back by its lack of third and first party tooling, and the Google Photos API should expose a gRPC endpoint</b>
<strong>tl;dr</strong> Writing API clients in Dart is boring and hard -- gRPC makes it easy. Google doesn't expose a gPhotos gRPC endpoint, nor do they expose useful files/tools to generate a Dart REST API client from a machine-readable service definition. They shoulddo one or the other -- exposing gRPC endpoint is probably easier given the current state of affairs.This is the story of my short journey into trying to write a Google Photos API client. This is not advice, strictly speaking, it's more a plea and excitement for the future of Dart and Google Photos.I'm thrilled to see Google Photos finally expose a Photos API after Google sunset <a href="https://picasa.google.com/">Picassa</a> and its API several years ago. This is a major step in the right direction.<strong>The current state of gPhotos affairs</strong>Google released a <a href="https://github.com/googlecodelabs/photos-sharing/tree/final/">codelab</a> demonstrating the (relatively new) Google Photos API in a Flutter app. It uses the <a href="https://developers.google.com/photos/library/reference/rest/">Google Photos REST api</a>, and as far as I can tell, they had to build all of the <a href="https://github.com/googlecodelabs/photos-sharing/tree/final/lib/photos_library_api">wiremodel classes</a> by hand and then build_runner to generate the JSON serialization methods. This is because gPhotos doesn't actually expose a gRPC gateway.<em>It's tiresome to do this type of API client generation by hand. This is the kind of thing that makes developers not want to use your API and/or quit their jobs.</em><strong>Some gRPC gateway exists, but we can't use it</strong>Google actually seems to have gRPC working -- nearly all service-to-service communication within Google datacenters is powered by protobuf -- it's just hidden from external devs. The <a href="https://imgur.com/3H4veYh">API docs seem to hint</a> at a gRPC service hidden behind a JSON transcoding gateway, and the official Java docs include <a href="https://github.com/google/java-photoslibrary/blob/0014b569f725ff801ff36e32266479442c850119/photoslibraryapi/src/main/java/com/google/photos/library/v1/proto/AddEnrichmentToAlbumResponse.java#L2">files clearly generated from .proto files</a>. In fact, most Google services do expose gRPC interfaces, and their .proto definitions are publically available in <a href="https://github.com/googleapis/googleapis">this repo</a>.<em>This is proof positive that Google has a gRPC gateway hidden behind a firewall. Why not expose it? This is a solved problem for teams at Google.</em><strong>Going for broke -- can I at least autogenerate a REST API client?</strong>Even without a gRPC endpoint, these proto files could still be used to automatically generate the json wiremodels that Google seems to have hand written for their codelab. However, the path reference in the above Java file (google/photos/library/v1/**.proto) is not included in Google's publicly released proto files repo.<em>So the answer currently is "no, we cannot autogenerate REST API clients for gPhotos from gRPC def'ns."</em><strong>Maybe there's some hope?</strong>Google does, however, offer a <a href="https://developers.google.com/discovery/v1/reference/apis">discovery document</a> for the Google Photos APi. It's located <a href="https://photoslibrary.googleapis.com/%24discovery/rest?version=v1">here</a>. Some tools currently exist that claim to generate API clients from discovery documents. The two that currently exist are written by Google:<a href="https://github.com/googleapis/gapic-generator">gapic generator</a><a href="https://github.com/google/apis-client-generator">apis clients generator</a>The "gapic generator" is the more broadly supported of the two, but is useless for Dart developers. No Dart support whatsoever, and regardless, Java is the only supported…
New post on Flutter Dev Google group:

Unhandled Exception: Converting object to an encodable object failed: Photography
my cloud_firestore looks like this: *all_images:{imageUrl:[]}, couplePhoto:String, female:String, image_url:String, info:String, male:String* my model class: import 'package:json_annotation/json_annotation.dart'; part 'Model.g.dart'; @JsonSerializable() class Photography {

June 27, 2019 at 04:49AM by Bhanuka Isuru
https://ift.tt/2LomvxS
New post on /r/flutterdev subreddit:

Easy Custom toast notifications in Flutter using OkToast
https://ift.tt/31XSUBt

June 27, 2019 at 04:40AM by Filledstacks
https://ift.tt/2YfD9DF
New post on Flutter Dev Google group:

How to create gesture in sliver grid
Hi, I'm new to flutter. Somebody, please guide me how to add gesture detector to sliver grid.Thanks in advance

June 27, 2019 at 09:41AM by Suriya Suriya
https://ift.tt/2LvanLR
New post on Flutter Dev Google group:

why flutter has unbounded constraints for flex children? wh
According to https://ift.tt/2Xc77fo, "Layout each child a null or zero flex factor (e.g., those that are not Expanded) with unbounded horizontal constraints and the incoming vertical constraints. If the crossAxisAlignment is CrossAxisAlignment.stretch, instead use

June 27, 2019 at 12:37PM by Guanggen Zhang
https://ift.tt/2J9oO5o
New post on Flutter Dev Google group:

Flutter vs. React Native
Which Framework to Choose for Next Mobile App Development?

June 27, 2019 at 01:05PM by Jimmie Williams
https://ift.tt/2xdKlEi
New post on Flutter Dev Google group:

User grid over camera
I am using ImagePicker.pickImage(source: ImageSource.camera) to let the user to take photo. I wonder if there is a way to display my own grid (a simple rectangle) over the displayed camera on the screen? Thanks, IMozes

June 27, 2019 at 01:11PM by IMozes
https://ift.tt/2J33EWg
New post on /r/flutterdev subreddit:

AndroidStudio3.5beta5 and flutter plugin 36.1.x
No new project menu choice for flutter projects after flutter plugin update.​I assume work around is to row back to 35.x flutter plugin hint do not update flutter androidstudio plugin for now..37.x is coming in afew days anyway

June 27, 2019 at 02:37PM by fredgrott
https://ift.tt/2NdhHho
New post on /r/flutterdev subreddit:

Is flutter a good choice to make mini games like Pac-Man ?
I have seen and view the code of games made using SpriteWidget and Flame Engine. But making a game like Pac-Man in flutter from start I am finding it difficult. How should I start ?

June 27, 2019 at 02:32PM by yash36five
https://ift.tt/31YRVAI
New post on Flutter Dev Google group:

Custom widget how to connect items?
I want to create 'bubbles', that are connected to each other, based on data of some kind (so the result may need to be scrollable). 5-------6 | 4-------3 | 1-------2 I already created a widget for the bubbles, I now need to place and connect them. The question now is how to do it? Should I

June 27, 2019 at 03:30PM by Chris W
https://ift.tt/2xhZJ2E
New post on /r/flutterdev subreddit:

Video_Player Package on iOS has a really annoying bug
I want to use the video_player plugin to display one simple video on the home_screen of my app. I've implemented the player and it works perfectly until, when i exit the app on my iphone and then open it again, the video player turns into a white screen. Same thing happens if i navigate to another page on my app and then come back to the home page, also when I slide the Control Center on my phone. This only happens on IOS and when the video is PAUSED.Now if I run my app on the android simulator, this problem disappears but the audio in the video starts way before the video itself.I won't bore you with the code because its the same exact implementation of the plug-in's example on github.Here is a gif showing the issue: https://giphy.com/gifs/eMOy0qS09WpoAEADDlI have no clue on what might be causing this, is there a way I can fix this ?Thanks

June 27, 2019 at 03:52PM by michelrahme
https://ift.tt/2YgaDli
New post on /r/flutterdev subreddit:

Is it possible to make an Android app that blocks other apps (using Flutter)?
I'm wondering if it's recommended, or at least possible, to build a simple app blocker in for Android using Flutter.Essentially, I would want to have access to the user's installed apps, allow them to select which apps they want to block, and then when they visit those sites, have my app come up (eg: Stay Focused, Forest, or QualityTime). I know plenty of these exists, just looking to build it as a concept.I understand that building a content/app blocker on Android is considerably easier than iOS, but I wasn't sure if that would apply to Flutter applications as well - would it make more sense to build an app blocker natively? The reason I ask specifically about Flutter is that I have heard from several first-time developers that it is considerably easier to use than developing natively.Any help or resources are greatly appreciated, thanks in advance!

June 27, 2019 at 04:38PM by ColinAndFriends
https://ift.tt/2XiP8E9
New post on /r/flutterdev subreddit:

Demanding Flutter plugin Github issues to be seperate
I really would like flutter official plugin issues to be contained in their separate issue trees. Right now it is really hard to search for an issue that is specific to a certain plugin.( for instance flutter google maps)This results in duplicate github issues for the same issue and results in loss of precious time for the community.I am not sure if there is an easy way to accomplish this in github but I am sure you guys have some ideas.

June 27, 2019 at 05:56PM by aytunch
https://ift.tt/2NjkBBr
New post on /r/flutterdev subreddit:

Requesting each Flutter plugin GitHub issues to be separate
I really would like flutter official plugin issues to be contained in their separate issue trees. Right now it is really hard to search for an issue that is specific to a certain plugin.( for instance flutter google maps)This results in duplicate GitHub issues for the same issue and results in loss of precious time for the community.I am not sure if there is an easy way to accomplish this in GitHub but I am sure you guys have some ideas.(recreated the post due to title wording mistake. changed "demanding to "requesting" as requested by commentators)

June 27, 2019 at 06:44PM by aytunch
https://ift.tt/2ZYcewB
New post on Flutter Dev Google group:

Advanced share not taking the url file
Hello, I am passing url as a local file in the device but it is not fetching the file to share. I have pasted the code below. void whatsapp() async { print(url); AdvancedShare .whatsapp(msg: "It's okay :)", url: url,) .then((response) { handleResponse(response, appName:

June 27, 2019 at 07:15PM by Gopal Jangid
https://ift.tt/2FwuF3F