Final chapter: migrate api doc samples to super-parameters (#104007)
This commit is contained in:
committed by
GitHub
parent
7fdf747723
commit
2cbad4b3ae
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -28,7 +28,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
const MyStatelessWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -26,7 +26,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
const MyStatelessWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -26,7 +26,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
const MyStatelessWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -26,7 +26,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
const MyStatelessWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const ClipRRectApp());
|
||||
|
||||
class ClipRRectApp extends StatelessWidget {
|
||||
const ClipRRectApp({Key? key}) : super(key: key);
|
||||
const ClipRRectApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -23,7 +23,7 @@ class ClipRRectApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ClipRRectExample extends StatelessWidget {
|
||||
const ClipRRectExample({Key? key}) : super(key: key);
|
||||
const ClipRRectExample({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const ClipRRectApp());
|
||||
|
||||
class ClipRRectApp extends StatelessWidget {
|
||||
const ClipRRectApp({Key? key}) : super(key: key);
|
||||
const ClipRRectApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -23,7 +23,7 @@ class ClipRRectApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ClipRRectExample extends StatelessWidget {
|
||||
const ClipRRectExample({Key? key}) : super(key: key);
|
||||
const ClipRRectExample({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -49,7 +49,7 @@ class ClipRRectExample extends StatelessWidget {
|
||||
// 'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl.jpg'),
|
||||
// );
|
||||
class _FakedImage extends StatelessWidget {
|
||||
const _FakedImage({Key? key}) : super(key: key);
|
||||
const _FakedImage();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const ExampleApp());
|
||||
|
||||
class ExampleApp extends StatelessWidget {
|
||||
const ExampleApp({Key? key}) : super(key: key);
|
||||
const ExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -87,7 +87,7 @@ class _CascadeLayoutDelegate extends MultiChildLayoutDelegate {
|
||||
}
|
||||
|
||||
class ExampleWidget extends StatelessWidget {
|
||||
const ExampleWidget({Key? key}) : super(key: key);
|
||||
const ExampleWidget({super.key});
|
||||
|
||||
static const Map<String, Color> _colors = <String, Color>{
|
||||
'Red': Colors.red,
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -23,7 +23,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
const MyStatelessWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -23,7 +23,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
const MyStatelessWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -28,7 +28,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
const MyStatelessWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const FlowApp());
|
||||
|
||||
class FlowApp extends StatelessWidget {
|
||||
const FlowApp({Key? key}) : super(key: key);
|
||||
const FlowApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -25,7 +25,7 @@ class FlowApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class FlowMenu extends StatefulWidget {
|
||||
const FlowMenu({Key? key}) : super(key: key);
|
||||
const FlowMenu({super.key});
|
||||
|
||||
@override
|
||||
State<FlowMenu> createState() => _FlowMenuState();
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -26,7 +26,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
const MyStatelessWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -23,7 +23,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({Key? key}) : super(key: key);
|
||||
const MyStatefulWidget({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -28,7 +28,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({Key? key}) : super(key: key);
|
||||
const MyStatefulWidget({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -28,7 +28,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({Key? key}) : super(key: key);
|
||||
const MyStatefulWidget({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -28,7 +28,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({Key? key}) : super(key: key);
|
||||
const MyStatefulWidget({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -30,8 +30,7 @@ class MyApp extends StatelessWidget {
|
||||
// A region that hides its content one second after being hovered.
|
||||
class MyTimedButton extends StatefulWidget {
|
||||
const MyTimedButton(
|
||||
{Key? key, required this.onEnterButton, required this.onExitButton})
|
||||
: super(key: key);
|
||||
{super.key, required this.onEnterButton, required this.onExitButton});
|
||||
|
||||
final VoidCallback onEnterButton;
|
||||
final VoidCallback onExitButton;
|
||||
@@ -89,7 +88,7 @@ class _MyTimedButton extends State<MyTimedButton> {
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({Key? key}) : super(key: key);
|
||||
const MyStatefulWidget({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -28,7 +28,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({Key? key}) : super(key: key);
|
||||
const MyStatefulWidget({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
|
||||
@@ -23,7 +23,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
const MyStatelessWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user