linter warning

This commit is contained in:
Evgeny Poberezkin 2021-10-08 21:12:22 +01:00
parent 17b4b62133
commit 7f88684d8c
6 changed files with 12 additions and 11 deletions

View File

@ -6,7 +6,7 @@ class Animator extends StatefulWidget {
final Widget child;
final Duration time;
const Animator(this.child, this.time);
const Animator(this.child, this.time, {Key? key}): super(key: key);
@override
_AnimatorState createState() => _AnimatorState();
@ -69,7 +69,7 @@ Duration wait() {
class WidgetAnimator extends StatelessWidget {
final Widget? child;
const WidgetAnimator({this.child});
const WidgetAnimator({this.child, Key? key}): super(key: key);
@override
Widget build(BuildContext context) {

View File

@ -51,7 +51,7 @@ class _AddContactViewState extends State<AddContactView> {
},
),
onPressed: () async {
_qrViewController?.toggleFlash();
await _qrViewController?.toggleFlash();
setState(() {});
},
),
@ -63,13 +63,13 @@ class _AddContactViewState extends State<AddContactView> {
},
),
onPressed: () async {
_qrViewController?.flipCamera();
await _qrViewController?.flipCamera();
setState(() {});
},
),
],
),
body: Container(
body: SizedBox(
height: MediaQuery.of(context).size.height,
child: Stack(
children: [
@ -107,7 +107,7 @@ class _AddContactViewState extends State<AddContactView> {
controller.scannedDataStream.listen((scanData) {
setState(() async {
result = scanData;
controller.pauseCamera();
await controller.pauseCamera();
if (result != null) {
await Navigator.push(
context,
@ -117,7 +117,7 @@ class _AddContactViewState extends State<AddContactView> {
),
),
);
controller.resumeCamera();
await controller.resumeCamera();
}
});
});

View File

@ -113,7 +113,7 @@ class _GroupDPState extends State<GroupDP> {
@override
Widget build(BuildContext context) {
return Container(
return SizedBox(
height: 180.0,
width: 180.0,
child: Stack(

View File

@ -63,7 +63,7 @@ class _HomeViewWidgetState extends State<HomeViewWidget> {
),
const SizedBox(height: 10.0),
!_haveConnections
? Container(
? SizedBox(
height: MediaQuery.of(context).size.height * 0.7,
child: Center(
child: Column(

View File

@ -133,7 +133,7 @@ class _UserProfilePicState extends State<UserProfilePic> {
@override
Widget build(BuildContext context) {
return Container(
return SizedBox(
height: 180.0,
width: 180.0,
child: Stack(

View File

@ -7,7 +7,8 @@ class CustomButton extends StatelessWidget {
@required this.onPressed,
@required this.color,
@required this.child,
});
Key? key
}): super(key: key);
final double? width;
final double? height;
final void Function()? onPressed;