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

@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flutter code sample for [LogicalKeyboardKey].
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
/// Flutter code sample for [LogicalKeyboardKey].
void main() => runApp(const KeyExampleApp());
class KeyExampleApp extends StatelessWidget {

View File

@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flutter code sample for [PhysicalKeyboardKey].
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
/// Flutter code sample for [PhysicalKeyboardKey].
void main() => runApp(const KeyExampleApp());
class KeyExampleApp extends StatelessWidget {

View File

@@ -2,31 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flutter code sample for [MouseCursor].
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
/// Flutter code sample for [MouseCursor].
class MyApp extends StatelessWidget {
const MyApp({super.key});
void main() => runApp(const MouseCursorExampleApp());
static const String _title = 'MouseCursor Code Sample';
class MouseCursorExampleApp extends StatelessWidget {
const MouseCursorExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: const MyStatelessWidget(),
appBar: AppBar(title: const Text('MouseCursor Code Sample')),
body: const MouseCursorExample(),
),
);
}
}
class MyStatelessWidget extends StatelessWidget {
const MyStatelessWidget({super.key});
class MouseCursorExample extends StatelessWidget {
const MouseCursorExample({super.key});
@override
Widget build(BuildContext context) {

View File

@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flutter code sample for [AppBar.systemOverlayStyle].
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
/// Flutter code sample for [AppBar.systemOverlayStyle].
void main() => runApp(const SystemOverlayStyleApp());
class SystemOverlayStyleApp extends StatelessWidget {

View File

@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flutter code sample for setting the [SystemUiOverlayStyle] with an [AnnotatedRegion].
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
/// Flutter code sample for setting the [SystemUiOverlayStyle] with an [AnnotatedRegion].
void main() => runApp(const SystemOverlayStyleApp());
class SystemOverlayStyleApp extends StatelessWidget {

View File

@@ -2,33 +2,33 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flutter code sample for TextInputControl
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() => runApp(const MyApp());
/// Flutter code sample for [TextInputControl].
class MyApp extends StatelessWidget {
const MyApp({super.key});
void main() => runApp(const TextInputControlExampleApp());
class TextInputControlExampleApp extends StatelessWidget {
const TextInputControlExampleApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: MyStatefulWidget(),
);
home: TextInputControlExample(),
);
}
}
class MyStatefulWidget extends StatefulWidget {
const MyStatefulWidget({super.key});
class TextInputControlExample extends StatefulWidget {
const TextInputControlExample({super.key});
@override
MyStatefulWidgetState createState() => MyStatefulWidgetState();
}
class MyStatefulWidgetState extends State<MyStatefulWidget> {
class MyStatefulWidgetState extends State<TextInputControlExample> {
final TextEditingController _controller = TextEditingController();
final FocusNode _focusNode = FocusNode();