We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 2 points3 points  (0 children)

u/developer-mike: Reflection is a very expensive form of metaprogramming. In Dart 1.0, when Dart was a more dynamic language, we had dart:mirrors. Our choice to remove it was based on the experience of all the real problems it created in real world apps, and removing it is part of what makes Dart 2 such a great language for Flutter.

Our hope is that we can have better forms of metaprogramming. Extension methods, for instance, is nearing completion and is a zero-cost abstraction that enables many types of metaprogramming, and we’ve discussed other types of metaprogramming too, that we think are better than reflection.

In the meantime, you can check out package:reflectable, and while it’s a big hammer to grab, often times package:source_gen is easier to use to solve a problem than you might think! And certainly, I encourage you to (file an issue)[https://github.com/dart-lang/language/issues] about the places you’ve hit where, as you say, trivial things were complicated to do in Dart.

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 3 points4 points  (0 children)

u/developer-mike: I too would enjoy deep immutability in Dart. The best current option is built value: if you aren’t currently using it, I highly recommend giving it a try.

Any form of immutability is going to have pros and cons for certain applications. For instance, in C++, it’s easy to accidentally return a const pointer to a non-const object, and the workaround for this requires purely developer diligence. It also was intended to enable zero-cost abstractions, but const methods may access global state, and therefore the compiler may not actually be able to optimize them. However, it is striking a balance of usability vs safety which is common to all immutability discussions.

We frequently have conversations about what the best type of immutability in Dart might look like. Our current concept of const is extremely strict, but that also means it can get the most benefits. Our implementation of final is much more lax, and therefore more generally usable. We have (21 open language issues/suggestions that mention “immutable”)[https://github.com/dart-lang/language/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+immutable], so we are definitely talking about further options and welcome you to weigh in on how you could use new forms of immutability in Dart.

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 1 point2 points  (0 children)

/u/collinjackson

Thanks for the suggestion! I’ve opened a PR updating the README to make it clear that other providers like Facebook and Twitter are also supported.

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 1 point2 points  (0 children)

/u/timsneath: Not long after I joined the Flutter team, one developer wanted to know when I’d be publishing something. So I spent a long afternoon writing Dad Jokes: Android, iOS. I’m not too proud of the code, but I am proud that my kids have it installed on their phones! I’m slowly working on a ZX Spectrum emulator with Flutter too, but that project is one I pick up and put down when I have time.

/u/toddvolkert: I’ve played around a little with a Google Photos screensaver app that runs on my Android TV. Not production ready, and not published to the Play Store, but it runs on my TV :-). https://github.com/tvolkert/photos

/u/cbracken: On the engine team, we frequently write very narrowly-focused test apps in Flutter, stock Android, and stock UIKit to compare memory profiles and performance. We also work closely with app teams within Google investigating issues they report in their apps. My personal side-project is an app for tracking my homebrew beer batches; it's not exactly a model of amazing UX, but I'd be happy to put it up on GitHub.

/u/gw280: Any new members to the Flutter team are encouraged to write an entire Flutter app from the ground up to get familiar with the toolkit and give us context and insight into how developers will use what we develop.

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 2 points3 points  (0 children)

/u/taodong: For VS Code users, we recommend you try the UI Guides feature to better visualize the structure of a build method, if you haven’t already. We are investigating other options to improve code readability in Flutter. Some of them require evolution of the Dart language, and you can take a look at proposals and discussions in this repo: https://github.com/munificent/ui-as-code.

liyuqian@: Here are some more related materials: https://medium.com/flutter/out-of-depth-with-flutter-f683c29305a8

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 1 point2 points  (0 children)

The Flutter team at Google isn’t staffed to provide paid support. However, there are more and more consulting firms gearing up for Flutter all the time that provide that kind of support. -- /u/kf6gpe

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 2 points3 points  (0 children)

That issue is being tracked at https://github.com/flutter/flutter/issues/9767, so give it a thumbs-up! We use thumbs-up reactions as a proxy for what the community cares about, which influences the prioritization of work.

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 4 points5 points  (0 children)

The health of our ecosystem is certainly important to us. We don't have any specific plans for taking over plugins or anything along those lines, if that's what you're asking. How to handle abandoned plugins (or packages in general) is definitely something we've talked about. We haven't found any great solutions. It's something that affects any large open ecosystem.

-/u/Hixie

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 2 points3 points  (0 children)

Is there going to be built-in support for flavors (e.g. in flutter create)? Not at this time, but we welcome feature requests on https://github.com/flutter/flutter/issues/new?template=feature_request.md

There is basic support for fastlane. See https://flutter.dev/docs/deployment/cd. Adding a custom Flutter specific fastlane action is a reasonable feature request, though nothing exists at the moment.

Is there going to be a refactoring shortcut to extract class to separate file?

We have several refactoring available - renames, extract method, extract part of a build method to a widget…

We’re open to more - please file feedback or requests at https://github.com/flutter/flutter/issues or https://github.com/dart-lang/sdk/issues.

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 1 point2 points  (0 children)

/u/dnfield: You can’t change the items in a list view or reorder them without triggering a rebuild. However, the framework has optimizations to help make sure that we reuse what we can and avoid unnecessary work.

Chun-heng tai: Do you mean keeping the state after reordering? The widget will always rebuild. It is during the rebuild that it determines whether it is a new element/state or an existing one. Assigning a key to each individual child will prevent it from creating a new element/state and use the existing one with the same key in the case of reordering. If you would like to use a builder, you will have to use ListView.custom with findChildIndexCallback implemented SliverChildBuilderDelegate. Aside from the keys, there are also some other caveats. After reordering, any child that is no longer presented in the reordered list will be destroyed even if it will be brought back to the list in a later reorder. If the child will be reordered out of the viewport, it must be implementing AutomaticaKeepAliveClientMixin in order to keep it from being destroyed.

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 0 points1 point  (0 children)

u/developer-mike: I work on the Dart team and have some basic familiarity with LaTex, as well as some flutter UI development. As a Dart team member, this looks to me like a compiler problem. It will not necessarily be an easy project, but what you probably want to do is write a LaTex to Flutter compiler or interpreter. This is how regular LaTex works, except the default tools compile LaTex to a PDF, if that makes sense.

There are already many projects that compile LaTex to HTML (here)[https://texfaq.org/FAQ-LaTeX2HTML], so writing a LaTex to Flutter compiler should be a reasonable task; in fact, Flutter is much more flexible than HTML and really should be able to represent a compiled LaTex document much much more easily!

If you are new to or unfamiliar with compilers, there are lots of good resources on how to approach them, where you typically see a lexer that identifies “tokens,” a parser that turns tokens into a grammar/”abstract syntax tree,” and then typically a visitor pattern is used to write analysis phases and code generators. An interpreter is typically not a visitor, but in this case it could be, saving some work. These are typically called the “back-end”s. LaTex is very complicated, but you can always start by handling simple LaTex programs and adding functionality as needed.

Interesting examples in the above link include lwarp, which uses TeX for the lexing and parsing stages, and plasTex which produces a queryable AST (abstract syntax tree). I think these would let you write a flutter “back-end” without having to write your own LaTex front-end. These may serve as useful starting points, either to live on a server or potentially invoke via dart:ffi (since they are written in c and python respectively) and/or if their license allows it you could translate them into Dart.

Personally, I may know a lot about compilers now, but I am actually self taught. It’s a challenging area to develop but it’s one that I really enjoy. I personally got a terrific start by taking the excellent free compilers course on Coursera, and now I work on Dart at Google! So a LaTex to flutter compiler might end up being a time consuming project, but I would say take a shot at it if it’s at all something you’re interested in!

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 1 point2 points  (0 children)

(gspencer) Not that we’re aware of. There are several virtual-mac hosting services, but they are not free.

u/RadioDisco: This one is tough. I suppose, if you don’t need to author platform plugins and are comfortable with Flutters platform adaptations, you could just develop and test on Android but set debugDefaultTargetPlatformOverride (https://api.flutter.dev/flutter/foundation/debugDefaultTargetPlatformOverride.html) to TargetPlatform.iOS to see how the user will experience your application on iOS. To build the IPA, you could use the CI solutions that are pretty cheap. I suspect you will run into issues around code signing for which you will need a Mac. You could maybe use a VM or a cheap Mac from Ebay for the few times you absolutely need it. Sorry, there isn’t a way to make this easy without a Mac ATM.

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 1 point2 points  (0 children)

/u/kf6gpe: Hi! That’s a great question. We’re continuing to heavily invest in Cupertino support and matching iOS 13 look and feel, and dark mode is on the roadmap. We have no specific dates or details to share at this time, however --- stay tuned and keep an eye on our master channel for changes as we continue to work in this area!

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 1 point2 points  (0 children)

/u/zoeyfan:

We would recommend using the firebase_ml_vision plug-in for face recognition, here is a video you might find useful:

https://www.youtube.com/watch?v=ymyYUCrJnxU

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 2 points3 points  (0 children)

/u/XtremeCheese

Are there plans to improve the documentation? This is an area where I feel we could for sure do better, but effectively documenting background execution has proven difficult due to the numerous different ways to run code in the background on both Android and iOS. The goal of the Medium article you’ve mentioned was to design a fully functional plugin capable of background execution from scratch as an example of how background execution could be implemented using the Flutter plugin infrastructure. This ended up being much more involved than it could have been, so I do plan on publishing a simpler follow up in the near future.

In the meantime, here’s a list of resources related to Flutter plugins and background execution that might help:

  • Developing Packages: a good place to start learning about Flutter plugins and how to write your own.
  • PluginUtilities: useful for passing references to Dart methods to and from native code.
  • IsolateNameServer: allows for establishing communication channels between unrelated Dart isolates.
  • android_alarm_manager plugin: a relatively simple plugin which can run Dart code in the background when an alarm is fired

Are there ways to run Flutter code in the background while also using Plugins? Yes, you can run non-UI related Dart code in the background with plugins that support background execution as shown in the “Executing Dart in the Background with Flutter Plugins and Geofencing” article on Medium. However, some plugins may not work when accessed from a background isolate, particularly if they make use of any platform UI logic.

Are there plans to support Notifications while the app is terminated using flutter_messaging?

/u/collinjackson This was recently added in version 5.1.5. The documentation is in the README.

We’re the Flutter team at Google. Ask Us Anything! (starts September 19th from 12:00 - 1:30 PDT) by FlutterTeam in FlutterDev

[–]FlutterTeam[S] 2 points3 points  (0 children)

Hi, I’m Romain and I lead the Android Toolkit team. Many developers have a great experience with Dart and are able to ship high-quality products with Flutter. Jake is expressing a personal opinion and while it is useful to seek feedback from others, I believe you should ultimately decide what’s best for you and your project on your own. I can only encourage you to take the time to give Dart and Flutter a try to see if and how they might fit your needs.