Flutter Flash News (10/2024)

Flutter

Flutter

Flutter

The Halloween edition of Flutter Flash news is here, but don’t be afraid. We have a survival guide on dealing with all the pesky boogeymen haunting our favorite framework – like unbounded height and uneven performance.

Oct 21, 2024

Customizable line length for dart format 🤩

The customization that most Flutter developers have been waiting for is finally here––the Dart team will enable customizable line length. The default 80 will probably remain, but having custom lengths won't be a problem either. We prefer 120, probably like most devs.

Or is there a new favorite in town?

https://github.com

Unquoted Imports implementation

The Dart team has started working on yet another feature: Issue #56614

It seems like imports won’t have to be written with quotes anymore. As the old and internet-tested saying implies, "It ain't much, but it's honest work." This seemingly small change brings quite a lot of benefits.

Further, it probably won’t be necessary to import using package prefixes anymore. Say goodbye to "package:path/path.dart" –– import path will be enough.

Hopefully, we'll soon see it in action.

// Before:
import 'dart:isolate';
import 'package:flutter_test/flutter_test.dart';
import 'package:path/path.dart';
import 'package:flutter/material.dart';
import 'package:analyzer/dart/ast/visitor/visitor.dart';
import 'package:widget.tla.server/server.dart';
import 'package:widget.tla.proto/client/component.dart';

// After:
import dart/isolate;
import flutter_test;
import path;
import flutter/material;
import analyzer/dart/ast/visitor/visitor;
import widget.tla.server;
import widget.tla.proto/client/component;

We need your votes 🫵

I mean, kind of.

Not us per se, but rather a feature that’s been critically missing from the Network tab in DevTools. The Network tab can’t search the response tab. 🤯

If you’re as agitated by it as we are, upvote it, and maybe we’ll see a solution soon!

https://github.com/flutter/devtools/issues/7624

Is your app performance up to snuff?

Let’s rewind to our last Flutter Prague Meetup.

It was a pleasure hosting the great Eric Seidel and listening to his deep dive into Shorebird, as was observing the thrilling talk on AI models running locally in Flutter apps. Finally, Piotr Sadlowski illustrated the trials and tribulations of Flutter app performance.

If you couldn’t attend, worry not.

We can’t conjure up the same atmosphere, but we’ve compiled all the slides for you:

https://drive.google.com/drive/folders/1ycxxomUpoSbKUvPTy0iU7t18ot8rgd_x?usp=sharing

Constraints go down, sizes go up….

We love organizing quizzes at our Meetups. Do you know the basic lesson of the Flutter layout algorithm?

And on that note – why you sometimes get the notorious "Unbounded height" error? Everyone has encountered it and will encounter it many times. Likewise, we think it's helpful to understand this error and learn how to fix it correctly. Therefore, we highly recommend the official documentation article: https://docs.flutter.dev/.

Then follow up with this: https://docs.flutter.dev.

And if you fancy a good YouTube tutorial, we can always recommend Filip Hráček’s great explanation, spiced up by his singular sense of humor:

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

That’s all folks – see you in November! 👋

You might also like

You might also like

You might also like