aves_mio/lib/widgets/viewer/hero.dart
Fabio Micheluz 2c988f959b
Some checks are pending
Quality check / Flutter analysis (push) Waiting to run
Quality check / CodeQL analysis (java-kotlin) (push) Waiting to run
first commit
2026-02-19 13:25:23 +01:00

20 lines
785 B
Dart

import 'package:aves/model/entry/entry.dart';
import 'package:aves/model/source/collection_lens.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/widgets.dart';
@immutable
class EntryHeroInfo extends Equatable {
// hero tag should include a collection identifier, so that it animates
// between different views of the entry in the same collection (e.g. thumbnails <-> viewer)
// but not between different collection instances, even with the same attributes (e.g. reloading collection page via drawer)
final CollectionLens? collection;
final AvesEntry? entry;
@override
List<Object?> get props => [collection?.id, entry?.uri];
const EntryHeroInfo(this.collection, this.entry);
int get tag => Object.hashAll([collection?.id, entry?.uri]);
}