* refactor(sftp): Optimize file download logic and SSH command execution handling Replace manual chunked downloads with a more concise `sftp.download` method Consistently use `utf8.decode` to process SSH command output Remove redundant code and comments, and simplify the logic * chore: Update `dartssh2` submodule * feat (Temperature Display): Added an option to switch between degrees Celsius and millicelsius Allows users to switch temperature units in server settings, resolving the issue of incorrect temperature display on some devices * chore: Add a participnt * fix(sftp): Fixed a resource leak issue during file downloads and SSH command execution Ensured that remote and local file handles are properly closed during file downloads to prevent resource leaks. Additionally, improved error handling during SSH command execution to ensure that all streams are either successfully completed or properly handled in the event of an error.
63 lines
1.7 KiB
Dart
63 lines
1.7 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'snippet.dart';
|
|
|
|
// **************************************************************************
|
|
// RiverpodGenerator
|
|
// **************************************************************************
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint, type=warning
|
|
|
|
@ProviderFor(SnippetNotifier)
|
|
final snippetProvider = SnippetNotifierProvider._();
|
|
|
|
final class SnippetNotifierProvider
|
|
extends $NotifierProvider<SnippetNotifier, SnippetState> {
|
|
SnippetNotifierProvider._()
|
|
: super(
|
|
from: null,
|
|
argument: null,
|
|
retry: null,
|
|
name: r'snippetProvider',
|
|
isAutoDispose: false,
|
|
dependencies: null,
|
|
$allTransitiveDependencies: null,
|
|
);
|
|
|
|
@override
|
|
String debugGetCreateSourceHash() => _$snippetNotifierHash();
|
|
|
|
@$internal
|
|
@override
|
|
SnippetNotifier create() => SnippetNotifier();
|
|
|
|
/// {@macro riverpod.override_with_value}
|
|
Override overrideWithValue(SnippetState value) {
|
|
return $ProviderOverride(
|
|
origin: this,
|
|
providerOverride: $SyncValueProvider<SnippetState>(value),
|
|
);
|
|
}
|
|
}
|
|
|
|
String _$snippetNotifierHash() => r'46297b84ec6497e5c454be6ffe32330b37c6a465';
|
|
|
|
abstract class _$SnippetNotifier extends $Notifier<SnippetState> {
|
|
SnippetState build();
|
|
@$mustCallSuper
|
|
@override
|
|
void runBuild() {
|
|
final ref = this.ref as $Ref<SnippetState, SnippetState>;
|
|
final element =
|
|
ref.element
|
|
as $ClassProviderElement<
|
|
AnyNotifier<SnippetState, SnippetState>,
|
|
SnippetState,
|
|
Object?,
|
|
Object?
|
|
>;
|
|
element.handleCreate(ref, build);
|
|
}
|
|
}
|