From e7ebc2071f5009beab5fa73ae5009d52839828f6 Mon Sep 17 00:00:00 2001 From: Taha Tesser Date: Tue, 31 Oct 2023 18:21:50 +0200 Subject: [PATCH] [video_player] Update example app to replace `ButtonBar` with `OverflowBar` (#5274) This PR replaces `ButtonBar` with `OverflowBar` in `video_player/example` in preparation of `ButtonBar` deprecation. Related to https://github.com/flutter/flutter/issues/127955 --- .../video_player/video_player/CHANGELOG.md | 4 +++ .../video_player/example/lib/main.dart | 35 +++++++++++-------- .../video_player/video_player/pubspec.yaml | 2 +- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/packages/video_player/video_player/CHANGELOG.md b/packages/video_player/video_player/CHANGELOG.md index 35e24f3550..690b041661 100644 --- a/packages/video_player/video_player/CHANGELOG.md +++ b/packages/video_player/video_player/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.8.1 + +* Updates the example app: replaces `ButtonBar` with `OverflowBar` widget. + ## 2.8.0 * Adds support for macOS. diff --git a/packages/video_player/video_player/example/lib/main.dart b/packages/video_player/video_player/example/lib/main.dart index 2691fc2ea5..7fdd5ae28c 100644 --- a/packages/video_player/video_player/example/lib/main.dart +++ b/packages/video_player/video_player/example/lib/main.dart @@ -121,21 +121,26 @@ class _ExampleCard extends StatelessWidget { leading: const Icon(Icons.airline_seat_flat_angled), title: Text(title), ), - ButtonBar( - children: [ - TextButton( - child: const Text('BUY TICKETS'), - onPressed: () { - /* ... */ - }, - ), - TextButton( - child: const Text('SELL TICKETS'), - onPressed: () { - /* ... */ - }, - ), - ], + Padding( + padding: const EdgeInsets.all(8.0), + child: OverflowBar( + alignment: MainAxisAlignment.end, + spacing: 8.0, + children: [ + TextButton( + child: const Text('BUY TICKETS'), + onPressed: () { + /* ... */ + }, + ), + TextButton( + child: const Text('SELL TICKETS'), + onPressed: () { + /* ... */ + }, + ), + ], + ), ), ], ), diff --git a/packages/video_player/video_player/pubspec.yaml b/packages/video_player/video_player/pubspec.yaml index 36fdb39835..7eab2ac6cd 100644 --- a/packages/video_player/video_player/pubspec.yaml +++ b/packages/video_player/video_player/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for displaying inline video with other Flutter widgets on Android, iOS, and web. repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.8.0 +version: 2.8.1 environment: sdk: ">=3.1.0 <4.0.0"