Instances of `Dialog`, as well as `SimpleDialog`, `AlertDialog`, and `showTimePicker`, now have a default shape of a `RoundedRectangleBorder` with a `BorderRadius` of 4.0 pixels. This matches the current specifications of Material Design. Prior to this change, the default behavior for `Dialog.shape`'s `BorderRadius` was 2.0 pixels.
Original behavior
`Dialog`s and their associated subclasses (`SimpleDialog`, `AlertDialog`, and `showTimePicker`), appears slightly different as the border radius is larger. If you have master golden file images that have the prior rendering of the `Dialog` with a 2.0 pixel border radius, your widget tests will fail. These golden file images can be updated to reflect the new rendering, or you can update your code to maintain the original behavior.
New behavior
Not stated in the source.
- Who is affected
- Applications and packages relying on the previous behaviour or signature. Code that uses Dialog, SimpleDialog, AlertDialog and related APIs.
- Practical impact
- Behaviour or API differences that can break builds or change runtime behaviour.
- What action should I take?
- Follow the official migration guide below, update affected call sites, run `dart fix --apply` where a fix is available, then run your tests.
Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)
If you prefer to maintain the old shape, you can use
the shape property of your Dialog to specify the original 2 pixel radius.
Setting the Dialog shape to the original radius:
import 'package:material_ui/material_ui.dart';
void main() => runApp(Foo());
class Foo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton: FloatingActionButton(onPressed: () {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
content: Text('Alert!'),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(2))),
);
},
);
}),
),
);
}
}If you prefer the new behavior and have failing golden file tests, you can update your master golden files using this command:
flutter test --update-goldensAI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.Listed in the official breaking-changes index (docs.flutter.dev/release/breaking-changes).
An official announcement or migration guide documents an intended behaviour or API change. A verified source change (git diff) shows code changed but does not by itself prove a public API is breaking. AI interpretations are labelled and never used to classify a change.
- Source commit
- b3045439b7c0
- Source last updated
- Oct 21, 2026
- Last synchronized
- Oct 21, 2026
- Publication status
- published
Publication history
- Oct 21, 2026, 8:31 PM: new → published (ingestion) — Backed by an official breaking-change/migration guide.
AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.