aves/lib/widgets/common/magnifier/controller/state.dart
2021-05-13 19:34:23 +09:00

28 lines
763 B
Dart

import 'dart:ui';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
@immutable
class MagnifierState {
const MagnifierState({
required this.position,
required this.scale,
required this.source,
});
final Offset position;
final double? scale;
final ChangeSource source;
@override
bool operator ==(Object other) => identical(this, other) || other is MagnifierState && runtimeType == other.runtimeType && position == other.position && scale == other.scale;
@override
int get hashCode => hashValues(position, scale, source);
@override
String toString() => '$runtimeType#${shortHash(this)}{position: $position, scale: $scale, source: $source}';
}
enum ChangeSource { internal, gesture, animation }