mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
Add use_super_parameters lint (#1269)
This commit is contained in:
@@ -6,7 +6,7 @@ import 'package:particle_background/simple_animations_package.dart';
|
||||
void main() => runApp(const ParticleApp());
|
||||
|
||||
class ParticleApp extends StatelessWidget {
|
||||
const ParticleApp({Key? key}) : super(key: key);
|
||||
const ParticleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -19,7 +19,7 @@ class ParticleApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ParticleBackgroundPage extends StatelessWidget {
|
||||
const ParticleBackgroundPage({Key? key}) : super(key: key);
|
||||
const ParticleBackgroundPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -36,7 +36,7 @@ class ParticleBackgroundPage extends StatelessWidget {
|
||||
class Particles extends StatefulWidget {
|
||||
final int numberOfParticles;
|
||||
|
||||
const Particles(this.numberOfParticles, {key}) : super(key: key);
|
||||
const Particles(this.numberOfParticles, {super.key});
|
||||
|
||||
@override
|
||||
State<Particles> createState() => _ParticlesState();
|
||||
@@ -133,7 +133,7 @@ class ParticlePainter extends CustomPainter {
|
||||
}
|
||||
|
||||
class AnimatedBackground extends StatelessWidget {
|
||||
const AnimatedBackground({Key? key}) : super(key: key);
|
||||
const AnimatedBackground({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -165,8 +165,8 @@ class AnimatedBackground extends StatelessWidget {
|
||||
|
||||
class CenteredText extends StatelessWidget {
|
||||
const CenteredText({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -32,8 +32,7 @@ class Rendering extends StatefulWidget {
|
||||
this.onTick,
|
||||
this.startTime = Duration.zero,
|
||||
this.startTimeSimulationTicks = 20,
|
||||
Key? key})
|
||||
: super(key: key);
|
||||
super.key});
|
||||
|
||||
@override
|
||||
State<Rendering> createState() => _RenderingState();
|
||||
@@ -323,7 +322,7 @@ class ControlledAnimation<T> extends StatefulWidget {
|
||||
this.child,
|
||||
this.animationControllerStatusListener,
|
||||
this.startPosition = 0.0,
|
||||
Key? key})
|
||||
super.key})
|
||||
: assert(
|
||||
(builderWithChild != null && child != null && builder == null) ||
|
||||
(builder != null && builderWithChild == null && child == null),
|
||||
@@ -332,8 +331,7 @@ class ControlledAnimation<T> extends StatefulWidget {
|
||||
assert(
|
||||
startPosition >= 0 && startPosition <= 1,
|
||||
"The property startPosition "
|
||||
"must have a value between 0.0 and 1.0."),
|
||||
super(key: key);
|
||||
"must have a value between 0.0 and 1.0.");
|
||||
|
||||
@override
|
||||
State<ControlledAnimation> createState() => _ControlledAnimationState<T>();
|
||||
|
||||
Reference in New Issue
Block a user