better linting

This commit is contained in:
Mguy13 2023-01-01 13:04:22 +01:00
parent c7324a6b19
commit aa31a79d20
26 changed files with 163 additions and 131 deletions

View file

@ -1,8 +1,12 @@
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
/// Const evenly-sized gap.
class Gap extends LeafRenderObjectWidget {
const Gap(this.size, {Key? key}) : super(key: key);
const Gap(
this.size, {
super.key,
});
final double size;
@ -58,13 +62,14 @@ class RenderGap extends RenderBox {
}
}
/// Animates [Gap] insertion.
class AnimatedGap extends StatefulWidget {
const AnimatedGap(
this.gap, {
Key? key,
this.duration = const Duration(milliseconds: 200),
this.curve = Curves.easeInOut,
}) : super(key: key);
super.key,
});
final Duration duration;
final double gap;
@ -107,10 +112,10 @@ class _AnimatedGapState extends State<AnimatedGap> with SingleTickerProviderStat
class AnimatedSliverGap extends StatefulWidget {
const AnimatedSliverGap(
this.gap, {
Key? key,
this.duration = const Duration(milliseconds: 200),
this.curve = Curves.easeInOut,
}) : super(key: key);
super.key,
});
final Duration duration;
final double gap;

View file

@ -8,10 +8,13 @@ class MultiValueListenableBuilder extends StatelessWidget {
required this.builder,
this.child,
super.key,
}) : assert(valueListenables.length != 0);
}) : assert(
valueListenables.length != 0,
'Attached valueListenables must not be empty',
);
/// List of [ValueListenable]s to be listened to.
final List<ValueListenable> valueListenables;
final List<ValueListenable<dynamic>> valueListenables;
/// The builder function to be called when value of any of the [ValueListenable] changes.
/// The order of values list will be same as [valueListenables] list.