Rename Sample classes (#124080)

Rename Sample classes
This commit is contained in:
Greg Spencer
2023-04-04 13:34:29 -07:00
committed by GitHub
parent c8a3dbaf06
commit e3bc8efd39
480 changed files with 3125 additions and 3816 deletions

View File

@@ -9,25 +9,24 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() => runApp(const MyApp());
void main() => runApp(const ContextMenuControllerExampleApp());
/// A builder that includes an Offset to draw the context menu at.
typedef ContextMenuBuilder = Widget Function(BuildContext context, Offset offset);
class MyApp extends StatefulWidget {
const MyApp({super.key});
class ContextMenuControllerExampleApp extends StatefulWidget {
const ContextMenuControllerExampleApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
State<ContextMenuControllerExampleApp> createState() => _ContextMenuControllerExampleAppState();
}
class _MyAppState extends State<MyApp> {
void _showDialog (BuildContext context) {
class _ContextMenuControllerExampleAppState extends State<ContextMenuControllerExampleApp> {
void _showDialog(BuildContext context) {
Navigator.of(context).push(
DialogRoute<void>(
context: context,
builder: (BuildContext context) =>
const AlertDialog(title: Text('You clicked print!')),
builder: (BuildContext context) => const AlertDialog(title: Text('You clicked print!')),
),
);
}
@@ -82,7 +81,8 @@ class _MyAppState extends State<MyApp> {
child: ListView(
children: <Widget>[
Container(height: 20.0),
const Text('Right click (desktop) or long press (mobile) anywhere, not just on this text, to show the custom menu.'),
const Text(
'Right click (desktop) or long press (mobile) anywhere, not just on this text, to show the custom menu.'),
],
),
),