aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/data/data_providers/app_config_provider.dart50
-rw-r--r--lib/data/data_providers/app_launcher.dart24
-rw-r--r--lib/data/data_providers/app_provider.dart1
-rw-r--r--lib/data/data_providers/audio_notifier.dart4
-rw-r--r--lib/data/data_providers/mediaplayer_notifier.dart4
-rw-r--r--lib/data/data_providers/radio_client.dart18
-rw-r--r--lib/data/data_providers/radio_notifier.dart2
-rw-r--r--lib/data/data_providers/units_notifier.dart2
-rw-r--r--lib/data/data_providers/val_client.dart14
-rw-r--r--lib/data/data_providers/vehicle_notifier.dart12
-rw-r--r--lib/data/models/audio_state.dart2
-rw-r--r--lib/data/models/radio_state.dart2
-rw-r--r--lib/presentation/common_widget/volume_and_fan_control.dart2
-rw-r--r--lib/presentation/custom_icons/custom_icons.dart1
-rw-r--r--lib/presentation/screens/dashboard/widgets/car_status.dart6
-rw-r--r--lib/presentation/screens/dashboard/widgets/dashboard_content.dart5
-rw-r--r--lib/presentation/screens/home/home_ci.dart6
-rw-r--r--lib/presentation/screens/home/widgets/custom_tile.dart4
-rw-r--r--lib/presentation/screens/hvac/hvac_content.dart2
-rw-r--r--lib/presentation/screens/media/media_player.dart2
-rw-r--r--lib/presentation/screens/media/media_player_controls.dart2
-rw-r--r--lib/presentation/screens/media/play_list_table.dart4
-rw-r--r--lib/presentation/screens/media/radio_player_controls.dart2
-rw-r--r--lib/presentation/screens/media/radio_preset_table.dart2
-rw-r--r--lib/presentation/screens/media/widgets/gradient_progress_indicator.dart5
-rw-r--r--lib/presentation/screens/settings/settings_screens/audio_settings/widget/slider_widgets.dart1
-rw-r--r--lib/presentation/screens/settings/settings_screens/units/units_screen.dart4
-rw-r--r--lib/presentation/screens/settings/widgets/settings_list_tile.dart6
28 files changed, 93 insertions, 96 deletions
diff --git a/lib/data/data_providers/app_config_provider.dart b/lib/data/data_providers/app_config_provider.dart
index 7ec8d8a..6a4ea02 100644
--- a/lib/data/data_providers/app_config_provider.dart
+++ b/lib/data/data_providers/app_config_provider.dart
@@ -8,9 +8,9 @@ class KuksaConfig {
final String hostname;
final int port;
final String authorization;
- final bool use_tls;
- final List<int> ca_certificate;
- final String tls_server_name;
+ final bool useTls;
+ final List<int> caCertificate;
+ final String tlsServerName;
static String defaultHostname = 'localhost';
static int defaultPort = 55555;
@@ -20,18 +20,18 @@ class KuksaConfig {
{required this.hostname,
required this.port,
required this.authorization,
- required this.use_tls,
- required this.ca_certificate,
- required this.tls_server_name});
+ required this.useTls,
+ required this.caCertificate,
+ required this.tlsServerName});
static KuksaConfig defaultConfig() {
return KuksaConfig(
hostname: KuksaConfig.defaultHostname,
port: KuksaConfig.defaultPort,
authorization: "",
- use_tls: false,
- ca_certificate: [],
- tls_server_name: "");
+ useTls: false,
+ caCertificate: [],
+ tlsServerName: "");
}
}
@@ -120,38 +120,38 @@ class AppConfig {
}
//debugPrint("authorization = $token");
- bool use_tls = false;
+ bool useTls = false;
if (kuksaMap.containsKey('use-tls')) {
var value = kuksaMap['use-tls'];
- if (value is bool) use_tls = value;
+ if (value is bool) useTls = value;
}
//debugPrint("Use TLS = $use_tls");
- List<int> ca_cert = [];
- String ca_path = KuksaConfig.defaultCaCertPath;
+ List<int> caCert = [];
+ String caPath = KuksaConfig.defaultCaCertPath;
if (kuksaMap.containsKey('ca-certificate')) {
- ca_path = kuksaMap['ca-certificate'];
+ caPath = kuksaMap['ca-certificate'];
}
try {
- ca_cert = File(ca_path).readAsBytesSync();
+ caCert = File(caPath).readAsBytesSync();
} catch (_) {
- print("ERROR: Could not read CA certificate file $ca_path");
- ca_cert = [];
+ print("ERROR: Could not read CA certificate file $caPath");
+ caCert = [];
}
//debugPrint("CA cert = $ca_cert");
- String tls_server_name = "";
+ String tlsServerName = "";
if (kuksaMap.containsKey('tls-server-name')) {
- tls_server_name = kuksaMap['tls-server-name'];
+ tlsServerName = kuksaMap['tls-server-name'];
}
return KuksaConfig(
hostname: hostname,
port: port,
authorization: token,
- use_tls: use_tls,
- ca_certificate: ca_cert,
- tls_server_name: tls_server_name);
+ useTls: useTls,
+ caCertificate: caCert,
+ tlsServerName: tlsServerName);
} catch (_) {
debugPrint("Invalid KUKSA.val configuration, using defaults");
return KuksaConfig.defaultConfig();
@@ -217,9 +217,9 @@ final appConfigProvider = Provider((ref) {
hostname: KuksaConfig.defaultHostname,
port: KuksaConfig.defaultPort,
authorization: "",
- use_tls: false,
- ca_certificate: [],
- tls_server_name: "");
+ useTls: false,
+ caCertificate: [],
+ tlsServerName: "");
}
RadioConfig radioConfig;
diff --git a/lib/data/data_providers/app_launcher.dart b/lib/data/data_providers/app_launcher.dart
index 8762643..917dd21 100644
--- a/lib/data/data_providers/app_launcher.dart
+++ b/lib/data/data_providers/app_launcher.dart
@@ -1,6 +1,6 @@
import 'package:flutter_ics_homescreen/export.dart';
-import 'package:protos/applauncher-api.dart';
-import 'package:protos/agl-shell-api.dart';
+import 'package:protos/applauncher_api.dart';
+import 'package:protos/agl_shell_api.dart';
class AppLauncher {
final Ref ref;
@@ -15,13 +15,13 @@ class AppLauncher {
AppLauncher({required this.ref}) {
aglShellChannel = ClientChannel('localhost',
port: 14005,
- options: ChannelOptions(credentials: ChannelCredentials.insecure()));
+ options: const ChannelOptions(credentials: ChannelCredentials.insecure()));
aglShell = AglShellManagerServiceClient(aglShellChannel);
appLauncherChannel = ClientChannel('localhost',
port: 50052,
- options: ChannelOptions(credentials: ChannelCredentials.insecure()));
+ options: const ChannelOptions(credentials: ChannelCredentials.insecure()));
appLauncher = AppLauncherClient(appLauncherChannel);
}
@@ -32,14 +32,14 @@ class AppLauncher {
var response = appLauncher.getStatusEvents(StatusRequest());
await for (var event in response) {
if (event.hasApp()) {
- AppStatus app_status = event.app;
+ AppStatus appStatus = event.app;
debugPrint("Got app status:");
- debugPrint("$app_status");
- if (app_status.hasId() && app_status.hasStatus()) {
- if (app_status.status == "started") {
- activateApp(app_status.id);
- } else if (app_status.status == "terminated") {
- deactivateApp(app_status.id);
+ debugPrint("$appStatus");
+ if (appStatus.hasId() && appStatus.hasStatus()) {
+ if (appStatus.status == "started") {
+ activateApp(appStatus.id);
+ } else if (appStatus.status == "terminated") {
+ deactivateApp(appStatus.id);
}
}
}
@@ -100,7 +100,7 @@ class AppLauncher {
activateApp(String id) async {
if (appStack.last != id) {
var req = ActivateRequest(appId: id);
- var response = aglShell.activateApp(req);
+ aglShell.activateApp(req);
addAppToStack(id);
}
}
diff --git a/lib/data/data_providers/app_provider.dart b/lib/data/data_providers/app_provider.dart
index a74c0fd..ca2c3d4 100644
--- a/lib/data/data_providers/app_provider.dart
+++ b/lib/data/data_providers/app_provider.dart
@@ -18,7 +18,6 @@ import 'package:flutter_ics_homescreen/data/data_providers/play_controller.dart'
import 'package:flutter_ics_homescreen/export.dart';
import 'package:flutter_ics_homescreen/data/models/users.dart';
-import 'package:flutter_ics_homescreen/data/models/mediaplayer_state.dart';
enum AppState {
home,
diff --git a/lib/data/data_providers/audio_notifier.dart b/lib/data/data_providers/audio_notifier.dart
index 76b34a7..4933932 100644
--- a/lib/data/data_providers/audio_notifier.dart
+++ b/lib/data/data_providers/audio_notifier.dart
@@ -1,10 +1,10 @@
import 'package:flutter_ics_homescreen/export.dart';
-import 'package:protos/val-api.dart';
+import 'package:protos/val_api.dart';
class AudioStateNotifier extends Notifier<AudioState> {
@override
AudioState build() {
- return AudioState.initial();
+ return const AudioState.initial();
}
void resetToDefaults() {
diff --git a/lib/data/data_providers/mediaplayer_notifier.dart b/lib/data/data_providers/mediaplayer_notifier.dart
index 2d02e75..bb121c0 100644
--- a/lib/data/data_providers/mediaplayer_notifier.dart
+++ b/lib/data/data_providers/mediaplayer_notifier.dart
@@ -4,7 +4,7 @@ import 'playlist_notifier.dart';
class MediaPlayerStateNotifier extends Notifier<MediaPlayerState> {
@override
MediaPlayerState build() {
- return MediaPlayerState.initial();
+ return const MediaPlayerState.initial();
}
void updatePlayState(PlayState newState) {
@@ -20,6 +20,6 @@ class MediaPlayerStateNotifier extends Notifier<MediaPlayerState> {
}
void reset() {
- state = MediaPlayerState.initial();
+ state = const MediaPlayerState.initial();
}
}
diff --git a/lib/data/data_providers/radio_client.dart b/lib/data/data_providers/radio_client.dart
index 2cde65e..3ee041a 100644
--- a/lib/data/data_providers/radio_client.dart
+++ b/lib/data/data_providers/radio_client.dart
@@ -1,5 +1,5 @@
import 'package:flutter_ics_homescreen/export.dart';
-import 'package:protos/radio-api.dart' as api;
+import 'package:protos/radio_api.dart' as api;
class RadioClient {
final RadioConfig config;
@@ -71,7 +71,7 @@ class RadioClient {
void start() async {
try {
- var response = await stub.start(api.StartRequest());
+ await stub.start(api.StartRequest());
} catch (e) {
print(e);
}
@@ -79,7 +79,7 @@ class RadioClient {
void stop() async {
try {
- var response = await stub.stop(api.StopRequest());
+ await stub.stop(api.StopRequest());
} catch (e) {
print(e);
}
@@ -94,7 +94,7 @@ class RadioClient {
return;
}
try {
- var response = await stub
+ await stub
.setFrequency(api.SetFrequencyRequest(frequency: frequency));
} catch (e) {
print(e);
@@ -109,7 +109,7 @@ class RadioClient {
frequency = radioState.freqMax;
}
try {
- var response = await stub
+ await stub
.setFrequency(api.SetFrequencyRequest(frequency: frequency));
} catch (e) {
print(e);
@@ -125,7 +125,7 @@ class RadioClient {
frequency = radioState.freqMin;
}
try {
- var response = await stub
+ await stub
.setFrequency(api.SetFrequencyRequest(frequency: frequency));
} catch (e) {
print(e);
@@ -135,7 +135,7 @@ class RadioClient {
void scanForward() async {
try {
- var response = await stub.scanStart(api.ScanStartRequest(
+ await stub.scanStart(api.ScanStartRequest(
direction: api.ScanDirection.SCAN_DIRECTION_FORWARD));
} catch (e) {
print(e);
@@ -144,7 +144,7 @@ class RadioClient {
void scanBackward() async {
try {
- var response = await stub.scanStart(api.ScanStartRequest(
+ await stub.scanStart(api.ScanStartRequest(
direction: api.ScanDirection.SCAN_DIRECTION_BACKWARD));
} catch (e) {
print(e);
@@ -153,7 +153,7 @@ class RadioClient {
void scanStop() async {
try {
- var response = await stub.scanStop(api.ScanStopRequest());
+ await stub.scanStop(api.ScanStopRequest());
} catch (e) {
print(e);
}
diff --git a/lib/data/data_providers/radio_notifier.dart b/lib/data/data_providers/radio_notifier.dart
index 90e0df5..3ef4da4 100644
--- a/lib/data/data_providers/radio_notifier.dart
+++ b/lib/data/data_providers/radio_notifier.dart
@@ -3,7 +3,7 @@ import 'package:flutter_ics_homescreen/export.dart';
class RadioStateNotifier extends Notifier<RadioState> {
@override
RadioState build() {
- return RadioState.initial();
+ return const RadioState.initial();
}
void updateBandParameters(
diff --git a/lib/data/data_providers/units_notifier.dart b/lib/data/data_providers/units_notifier.dart
index 26b79da..68c9e65 100644
--- a/lib/data/data_providers/units_notifier.dart
+++ b/lib/data/data_providers/units_notifier.dart
@@ -1,5 +1,5 @@
import 'package:flutter_ics_homescreen/export.dart';
-import 'package:protos/val-api.dart';
+import 'package:protos/val_api.dart';
class UnitsNotifier extends Notifier<Units> {
@override
diff --git a/lib/data/data_providers/val_client.dart b/lib/data/data_providers/val_client.dart
index 5e7339c..173dbfb 100644
--- a/lib/data/data_providers/val_client.dart
+++ b/lib/data/data_providers/val_client.dart
@@ -1,5 +1,5 @@
import 'package:flutter_ics_homescreen/export.dart';
-import 'package:protos/val-api.dart';
+import 'package:protos/val_api.dart';
class ValClient {
final KuksaConfig config;
@@ -11,14 +11,14 @@ class ValClient {
ValClient({required this.config, required this.ref}) {
debugPrint("Connecting to KUKSA.val at ${config.hostname}:${config.port}");
ChannelCredentials creds;
- if (config.use_tls && config.ca_certificate.isNotEmpty) {
+ if (config.useTls && config.caCertificate.isNotEmpty) {
print("Using TLS");
- if (config.tls_server_name.isNotEmpty) {
+ if (config.tlsServerName.isNotEmpty) {
creds = ChannelCredentials.secure(
- certificates: config.ca_certificate,
- authority: config.tls_server_name);
+ certificates: config.caCertificate,
+ authority: config.tlsServerName);
} else {
- creds = ChannelCredentials.secure(certificates: config.ca_certificate);
+ creds = ChannelCredentials.secure(certificates: config.caCertificate);
}
} else {
creds = const ChannelCredentials.insecure();
@@ -133,7 +133,7 @@ class ValClient {
if (config.authorization.isNotEmpty) {
metadata = {'authorization': "Bearer ${config.authorization}"};
}
- debugPrint("Getting {path} value");
+ debugPrint("Getting $path value");
var response =
await stub.get(request, options: CallOptions(metadata: metadata));
if (response.hasError()) {
diff --git a/lib/data/data_providers/vehicle_notifier.dart b/lib/data/data_providers/vehicle_notifier.dart
index 6583f9a..1dc4627 100644
--- a/lib/data/data_providers/vehicle_notifier.dart
+++ b/lib/data/data_providers/vehicle_notifier.dart
@@ -3,12 +3,12 @@
import 'dart:async';
import 'package:flutter_ics_homescreen/export.dart';
-import 'package:protos/val-api.dart';
+import 'package:protos/val_api.dart';
class VehicleNotifier extends Notifier<Vehicle> {
@override
Vehicle build() {
- return Vehicle.initial();
+ return const Vehicle.initial();
}
void updateSpeed(double newValue) {
@@ -103,11 +103,13 @@ class VehicleNotifier extends Notifier<Vehicle> {
// Convert 0-100 to local 0-3 setting
var value = entry.value.uint32;
var fanSpeed = 0;
- if (value > 66)
+ if (value > 66) {
fanSpeed = 3;
- else if (value > 33)
+ }
+ else if (value > 33) {
fanSpeed = 2;
- else if (value > 0) fanSpeed = 1;
+ }
+ else if (value > 0) { fanSpeed = 1; }
state = state.copyWith(fanSpeed: fanSpeed);
}
break;
diff --git a/lib/data/models/audio_state.dart b/lib/data/models/audio_state.dart
index 60720a8..3ad4f63 100644
--- a/lib/data/models/audio_state.dart
+++ b/lib/data/models/audio_state.dart
@@ -1,5 +1,3 @@
-import 'dart:convert';
-
import 'package:flutter_ics_homescreen/export.dart';
@immutable
diff --git a/lib/data/models/radio_state.dart b/lib/data/models/radio_state.dart
index da972fd..9eaeddb 100644
--- a/lib/data/models/radio_state.dart
+++ b/lib/data/models/radio_state.dart
@@ -1,5 +1,3 @@
-import 'dart:convert';
-
import 'package:flutter_ics_homescreen/export.dart';
@immutable
diff --git a/lib/presentation/common_widget/volume_and_fan_control.dart b/lib/presentation/common_widget/volume_and_fan_control.dart
index 765193b..8c78b4f 100644
--- a/lib/presentation/common_widget/volume_and_fan_control.dart
+++ b/lib/presentation/common_widget/volume_and_fan_control.dart
@@ -19,7 +19,7 @@ class VolumeFanControl extends ConsumerWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
- VolumeBar(),
+ const VolumeBar(),
SizedBox(
height: gapSize,
),
diff --git a/lib/presentation/custom_icons/custom_icons.dart b/lib/presentation/custom_icons/custom_icons.dart
index 2a42c95..5ca4d9b 100644
--- a/lib/presentation/custom_icons/custom_icons.dart
+++ b/lib/presentation/custom_icons/custom_icons.dart
@@ -18,6 +18,7 @@
/// Homepage: http://fortawesome.github.com/Font-Awesome/
///
// ignore_for_file: constant_identifier_names
+library;
import 'package:flutter/widgets.dart';
diff --git a/lib/presentation/screens/dashboard/widgets/car_status.dart b/lib/presentation/screens/dashboard/widgets/car_status.dart
index 604d404..174905d 100644
--- a/lib/presentation/screens/dashboard/widgets/car_status.dart
+++ b/lib/presentation/screens/dashboard/widgets/car_status.dart
@@ -8,7 +8,7 @@ class CarStatus extends ConsumerWidget {
const CarStatus({super.key});
@override
- Widget build(BuildContext context, WidgetRef Ref) {
+ Widget build(BuildContext context, WidgetRef ref) {
return Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 84),
child: SizedBox(
@@ -194,9 +194,9 @@ class RightCarStatus extends ConsumerWidget {
class TirePressureProgressIndicator extends StatelessWidget {
final double value;
const TirePressureProgressIndicator({
- Key? key,
+ super.key,
required this.value, // Require the value to be passed
- }) : super(key: key);
+ });
@override
Widget build(BuildContext context) {
diff --git a/lib/presentation/screens/dashboard/widgets/dashboard_content.dart b/lib/presentation/screens/dashboard/widgets/dashboard_content.dart
index 1d25fdf..c4239ae 100644
--- a/lib/presentation/screens/dashboard/widgets/dashboard_content.dart
+++ b/lib/presentation/screens/dashboard/widgets/dashboard_content.dart
@@ -15,7 +15,7 @@ class DashBoardState extends ConsumerState<DashBoard>
late AnimationController _animationController;
late Animation<double> _animation;
static bool _isAnimationPlayed = false;
- Timer? timer = null;
+ Timer? timer;
@override
void initState() {
@@ -53,8 +53,9 @@ class DashBoardState extends ConsumerState<DashBoard>
@override
void dispose() {
_animationController.dispose();
- if (timer != null)
+ if (timer != null) {
timer?.cancel();
+ }
super.dispose();
}
diff --git a/lib/presentation/screens/home/home_ci.dart b/lib/presentation/screens/home/home_ci.dart
index 8584420..0bc6c91 100644
--- a/lib/presentation/screens/home/home_ci.dart
+++ b/lib/presentation/screens/home/home_ci.dart
@@ -11,9 +11,9 @@ class HomeScreenCI extends StatelessWidget {
children: [
// Note that the colors are specified with hex in order to match
// Qt's red/blue/green constants, which are different than Flutter's.
- Container(width: 1080, height: 216, color: Color(0xFF0000FF)),
- Container(width: 1080, height: 1488, color: Color(0xFFFF0000)),
- Container(width: 1080, height: 216, color: Color(0xFF008000))
+ Container(width: 1080, height: 216, color: const Color(0xFF0000FF)),
+ Container(width: 1080, height: 1488, color: const Color(0xFFFF0000)),
+ Container(width: 1080, height: 216, color: const Color(0xFF008000))
],
);
}
diff --git a/lib/presentation/screens/home/widgets/custom_tile.dart b/lib/presentation/screens/home/widgets/custom_tile.dart
index 389a75d..d167719 100644
--- a/lib/presentation/screens/home/widgets/custom_tile.dart
+++ b/lib/presentation/screens/home/widgets/custom_tile.dart
@@ -5,11 +5,11 @@ class CustomTile extends StatelessWidget {
final Color color;
final VoidCallback callback;
const CustomTile({
- Key? key,
+ super.key,
required this.name,
required this.color,
required this.callback,
- }) : super(key: key);
+ });
@override
Widget build(BuildContext context) {
diff --git a/lib/presentation/screens/hvac/hvac_content.dart b/lib/presentation/screens/hvac/hvac_content.dart
index e541efd..a796e12 100644
--- a/lib/presentation/screens/hvac/hvac_content.dart
+++ b/lib/presentation/screens/hvac/hvac_content.dart
@@ -143,7 +143,7 @@ class HVACState extends ConsumerState<HVAC> {
const SizedBox(
height: 80,
),
- Row(
+ const Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
TemperatureControl(side: Side.left),
diff --git a/lib/presentation/screens/media/media_player.dart b/lib/presentation/screens/media/media_player.dart
index 0dab346..ff7ba70 100644
--- a/lib/presentation/screens/media/media_player.dart
+++ b/lib/presentation/screens/media/media_player.dart
@@ -57,7 +57,7 @@ class _MediaPlayerState extends ConsumerState<MediaPlayer> {
const SizedBox(
height: 40,
),
- Column(
+ const Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
MediaPlayerControls(),
diff --git a/lib/presentation/screens/media/media_player_controls.dart b/lib/presentation/screens/media/media_player_controls.dart
index f23bcc9..478c23a 100644
--- a/lib/presentation/screens/media/media_player_controls.dart
+++ b/lib/presentation/screens/media/media_player_controls.dart
@@ -184,7 +184,7 @@ class MediaPlayerControlsSliderState
songLength = currentSong.duration;
}
- return Container(
+ return SizedBox(
height: 80,
child: SliderTheme(
data: SliderThemeData(
diff --git a/lib/presentation/screens/media/play_list_table.dart b/lib/presentation/screens/media/play_list_table.dart
index 28cb970..1159f68 100644
--- a/lib/presentation/screens/media/play_list_table.dart
+++ b/lib/presentation/screens/media/play_list_table.dart
@@ -3,7 +3,7 @@ import 'package:flutter_ics_homescreen/core/utils/helpers.dart';
import 'package:flutter_ics_homescreen/export.dart';
class PlayListTable extends ConsumerStatefulWidget {
- PlayListTable({super.key});
+ const PlayListTable({super.key});
@override
ConsumerState<PlayListTable> createState() => _PlayListTableState();
@@ -182,7 +182,7 @@ class _PlayListTableState extends ConsumerState<PlayListTable> {
);
},
separatorBuilder: (_, __) {
- return SizedBox(height: 8);
+ return const SizedBox(height: 8);
},
),
]))))),
diff --git a/lib/presentation/screens/media/radio_player_controls.dart b/lib/presentation/screens/media/radio_player_controls.dart
index acc8291..d20724e 100644
--- a/lib/presentation/screens/media/radio_player_controls.dart
+++ b/lib/presentation/screens/media/radio_player_controls.dart
@@ -204,7 +204,7 @@ class RadioPlayerControlsSliderState
ref.watch(radioStateProvider.select((radio) => radio.freqCurrent)) /
1000000.0;
- return Container(
+ return SizedBox(
height: 80,
child: SliderTheme(
data: SliderThemeData(
diff --git a/lib/presentation/screens/media/radio_preset_table.dart b/lib/presentation/screens/media/radio_preset_table.dart
index fcf8e2b..21f9f4a 100644
--- a/lib/presentation/screens/media/radio_preset_table.dart
+++ b/lib/presentation/screens/media/radio_preset_table.dart
@@ -177,7 +177,7 @@ class _RadioPresetTableState extends ConsumerState<RadioPresetTable> {
);
},
separatorBuilder: (_, __) {
- return SizedBox(height: 8);
+ return const SizedBox(height: 8);
},
),
])),
diff --git a/lib/presentation/screens/media/widgets/gradient_progress_indicator.dart b/lib/presentation/screens/media/widgets/gradient_progress_indicator.dart
index 24aa244..ec09ba2 100644
--- a/lib/presentation/screens/media/widgets/gradient_progress_indicator.dart
+++ b/lib/presentation/screens/media/widgets/gradient_progress_indicator.dart
@@ -13,10 +13,9 @@ class GradientProgressIndicator extends StatelessWidget {
{required this.percent,
required this.gradient,
required this.backgroundColor,
- Key? key,
+ super.key,
this.height = 16,
- required this.type})
- : super(key: key);
+ required this.type});
@override
Widget build(BuildContext context) {
diff --git a/lib/presentation/screens/settings/settings_screens/audio_settings/widget/slider_widgets.dart b/lib/presentation/screens/settings/settings_screens/audio_settings/widget/slider_widgets.dart
index 6988caa..c7db820 100644
--- a/lib/presentation/screens/settings/settings_screens/audio_settings/widget/slider_widgets.dart
+++ b/lib/presentation/screens/settings/settings_screens/audio_settings/widget/slider_widgets.dart
@@ -1,5 +1,4 @@
import 'package:flutter_ics_homescreen/export.dart';
-import 'package:flutter_ics_homescreen/presentation/custom_icons/custom_icons.dart';
class CustomBalanceSlider extends ConsumerStatefulWidget {
const CustomBalanceSlider({
diff --git a/lib/presentation/screens/settings/settings_screens/units/units_screen.dart b/lib/presentation/screens/settings/settings_screens/units/units_screen.dart
index fde7505..a49546f 100644
--- a/lib/presentation/screens/settings/settings_screens/units/units_screen.dart
+++ b/lib/presentation/screens/settings/settings_screens/units/units_screen.dart
@@ -80,14 +80,14 @@ class UnitsTile extends ConsumerStatefulWidget {
final VoidCallback voidCallback;
final String? image;
const UnitsTile({
- Key? key,
+ super.key,
this.icon,
required this.title,
required this.unitName,
required this.hasSwich,
required this.voidCallback,
this.image,
- }) : super(key: key);
+ });
@override
UnitsTileState createState() => UnitsTileState();
diff --git a/lib/presentation/screens/settings/widgets/settings_list_tile.dart b/lib/presentation/screens/settings/widgets/settings_list_tile.dart
index 4720001..02aa5f9 100644
--- a/lib/presentation/screens/settings/widgets/settings_list_tile.dart
+++ b/lib/presentation/screens/settings/widgets/settings_list_tile.dart
@@ -6,12 +6,12 @@ class SettingsTile extends ConsumerStatefulWidget {
final bool hasSwich;
final VoidCallback voidCallback;
const SettingsTile({
- Key? key,
+ super.key,
required this.icon,
required this.title,
required this.hasSwich,
required this.voidCallback,
- }) : super(key: key);
+ });
@override
SettingsTileState createState() => SettingsTileState();
@@ -110,7 +110,7 @@ class SettingsTileState extends ConsumerState<SettingsTile> {
inactiveTrackColor: Colors.transparent,
activeTrackColor: Colors.transparent,
thumbColor:
- MaterialStateProperty.all<Color>(
+ WidgetStateProperty.all<Color>(
AGLDemoColors.periwinkleColor)),
),
)