1
0
mirror of https://github.com/flutter/samples.git synced 2026-06-05 13:59:35 +00:00

Flutter 3.29 beta (#2571)

This commit is contained in:
Eric Windmill
2025-02-12 18:08:01 -05:00
committed by GitHub
parent d62c784789
commit 719fd72c38
685 changed files with 76244 additions and 53721 deletions

View File

@@ -6,10 +6,7 @@ import 'context_menu_region.dart';
import 'platform_selector.dart';
class ImagePage extends StatelessWidget {
const ImagePage({
super.key,
required this.onChangedPlatform,
});
const ImagePage({super.key, required this.onChangedPlatform});
static const String route = 'image';
static const String title = 'ContextMenu on an Image';
@@ -22,8 +19,10 @@ class ImagePage extends StatelessWidget {
DialogRoute _showDialog(BuildContext context) {
return DialogRoute<void>(
context: context,
builder: (context) =>
const AlertDialog(title: Text('Image saved! (not really though)')),
builder:
(context) => const AlertDialog(
title: Text('Image saved! (not really though)'),
),
);
}
@@ -33,9 +32,7 @@ class ImagePage extends StatelessWidget {
appBar: AppBar(
title: const Text(ImagePage.title),
actions: <Widget>[
PlatformSelector(
onChangedPlatform: onChangedPlatform,
),
PlatformSelector(onChangedPlatform: onChangedPlatform),
IconButton(
icon: const Icon(Icons.code),
onPressed: () async {
@@ -52,9 +49,7 @@ class ImagePage extends StatelessWidget {
ContextMenuRegion(
contextMenuBuilder: (context, offset) {
return AdaptiveTextSelectionToolbar.buttonItems(
anchors: TextSelectionToolbarAnchors(
primaryAnchor: offset,
),
anchors: TextSelectionToolbarAnchors(primaryAnchor: offset),
buttonItems: <ContextMenuButtonItem>[
ContextMenuButtonItem(
onPressed: () {