Skip to content

Commit 90be9bc

Browse files
authored
Update Card diagram to replace deprecated ButtonBar (#248)
fixes [Migrate ButtonBar use in assets-for-api-docs/packages/diagrams/lib/src/card.dart](flutter/flutter#148709)
1 parent 10af350 commit 90be9bc

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

assets/material/card.png

4.46 KB
Loading

packages/diagrams/lib/src/card.dart

+17-13
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import 'package:flutter/material.dart';
88

99
import 'diagram_step.dart';
1010

11-
// ignore_for_file: deprecated_member_use, https://github.com/flutter/flutter/issues/148709
12-
1311
class CardDiagram extends StatelessWidget with DiagramMetadata {
1412
const CardDiagram({super.key});
1513

@@ -35,17 +33,23 @@ class CardDiagram extends StatelessWidget with DiagramMetadata {
3533
title: Text('The Enchanted Nightingale'),
3634
subtitle: Text('Music by Julie Gable. Lyrics by Sidney Stein.'),
3735
),
38-
ButtonBar(
39-
children: <Widget>[
40-
TextButton(
41-
child: const Text('BUY TICKETS'),
42-
onPressed: () {},
43-
),
44-
TextButton(
45-
child: const Text('LISTEN'),
46-
onPressed: () {},
47-
),
48-
],
36+
Padding(
37+
padding: const EdgeInsets.symmetric(horizontal: 8.0),
38+
child: OverflowBar(
39+
alignment: MainAxisAlignment.end,
40+
spacing: 8.0,
41+
overflowSpacing: 8.0,
42+
children: <Widget>[
43+
TextButton(
44+
child: const Text('BUY TICKETS'),
45+
onPressed: () {},
46+
),
47+
TextButton(
48+
child: const Text('LISTEN'),
49+
onPressed: () {},
50+
),
51+
],
52+
),
4953
),
5054
],
5155
),

0 commit comments

Comments
 (0)