Pascal Welsch Profile picture
19 Feb, 10 tweets, 3 min read
Here are the solutions to my hard/unfair #FlutterDev interview questions:
⬇️ Thread
❓ What's the performance difference between stateful and stateless widget?

None. StatefulWidget is just syntax sugar. StatelessWidget also has an Element (state) but it's harder to access. Read more:
❓ What can and what can't be transferred as message between Isolates?

Any primitive data (null, num, bool, double, String), Instances of SendPort, lists and maps.
Callbacks, Futures aren't allowed because they aren't serializable.

api.dart.dev/stable/2.10.5/…
❓ What is a Zone?

Every dart code runs in a Zone. It connects the code to the underlying system. It handles async code, allows scheduling of microtasks and timers. And makes sure apps don't crash by catching errors.
All that behavior can be overridden, which is interesting.
❓ How do you cancel a Future?

You can't. You can only prevent a Future from returning any value by wrapping it in a CancelableOperation. Once cancel() is called the execution stops eventually and might complete entirely.
pub.dev/documentation/…
❓ How do you call js from dart?

Assuming the dart code is compiled to js, dart:js is the solution. It's straightforward to use, but not typesafe in any way.
api.dart.dev/stable/2.10.5/…
❓ How do you test code using DateTime#now()

Use the clock package together with fake_async.
Replace DateTime#now() with clock#now() returning a time that can be adjusted with fakeAsync in milliseconds.

fakeAsync.elapse(new Duration(seconds: 10));

pub.dev/packages/clock
Please don't feel stupid when you can't answer any of those questions. They are very specific and you might never run into cases where this knowledge is useful.
Topics you should really prepare for I might aks in your #FlutterDev interviews are:
- What does setState?
- Have you ever written unit tests?
- Why do you prefer Flutter over Android/RN/web
- Do you have experience writing plugins?
- Have you worked on open-source projects?
Contact me if you're interested in practicing your interview or you want to apply for a position at @phntmxyz 😉

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Pascal Welsch

Pascal Welsch Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @passsy

31 Oct 16
Not impressed by @flutterio. It’s a huge abstraction of the platform it runs in without a good way to build background services.
@flutterio It could replace a website with a fast responsive app but is nothing more than UI. Interactions with other apps are very hard
@flutterio It’s build on top of #dartlang which isn’t the worst thing but compared to #kotlin it’s far behind in terms of language features
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!