Skip to content

Commit

Permalink
linter changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed May 16, 2024
1 parent 2c4b942 commit 56e1723
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
3 changes: 0 additions & 3 deletions lib/Frontend/Widgets/known_gear_scan_controller.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:hive_flutter/adapters.dart';
import 'package:logging/logging.dart' as log;
Expand All @@ -24,13 +23,11 @@ class KnownGearScanController extends ConsumerStatefulWidget {

class _KnownGearScanControllerState extends ConsumerState<KnownGearScanController> {
final Duration scanDurationTimeout = const Duration(seconds: 30);
late AppLifecycleState? _state;
late final AppLifecycleListener _listener;

@override
void initState() {
super.initState();
_state = SchedulerBinding.instance.lifecycleState;
_listener = AppLifecycleListener(
onShow: () {
Future(
Expand Down
3 changes: 2 additions & 1 deletion lib/Frontend/Widgets/lottie_lazy_load.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import 'package:lottie/lottie.dart';
import '../../constants.dart';

class LottieLazyLoad extends StatefulWidget {
const LottieLazyLoad({Key? key, required this.asset, required this.renderCache, required this.width}) : super(key: key);
const LottieLazyLoad({super.key, required this.asset, required this.renderCache, required this.width});

final String asset;
final bool renderCache;
final double width;
Expand Down
2 changes: 1 addition & 1 deletion lib/Frontend/Widgets/scan_for_new_device.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class _ScanForNewDevice extends ConsumerState<ScanForNewDevice> {
onTap: () async {
await e.device.connect();
plausible.event(name: "Connect New Gear", props: {"Gear Type": e.device.advName});
if (mounted) {
if (context.mounted) {
Navigator.pop(context);
}
},
Expand Down
2 changes: 1 addition & 1 deletion lib/Frontend/pages/markdown_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MarkdownViewer extends StatefulWidget {
final MarkdownInfo markdownInfo;

@override
_MarkdownViewerState createState() => _MarkdownViewerState();
State<MarkdownViewer> createState() => _MarkdownViewerState();
}

class _MarkdownViewerState extends State<MarkdownViewer> {
Expand Down
2 changes: 1 addition & 1 deletion lib/Frontend/pages/ota_update.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class _OtaUpdateState extends ConsumerState<OtaUpdate> {
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Upload Progress: ${current} / ${firmwareFile?.length} = ${uploadProgress.toStringAsPrecision(3)}'),
Text('Upload Progress: $current / ${firmwareFile?.length} = ${uploadProgress.toStringAsPrecision(3)}'),
Text('MTU: ${baseStatefulDevice!.mtu.value}'),
Text('OtaState: ${otaState.name}'),
Text('DeviceState: ${baseStatefulDevice!.deviceState.value}'),
Expand Down

0 comments on commit 56e1723

Please sign in to comment.