chore: add always_put_control_body_on_new_line lint (#28352)

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2026-05-11 13:47:24 -04:00
committed by GitHub
co-authored by shenlong-tanwen
parent 7837d40f57
commit 12f7b2a005
122 changed files with 774 additions and 263 deletions
@@ -45,8 +45,12 @@ class AssetViewerState {
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other.runtimeType != runtimeType) return false;
if (identical(this, other)) {
return true;
}
if (other.runtimeType != runtimeType) {
return false;
}
return other is AssetViewerState &&
other.backgroundOpacity == backgroundOpacity &&
other.showingDetails == showingDetails &&
@@ -83,7 +87,9 @@ class AssetViewerStateNotifier extends Notifier<AssetViewerState> {
}
void setAsset(BaseAsset asset) {
if (asset == state.currentAsset) return;
if (asset == state.currentAsset) {
return;
}
state = state.copyWith(currentAsset: asset, stackIndex: 0);
}
@@ -138,6 +144,8 @@ final assetViewerProvider = NotifierProvider<AssetViewerStateNotifier, AssetView
final _watchedCurrentAssetProvider = StreamProvider<BaseAsset?>((ref) {
ref.watch(assetViewerProvider.select((s) => s.currentAsset?.heroTag));
final asset = ref.read(assetViewerProvider).currentAsset;
if (asset == null) return const Stream.empty();
if (asset == null) {
return const Stream.empty();
}
return ref.read(assetServiceProvider).watchAsset(asset);
});