mirror of
https://github.com/flutter/samples.git
synced 2026-07-11 11:32:11 +00:00
experimental/context_menus: Update analysis_options.yaml (#1579)
This commit is contained in:
@@ -6,9 +6,9 @@ import 'platform_selector.dart';
|
||||
|
||||
class ModifiedActionPage extends StatelessWidget {
|
||||
ModifiedActionPage({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.onChangedPlatform,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
static const String route = 'modified-action';
|
||||
static const String title = 'Modified Action';
|
||||
@@ -25,7 +25,7 @@ class ModifiedActionPage extends StatelessWidget {
|
||||
DialogRoute _showDialog(BuildContext context) {
|
||||
return DialogRoute<void>(
|
||||
context: context,
|
||||
builder: (BuildContext context) => const AlertDialog(
|
||||
builder: (context) => const AlertDialog(
|
||||
title: Text('Copied, but also showed this dialog.')),
|
||||
);
|
||||
}
|
||||
@@ -63,13 +63,13 @@ class ModifiedActionPage extends StatelessWidget {
|
||||
),
|
||||
TextField(
|
||||
controller: _controller,
|
||||
contextMenuBuilder: (BuildContext context,
|
||||
EditableTextState editableTextState) {
|
||||
contextMenuBuilder: (context,
|
||||
editableTextState) {
|
||||
final List<ContextMenuButtonItem> buttonItems =
|
||||
editableTextState.contextMenuButtonItems;
|
||||
// Modify the copy buttonItem to show a dialog after copying.
|
||||
final int copyButtonIndex = buttonItems.indexWhere(
|
||||
(ContextMenuButtonItem buttonItem) {
|
||||
(buttonItem) {
|
||||
return buttonItem.type == ContextMenuButtonType.copy;
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user