From 30faefcc850208664f0ef058b4dd6921eae24e28 Mon Sep 17 00:00:00 2001 From: PiTrem Date: Thu, 20 Jun 2024 17:36:55 +0200 Subject: [PATCH] chore: dart fix --- lib/screens/init_screen.dart | 4 ++-- lib/screens/login_screen.dart | 4 ++-- lib/screens/menu_screen.dart | 5 ++--- lib/screens/sample_tasks_screen.dart | 4 ++-- lib/screens/scan_screen.dart | 2 +- lib/screens/user_switcher_screen.dart | 4 ++-- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/screens/init_screen.dart b/lib/screens/init_screen.dart index 8de49ab..a4fd8ef 100644 --- a/lib/screens/init_screen.dart +++ b/lib/screens/init_screen.dart @@ -21,9 +21,9 @@ class _InitScreenState extends State { return Scaffold( body: Container( padding: const EdgeInsets.all(8.0), - child: Column( + child: const Column( crossAxisAlignment: CrossAxisAlignment.start, - children: const [ + children: [ Text('Init app...'), ], ), diff --git a/lib/screens/login_screen.dart b/lib/screens/login_screen.dart index 92f01c0..fd7da50 100644 --- a/lib/screens/login_screen.dart +++ b/lib/screens/login_screen.dart @@ -19,9 +19,9 @@ class _LoginScreenState extends State { ), body: Container( padding: const EdgeInsets.all(16.0), - child: Column( + child: const Column( crossAxisAlignment: CrossAxisAlignment.start, - children: const [ + children: [ LoginForm(), ], ), diff --git a/lib/screens/menu_screen.dart b/lib/screens/menu_screen.dart index db09000..fbd9cee 100644 --- a/lib/screens/menu_screen.dart +++ b/lib/screens/menu_screen.dart @@ -11,7 +11,6 @@ import 'package:chemobile/screens/scan_screen.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import '../helpers/dev_print.dart'; class MenuScreen extends StatefulWidget { const MenuScreen({Key? key}) : super(key: key); @@ -102,9 +101,9 @@ class _MenuScreenState extends State { } Widget doubleScanIcon() { - return Row( + return const Row( mainAxisAlignment: MainAxisAlignment.center, - children: const [Icon(Icons.science), Icon(Icons.science)], + children: [Icon(Icons.science), Icon(Icons.science)], ); } diff --git a/lib/screens/sample_tasks_screen.dart b/lib/screens/sample_tasks_screen.dart index 48e18c0..52565cb 100644 --- a/lib/screens/sample_tasks_screen.dart +++ b/lib/screens/sample_tasks_screen.dart @@ -75,9 +75,9 @@ class _SampleTasksScreenState extends State { } Widget doubleScanIcon() { - return Row( + return const Row( mainAxisAlignment: MainAxisAlignment.center, - children: const [Icon(Icons.science), Icon(Icons.science)], + children: [Icon(Icons.science), Icon(Icons.science)], ); } diff --git a/lib/screens/scan_screen.dart b/lib/screens/scan_screen.dart index af26224..bb1d74b 100644 --- a/lib/screens/scan_screen.dart +++ b/lib/screens/scan_screen.dart @@ -83,7 +83,7 @@ class _ScanScreenState extends State { String fallback = getCurrentUser(context).fullName; SampleTask? currentTask = _sampleTasksCubit(context).currentSampleTask; - if (currentTask != null && currentTask!.targetAmountValue != null) { + if (currentTask != null && currentTask.targetAmountValue != null) { return "Target amount value: ${currentTask.targetAmountValue} ${currentTask.targetAmountUnit}"; } else { return fallback; diff --git a/lib/screens/user_switcher_screen.dart b/lib/screens/user_switcher_screen.dart index 82b7c51..c3f5b6f 100644 --- a/lib/screens/user_switcher_screen.dart +++ b/lib/screens/user_switcher_screen.dart @@ -27,9 +27,9 @@ class UserSwitcherScreen extends StatelessWidget { ), body: Container( padding: const EdgeInsets.all(16.0), - child: Column( + child: const Column( crossAxisAlignment: CrossAxisAlignment.start, - children: const [ + children: [ UserSwitcher(), ], ),