flutter vNext prep
This commit is contained in:
parent
05d4d01ef7
commit
129b76e488
71 changed files with 98 additions and 98 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"@@locale" : "ckb",
|
"@@locale": "ckb",
|
||||||
"welcomeOptional": "ئارەزومەندانە",
|
"welcomeOptional": "ئارەزومەندانە",
|
||||||
"@welcomeOptional": {},
|
"@welcomeOptional": {},
|
||||||
"welcomeTermsToggle": "ڕازیم بە مەرج و یاساکانی بەکارهێنان",
|
"welcomeTermsToggle": "ڕازیم بە مەرج و یاساکانی بەکارهێنان",
|
||||||
|
|
|
@ -8,8 +8,8 @@ import 'package:aves/model/entry/extensions/props.dart';
|
||||||
import 'package:aves/model/metadata/date_modifier.dart';
|
import 'package:aves/model/metadata/date_modifier.dart';
|
||||||
import 'package:aves/ref/metadata/exif.dart';
|
import 'package:aves/ref/metadata/exif.dart';
|
||||||
import 'package:aves/ref/metadata/iptc.dart';
|
import 'package:aves/ref/metadata/iptc.dart';
|
||||||
import 'package:aves/ref/mime_types.dart';
|
|
||||||
import 'package:aves/ref/metadata/xmp.dart';
|
import 'package:aves/ref/metadata/xmp.dart';
|
||||||
|
import 'package:aves/ref/mime_types.dart';
|
||||||
import 'package:aves/services/common/services.dart';
|
import 'package:aves/services/common/services.dart';
|
||||||
import 'package:aves/services/metadata/xmp.dart';
|
import 'package:aves/services/metadata/xmp.dart';
|
||||||
import 'package:aves/utils/time_utils.dart';
|
import 'package:aves/utils/time_utils.dart';
|
||||||
|
|
|
@ -7,9 +7,9 @@ extension ExtraAccessibilityTimeout on AccessibilityTimeout {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case AccessibilityTimeout.system:
|
case AccessibilityTimeout.system:
|
||||||
if (hasAction) {
|
if (hasAction) {
|
||||||
return Duration(milliseconds: await (AccessibilityService.getRecommendedTimeToTakeAction(Durations.opToastActionDisplay)));
|
return Duration(milliseconds: await (AccessibilityService.getRecommendedTimeToTakeAction(ADurations.opToastActionDisplay)));
|
||||||
} else {
|
} else {
|
||||||
return Duration(milliseconds: await (AccessibilityService.getRecommendedTimeToRead(Durations.opToastTextDisplay)));
|
return Duration(milliseconds: await (AccessibilityService.getRecommendedTimeToRead(ADurations.opToastTextDisplay)));
|
||||||
}
|
}
|
||||||
case AccessibilityTimeout.s1:
|
case AccessibilityTimeout.s1:
|
||||||
return const Duration(seconds: 1);
|
return const Duration(seconds: 1);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:aves/model/entry/entry.dart';
|
import 'package:aves/model/entry/entry.dart';
|
||||||
import 'package:aves_utils/aves_utils.dart';
|
|
||||||
import 'package:aves/services/common/services.dart';
|
import 'package:aves/services/common/services.dart';
|
||||||
|
import 'package:aves_utils/aves_utils.dart';
|
||||||
import 'package:aves_video/aves_video.dart';
|
import 'package:aves_video/aves_video.dart';
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
class Durations {
|
class ADurations {
|
||||||
// Flutter animations (with margin)
|
// Flutter animations (with margin)
|
||||||
static const popupMenuAnimation = Duration(milliseconds: 300 + 20); // ref `_kMenuDuration` used in `_PopupMenuRoute`
|
static const popupMenuAnimation = Duration(milliseconds: 300 + 20); // ref `_kMenuDuration` used in `_PopupMenuRoute`
|
||||||
// page transition duration also available via `ModalRoute.of(context)!.transitionDuration * timeDilation`
|
// page transition duration also available via `ModalRoute.of(context)!.transitionDuration * timeDilation`
|
||||||
|
|
|
@ -156,7 +156,7 @@ class _AvesAppState extends State<AvesApp> with WidgetsBindingObserver {
|
||||||
late final Future<CorePalette?> _dynamicColorPaletteLoader;
|
late final Future<CorePalette?> _dynamicColorPaletteLoader;
|
||||||
final TvRailController _tvRailController = TvRailController();
|
final TvRailController _tvRailController = TvRailController();
|
||||||
final CollectionSource _mediaStoreSource = MediaStoreSource();
|
final CollectionSource _mediaStoreSource = MediaStoreSource();
|
||||||
final Debouncer _mediaStoreChangeDebouncer = Debouncer(delay: Durations.mediaContentChangeDebounceDelay);
|
final Debouncer _mediaStoreChangeDebouncer = Debouncer(delay: ADurations.mediaContentChangeDebounceDelay);
|
||||||
final Set<String> _changedUris = {};
|
final Set<String> _changedUris = {};
|
||||||
Size? _screenSize;
|
Size? _screenSize;
|
||||||
|
|
||||||
|
|
|
@ -433,7 +433,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
||||||
},
|
},
|
||||||
onSelected: (action) async {
|
onSelected: (action) async {
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
await _onActionSelected(action);
|
await _onActionSelected(action);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -670,7 +670,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
||||||
routeSettings: const RouteSettings(name: TileViewDialog.routeName),
|
routeSettings: const RouteSettings(name: TileViewDialog.routeName),
|
||||||
);
|
);
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.dialogTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.dialogTransitionAnimation * timeDilation);
|
||||||
if (value != null && initialValue != value) {
|
if (value != null && initialValue != value) {
|
||||||
settings.collectionSortFactor = value.item1!;
|
settings.collectionSortFactor = value.item1!;
|
||||||
settings.collectionSectionFactor = value.item2!;
|
settings.collectionSectionFactor = value.item2!;
|
||||||
|
|
|
@ -641,7 +641,7 @@ class _CollectionScrollViewState extends State<_CollectionScrollView> with Widge
|
||||||
void _onScrollChanged() {
|
void _onScrollChanged() {
|
||||||
widget.isScrollingNotifier.value = true;
|
widget.isScrollingNotifier.value = true;
|
||||||
_stopScrollMonitoringTimer();
|
_stopScrollMonitoringTimer();
|
||||||
_scrollMonitoringTimer = Timer(Durations.collectionScrollMonitoringTimerDelay, () {
|
_scrollMonitoringTimer = Timer(ADurations.collectionScrollMonitoringTimerDelay, () {
|
||||||
widget.isScrollingNotifier.value = false;
|
widget.isScrollingNotifier.value = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ class _CollectionPageState extends State<CollectionPage> {
|
||||||
if (item == null) return;
|
if (item == null) return;
|
||||||
|
|
||||||
final delayDuration = context.read<DurationsData>().staggeredAnimationPageTarget;
|
final delayDuration = context.read<DurationsData>().staggeredAnimationPageTarget;
|
||||||
await Future.delayed(delayDuration + Durations.highlightScrollInitDelay);
|
await Future.delayed(delayDuration + ADurations.highlightScrollInitDelay);
|
||||||
|
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
final animate = context.read<Settings>().accessibilityAnimations.animate;
|
final animate = context.read<Settings>().accessibilityAnimations.animate;
|
||||||
|
|
|
@ -487,7 +487,7 @@ class EntrySetActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAware
|
||||||
if (confirmed == null || !confirmed) return null;
|
if (confirmed == null || !confirmed) return null;
|
||||||
|
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.dialogTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.dialogTransitionAnimation * timeDilation);
|
||||||
return supported;
|
return supported;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ class _FilterBarState extends State<FilterBar> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
: (context, animation) => const SizedBox(),
|
: (context, animation) => const SizedBox(),
|
||||||
duration: animate ? Durations.filterBarRemovalAnimation : Duration.zero,
|
duration: animate ? ADurations.filterBarRemovalAnimation : Duration.zero,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
added.forEach((filter) {
|
added.forEach((filter) {
|
||||||
|
|
|
@ -437,7 +437,7 @@ mixin EntryStorageMixin on FeedbackMixin, PermissionAwareMixin, SizeAwareMixin {
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
// track in current page, without navigation
|
// track in current page, without navigation
|
||||||
await Future.delayed(Durations.highlightScrollInitDelay);
|
await Future.delayed(ADurations.highlightScrollInitDelay);
|
||||||
final targetEntry = collection.sortedEntries.firstWhereOrNull(highlightTest);
|
final targetEntry = collection.sortedEntries.firstWhereOrNull(highlightTest);
|
||||||
if (targetEntry != null) {
|
if (targetEntry != null) {
|
||||||
context.read<HighlightInfo>().trackItem(targetEntry, highlightItem: targetEntry);
|
context.read<HighlightInfo>().trackItem(targetEntry, highlightItem: targetEntry);
|
||||||
|
|
|
@ -171,7 +171,7 @@ class _ReportOverlayState<T> extends State<ReportOverlay<T>> with SingleTickerPr
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
_animationController = AnimationController(
|
_animationController = AnimationController(
|
||||||
duration: Durations.collectionOpOverlayAnimation,
|
duration: ADurations.collectionOpOverlayAnimation,
|
||||||
vsync: this,
|
vsync: this,
|
||||||
);
|
);
|
||||||
_animation = CurvedAnimation(
|
_animation = CurvedAnimation(
|
||||||
|
@ -395,7 +395,7 @@ class _ActionFeedbackState extends State<ActionFeedback> with SingleTickerProvid
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_animationController = AnimationController(
|
_animationController = AnimationController(
|
||||||
duration: Durations.viewerActionFeedbackAnimation,
|
duration: ADurations.viewerActionFeedbackAnimation,
|
||||||
vsync: this,
|
vsync: this,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ class SourceStateAwareAppBarTitle extends StatelessWidget {
|
||||||
valueListenable: source.stateNotifier,
|
valueListenable: source.stateNotifier,
|
||||||
builder: (context, sourceState, child) {
|
builder: (context, sourceState, child) {
|
||||||
return AnimatedSwitcher(
|
return AnimatedSwitcher(
|
||||||
duration: Durations.appBarTitleAnimation,
|
duration: ADurations.appBarTitleAnimation,
|
||||||
transitionBuilder: (child, animation) => FadeTransition(
|
transitionBuilder: (child, animation) => FadeTransition(
|
||||||
opacity: animation,
|
opacity: animation,
|
||||||
child: SizeTransition(
|
child: SizeTransition(
|
||||||
|
|
|
@ -30,7 +30,7 @@ class QueryBar extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _QueryBarState extends State<QueryBar> {
|
class _QueryBarState extends State<QueryBar> {
|
||||||
final Debouncer _debouncer = Debouncer(delay: Durations.searchDebounceDelay);
|
final Debouncer _debouncer = Debouncer(delay: ADurations.searchDebounceDelay);
|
||||||
late TextEditingController _controller;
|
late TextEditingController _controller;
|
||||||
|
|
||||||
ValueNotifier<String> get queryNotifier => widget.queryNotifier;
|
ValueNotifier<String> get queryNotifier => widget.queryNotifier;
|
||||||
|
@ -85,7 +85,7 @@ class _QueryBarState extends State<QueryBar> {
|
||||||
child: ValueListenableBuilder<TextEditingValue>(
|
child: ValueListenableBuilder<TextEditingValue>(
|
||||||
valueListenable: _controller,
|
valueListenable: _controller,
|
||||||
builder: (context, value, child) => AnimatedSwitcher(
|
builder: (context, value, child) => AnimatedSwitcher(
|
||||||
duration: Durations.appBarActionChangeAnimation,
|
duration: ADurations.appBarActionChangeAnimation,
|
||||||
transitionBuilder: (child, animation) => FadeTransition(
|
transitionBuilder: (child, animation) => FadeTransition(
|
||||||
opacity: animation,
|
opacity: animation,
|
||||||
child: SizeTransition(
|
child: SizeTransition(
|
||||||
|
|
|
@ -18,10 +18,10 @@ class DoubleBackPopHandler {
|
||||||
if (!Navigator.canPop(context) && settings.mustBackTwiceToExit && !_backOnce) {
|
if (!Navigator.canPop(context) && settings.mustBackTwiceToExit && !_backOnce) {
|
||||||
_backOnce = true;
|
_backOnce = true;
|
||||||
_stopBackTimer();
|
_stopBackTimer();
|
||||||
_backTimer = Timer(Durations.doubleBackTimerDelay, () => _backOnce = false);
|
_backTimer = Timer(ADurations.doubleBackTimerDelay, () => _backOnce = false);
|
||||||
toast(
|
toast(
|
||||||
context.l10n.doubleBackExitMessage,
|
context.l10n.doubleBackExitMessage,
|
||||||
duration: Durations.doubleBackTimerDelay,
|
duration: ADurations.doubleBackTimerDelay,
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ class ExpandableFilterRow extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (filters.isEmpty) return const SizedBox();
|
if (filters.isEmpty) return const SizedBox();
|
||||||
return AnimatedSwitcher(
|
return AnimatedSwitcher(
|
||||||
duration: Durations.filterRowExpandAnimation,
|
duration: ADurations.filterRowExpandAnimation,
|
||||||
layoutBuilder: (currentChild, previousChildren) => Stack(
|
layoutBuilder: (currentChild, previousChildren) => Stack(
|
||||||
children: [
|
children: [
|
||||||
...previousChildren,
|
...previousChildren,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'dart:ui' as ui;
|
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ class _SweeperState extends State<Sweeper> with SingleTickerProviderStateMixin {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_angleAnimationController = AnimationController(
|
_angleAnimationController = AnimationController(
|
||||||
duration: Durations.sweepingAnimation,
|
duration: ADurations.sweepingAnimation,
|
||||||
vsync: this,
|
vsync: this,
|
||||||
);
|
);
|
||||||
final startAngle = widget.startAngle;
|
final startAngle = widget.startAngle;
|
||||||
|
@ -85,7 +85,7 @@ class _SweeperState extends State<Sweeper> with SingleTickerProviderStateMixin {
|
||||||
return IgnorePointer(
|
return IgnorePointer(
|
||||||
child: AnimatedOpacity(
|
child: AnimatedOpacity(
|
||||||
opacity: isToggled && (_isAppearing || _angleAnimationController.status == AnimationStatus.forward) ? 1 : 0,
|
opacity: isToggled && (_isAppearing || _angleAnimationController.status == AnimationStatus.forward) ? 1 : 0,
|
||||||
duration: Durations.sweeperOpacityAnimation,
|
duration: ADurations.sweeperOpacityAnimation,
|
||||||
child: ValueListenableBuilder<double>(
|
child: ValueListenableBuilder<double>(
|
||||||
valueListenable: _angleAnimationController,
|
valueListenable: _angleAnimationController,
|
||||||
builder: (context, value, child) {
|
builder: (context, value, child) {
|
||||||
|
@ -112,7 +112,7 @@ class _SweeperState extends State<Sweeper> with SingleTickerProviderStateMixin {
|
||||||
if (isToggled) {
|
if (isToggled) {
|
||||||
_isAppearing = true;
|
_isAppearing = true;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
await Future.delayed(Durations.sweeperOpacityAnimation * timeDilation);
|
await Future.delayed(ADurations.sweeperOpacityAnimation * timeDilation);
|
||||||
_isAppearing = false;
|
_isAppearing = false;
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
_angleAnimationController.reset();
|
_angleAnimationController.reset();
|
||||||
|
|
|
@ -182,7 +182,7 @@ class _SectionSelectableLeading<T> extends StatelessWidget {
|
||||||
descendantsAreFocusable: false,
|
descendantsAreFocusable: false,
|
||||||
descendantsAreTraversable: false,
|
descendantsAreTraversable: false,
|
||||||
child: AnimatedSwitcher(
|
child: AnimatedSwitcher(
|
||||||
duration: Durations.sectionHeaderAnimation,
|
duration: ADurations.sectionHeaderAnimation,
|
||||||
switchInCurve: Curves.easeInOut,
|
switchInCurve: Curves.easeInOut,
|
||||||
switchOutCurve: Curves.easeInOut,
|
switchOutCurve: Curves.easeInOut,
|
||||||
transitionBuilder: (child, animation) {
|
transitionBuilder: (child, animation) {
|
||||||
|
@ -225,7 +225,7 @@ class _SectionSelectingLeading<T> extends StatelessWidget {
|
||||||
final selection = context.watch<Selection<T>>();
|
final selection = context.watch<Selection<T>>();
|
||||||
final isSelected = selection.isSelected(sectionEntries);
|
final isSelected = selection.isSelected(sectionEntries);
|
||||||
return AnimatedSwitcher(
|
return AnimatedSwitcher(
|
||||||
duration: Durations.sectionHeaderAnimation,
|
duration: ADurations.sectionHeaderAnimation,
|
||||||
switchInCurve: Curves.easeOutBack,
|
switchInCurve: Curves.easeOutBack,
|
||||||
switchOutCurve: Curves.easeOutBack,
|
switchOutCurve: Curves.easeOutBack,
|
||||||
transitionBuilder: (child, animation) => ScaleTransition(
|
transitionBuilder: (child, animation) => ScaleTransition(
|
||||||
|
|
|
@ -115,12 +115,12 @@ class _GridItemTrackerState<T> extends State<GridItemTracker<T>> with WidgetsBin
|
||||||
if (event.animate) {
|
if (event.animate) {
|
||||||
await scrollController.animateTo(
|
await scrollController.animateTo(
|
||||||
scrollOffset,
|
scrollOffset,
|
||||||
duration: Duration(milliseconds: (scrollOffset / 2).round().clamp(Durations.highlightScrollAnimationMinMillis, Durations.highlightScrollAnimationMaxMillis)),
|
duration: Duration(milliseconds: (scrollOffset / 2).round().clamp(ADurations.highlightScrollAnimationMinMillis, ADurations.highlightScrollAnimationMaxMillis)),
|
||||||
curve: Curves.easeInOutCubic,
|
curve: Curves.easeInOutCubic,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
scrollController.jumpTo(scrollOffset);
|
scrollController.jumpTo(scrollOffset);
|
||||||
await Future.delayed(Durations.highlightJumpDelay);
|
await Future.delayed(ADurations.highlightJumpDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class GridItemSelectionOverlay<T> extends StatelessWidget {
|
||||||
final BorderRadius? borderRadius;
|
final BorderRadius? borderRadius;
|
||||||
final EdgeInsets? padding;
|
final EdgeInsets? padding;
|
||||||
|
|
||||||
static const duration = Durations.thumbnailOverlayAnimation;
|
static const duration = ADurations.thumbnailOverlayAnimation;
|
||||||
|
|
||||||
const GridItemSelectionOverlay({
|
const GridItemSelectionOverlay({
|
||||||
super.key,
|
super.key,
|
||||||
|
|
|
@ -93,7 +93,7 @@ class _OverlayBackgroundState extends State<_OverlayBackground> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AnimatedContainer(
|
return AnimatedContainer(
|
||||||
decoration: _buildBackgroundDecoration(context),
|
decoration: _buildBackgroundDecoration(context),
|
||||||
duration: Durations.scalingGridBackgroundAnimation,
|
duration: ADurations.scalingGridBackgroundAnimation,
|
||||||
child: widget.child,
|
child: widget.child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ class MosaicGrid extends StatelessWidget {
|
||||||
top: dy,
|
top: dy,
|
||||||
width: itemWidth,
|
width: itemWidth,
|
||||||
height: itemHeight,
|
height: itemHeight,
|
||||||
duration: Durations.scalingGridPositionAnimation,
|
duration: ADurations.scalingGridPositionAnimation,
|
||||||
child: builder(i, targetExtent),
|
child: builder(i, targetExtent),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -98,7 +98,7 @@ class _OverlayBackgroundState extends State<_OverlayBackground> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AnimatedContainer(
|
return AnimatedContainer(
|
||||||
decoration: _buildBackgroundDecoration(context),
|
decoration: _buildBackgroundDecoration(context),
|
||||||
duration: Durations.scalingGridBackgroundAnimation,
|
duration: ADurations.scalingGridBackgroundAnimation,
|
||||||
child: widget.child,
|
child: widget.child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ class AvesFilterChip extends StatefulWidget {
|
||||||
);
|
);
|
||||||
if (selectedAction != null) {
|
if (selectedAction != null) {
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
actionDelegate.onActionSelected(context, filter, selectedAction);
|
actionDelegate.onActionSelected(context, filter, selectedAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ class OverlayCoordinateFilterChip extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _OverlayCoordinateFilterChipState extends State<OverlayCoordinateFilterChip> {
|
class _OverlayCoordinateFilterChipState extends State<OverlayCoordinateFilterChip> {
|
||||||
final Debouncer _debouncer = Debouncer(delay: Durations.mapInfoDebounceDelay);
|
final Debouncer _debouncer = Debouncer(delay: ADurations.mapInfoDebounceDelay);
|
||||||
final ValueNotifier<ZoomedBounds?> _idleBoundsNotifier = ValueNotifier(null);
|
final ValueNotifier<ZoomedBounds?> _idleBoundsNotifier = ValueNotifier(null);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -261,7 +261,7 @@ class _GeoMapState extends State<GeoMap> {
|
||||||
return AnimatedSize(
|
return AnimatedSize(
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
curve: Curves.easeInOutCubic,
|
curve: Curves.easeInOutCubic,
|
||||||
duration: Durations.mapStyleSwitchAnimation,
|
duration: ADurations.mapStyleSwitchAnimation,
|
||||||
child: ValueListenableBuilder<bool>(
|
child: ValueListenableBuilder<bool>(
|
||||||
valueListenable: widget.isAnimatingNotifier,
|
valueListenable: widget.isAnimatingNotifier,
|
||||||
builder: (context, animating, child) {
|
builder: (context, animating, child) {
|
||||||
|
|
|
@ -62,7 +62,7 @@ class _EntryLeafletMapState<T> extends State<EntryLeafletMap<T>> with TickerProv
|
||||||
final MapController _leafletMapController = MapController();
|
final MapController _leafletMapController = MapController();
|
||||||
final List<StreamSubscription> _subscriptions = [];
|
final List<StreamSubscription> _subscriptions = [];
|
||||||
Map<MarkerKey<T>, GeoEntry<T>> _geoEntryByMarkerKey = {};
|
Map<MarkerKey<T>, GeoEntry<T>> _geoEntryByMarkerKey = {};
|
||||||
final Debouncer _debouncer = Debouncer(delay: Durations.mapIdleDebounceDelay);
|
final Debouncer _debouncer = Debouncer(delay: ADurations.mapIdleDebounceDelay);
|
||||||
|
|
||||||
ValueNotifier<ZoomedBounds> get boundsNotifier => widget.boundsNotifier;
|
ValueNotifier<ZoomedBounds> get boundsNotifier => widget.boundsNotifier;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class SearchPage extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SearchPageState extends State<SearchPage> {
|
class _SearchPageState extends State<SearchPage> {
|
||||||
final Debouncer _debouncer = Debouncer(delay: Durations.searchDebounceDelay);
|
final Debouncer _debouncer = Debouncer(delay: ADurations.searchDebounceDelay);
|
||||||
final FocusNode _searchFieldFocusNode = FocusNode();
|
final FocusNode _searchFieldFocusNode = FocusNode();
|
||||||
final DoubleBackPopHandler _doubleBackPopHandler = DoubleBackPopHandler();
|
final DoubleBackPopHandler _doubleBackPopHandler = DoubleBackPopHandler();
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class _SearchPageState extends State<SearchPage> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
widget.animation.removeStatusListener(_onAnimationStatusChanged);
|
widget.animation.removeStatusListener(_onAnimationStatusChanged);
|
||||||
Future.delayed(Durations.pageTransitionAnimation * timeDilation).then((_) {
|
Future.delayed(ADurations.pageTransitionAnimation * timeDilation).then((_) {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
_searchFieldFocusNode.requestFocus();
|
_searchFieldFocusNode.requestFocus();
|
||||||
});
|
});
|
||||||
|
|
|
@ -83,7 +83,7 @@ class ThumbnailZoomOverlay extends StatelessWidget {
|
||||||
});
|
});
|
||||||
|
|
||||||
static const alignment = AlignmentDirectional.bottomEnd;
|
static const alignment = AlignmentDirectional.bottomEnd;
|
||||||
static const duration = Durations.thumbnailOverlayAnimation;
|
static const duration = ADurations.thumbnailOverlayAnimation;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
@ -151,7 +151,7 @@ class _ThumbnailScrollerState extends State<ThumbnailScroller> {
|
||||||
color: currentIndex == index ? Colors.transparent : Colors.black45,
|
color: currentIndex == index ? Colors.transparent : Colors.black45,
|
||||||
width: thumbnailExtent,
|
width: thumbnailExtent,
|
||||||
height: thumbnailExtent,
|
height: thumbnailExtent,
|
||||||
duration: Durations.thumbnailScrollerShadeAnimation,
|
duration: ADurations.thumbnailScrollerShadeAnimation,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -172,7 +172,7 @@ class _ThumbnailScrollerState extends State<ThumbnailScroller> {
|
||||||
_isAnimating = true;
|
_isAnimating = true;
|
||||||
await _scrollController.animateTo(
|
await _scrollController.animateTo(
|
||||||
targetOffset,
|
targetOffset,
|
||||||
duration: Durations.thumbnailScrollerScrollAnimation,
|
duration: ADurations.thumbnailScrollerScrollAnimation,
|
||||||
curve: Curves.easeOutCubic,
|
curve: Curves.easeOutCubic,
|
||||||
);
|
);
|
||||||
_isAnimating = false;
|
_isAnimating = false;
|
||||||
|
|
|
@ -65,7 +65,7 @@ class _AppDebugPageState extends State<AppDebugPage> {
|
||||||
.toList(),
|
.toList(),
|
||||||
onSelected: (action) async {
|
onSelected: (action) async {
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
unawaited(_onActionSelected(action));
|
unawaited(_onActionSelected(action));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -103,7 +103,7 @@ class _RenameEntrySetPageState extends State<RenameEntrySetPage> {
|
||||||
},
|
},
|
||||||
onSelected: (key) async {
|
onSelected: (key) async {
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
_insertProcessor(key);
|
_insertProcessor(key);
|
||||||
},
|
},
|
||||||
tooltip: l10n.renameEntrySetPageInsertTooltip,
|
tooltip: l10n.renameEntrySetPageInsertTooltip,
|
||||||
|
|
|
@ -204,7 +204,7 @@ class _TagEditorPageState extends State<TagEditorPage> {
|
||||||
onLongPress: null,
|
onLongPress: null,
|
||||||
),
|
),
|
||||||
crossFadeState: sortedTags.isEmpty ? CrossFadeState.showFirst : CrossFadeState.showSecond,
|
crossFadeState: sortedTags.isEmpty ? CrossFadeState.showFirst : CrossFadeState.showSecond,
|
||||||
duration: Durations.tagEditorTransition,
|
duration: ADurations.tagEditorTransition,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Divider(height: 0),
|
const Divider(height: 0),
|
||||||
|
|
|
@ -133,7 +133,7 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
||||||
// when the field gets focus, we wait for the soft keyboard to appear
|
// when the field gets focus, we wait for the soft keyboard to appear
|
||||||
// then scroll to the bottom to make sure the field is in view
|
// then scroll to the bottom to make sure the field is in view
|
||||||
if (_nameFieldFocusNode.hasFocus) {
|
if (_nameFieldFocusNode.hasFocus) {
|
||||||
await Future.delayed(Durations.softKeyboardDisplayDelay + const Duration(milliseconds: 500));
|
await Future.delayed(ADurations.softKeyboardDisplayDelay + const Duration(milliseconds: 500));
|
||||||
_scrollToBottom();
|
_scrollToBottom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
||||||
void _scrollToBottom() {
|
void _scrollToBottom() {
|
||||||
_scrollController.animateTo(
|
_scrollController.animateTo(
|
||||||
_scrollController.position.maxScrollExtent,
|
_scrollController.position.maxScrollExtent,
|
||||||
duration: Durations.dialogFieldReachAnimation,
|
duration: ADurations.dialogFieldReachAnimation,
|
||||||
curve: Curves.easeInOut,
|
curve: Curves.easeInOut,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,7 +227,7 @@ class _AlbumPickPageState extends State<_AlbumPickPage> {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
|
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
onActionSelected(action);
|
onActionSelected(action);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -243,7 +243,7 @@ class _AlbumPickPageState extends State<_AlbumPickPage> {
|
||||||
if (directory == null) return;
|
if (directory == null) return;
|
||||||
|
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.dialogTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.dialogTransitionAnimation * timeDilation);
|
||||||
|
|
||||||
_pickAlbum(directory);
|
_pickAlbum(directory);
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ class _AlbumPickPageState extends State<_AlbumPickPage> {
|
||||||
if (details == null) return;
|
if (details == null) return;
|
||||||
|
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.dialogTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.dialogTransitionAnimation * timeDilation);
|
||||||
|
|
||||||
await vaults.create(details);
|
await vaults.create(details);
|
||||||
_pickAlbum(details.path);
|
_pickAlbum(details.path);
|
||||||
|
|
|
@ -68,7 +68,7 @@ class _ContentState extends State<_Content> with SingleTickerProviderStateMixin
|
||||||
final AvesMapController _mapController = AvesMapController();
|
final AvesMapController _mapController = AvesMapController();
|
||||||
late final ValueNotifier<bool> _isPageAnimatingNotifier;
|
late final ValueNotifier<bool> _isPageAnimatingNotifier;
|
||||||
final ValueNotifier<LatLng?> _dotLocationNotifier = ValueNotifier(null), _infoLocationNotifier = ValueNotifier(null);
|
final ValueNotifier<LatLng?> _dotLocationNotifier = ValueNotifier(null), _infoLocationNotifier = ValueNotifier(null);
|
||||||
final Debouncer _infoDebouncer = Debouncer(delay: Durations.mapInfoDebounceDelay);
|
final Debouncer _infoDebouncer = Debouncer(delay: ADurations.mapInfoDebounceDelay);
|
||||||
|
|
||||||
CollectionLens? get openingCollection => widget.collection;
|
CollectionLens? get openingCollection => widget.collection;
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ class _ContentState extends State<_Content> with SingleTickerProviderStateMixin
|
||||||
|
|
||||||
if (ExtraEntryMapStyle.isHeavy(settings.mapStyle)) {
|
if (ExtraEntryMapStyle.isHeavy(settings.mapStyle)) {
|
||||||
_isPageAnimatingNotifier = ValueNotifier(true);
|
_isPageAnimatingNotifier = ValueNotifier(true);
|
||||||
Future.delayed(Durations.pageTransitionAnimation * timeDilation).then((_) {
|
Future.delayed(ADurations.pageTransitionAnimation * timeDilation).then((_) {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
_isPageAnimatingNotifier.value = false;
|
_isPageAnimatingNotifier.value = false;
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ Future<void> showSelectionDialog<T>({
|
||||||
routeSettings: const RouteSettings(name: AvesSingleSelectionDialog.routeName),
|
routeSettings: const RouteSettings(name: AvesSingleSelectionDialog.routeName),
|
||||||
);
|
);
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.dialogTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.dialogTransitionAnimation * timeDilation);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
onSelection(value);
|
onSelection(value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,7 @@ class AlbumChipSetActionDelegate extends ChipSetActionDelegate<AlbumFilter> with
|
||||||
routeSettings: const RouteSettings(name: TileViewDialog.routeName),
|
routeSettings: const RouteSettings(name: TileViewDialog.routeName),
|
||||||
);
|
);
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.dialogTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.dialogTransitionAnimation * timeDilation);
|
||||||
if (value != null && initialValue != value) {
|
if (value != null && initialValue != value) {
|
||||||
sortFactor = value.item1!;
|
sortFactor = value.item1!;
|
||||||
settings.albumGroupFactor = value.item2!;
|
settings.albumGroupFactor = value.item2!;
|
||||||
|
|
|
@ -237,7 +237,7 @@ abstract class ChipSetActionDelegate<T extends CollectionFilter> with FeedbackMi
|
||||||
routeSettings: const RouteSettings(name: TileViewDialog.routeName),
|
routeSettings: const RouteSettings(name: TileViewDialog.routeName),
|
||||||
);
|
);
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.dialogTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.dialogTransitionAnimation * timeDilation);
|
||||||
if (value != null && initialValue != value) {
|
if (value != null && initialValue != value) {
|
||||||
sortFactor = value.item1!;
|
sortFactor = value.item1!;
|
||||||
tileLayout = value.item3!;
|
tileLayout = value.item3!;
|
||||||
|
|
|
@ -366,7 +366,7 @@ class _FilterGridAppBarState<T extends CollectionFilter, CSAD extends ChipSetAct
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
|
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
_onActionSelected(context, action, actionDelegate);
|
_onActionSelected(context, action, actionDelegate);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:aves/model/apps.dart';
|
||||||
import 'package:aves/model/covers.dart';
|
import 'package:aves/model/covers.dart';
|
||||||
import 'package:aves/model/filters/album.dart';
|
import 'package:aves/model/filters/album.dart';
|
||||||
import 'package:aves/model/filters/filters.dart';
|
import 'package:aves/model/filters/filters.dart';
|
||||||
|
@ -13,7 +14,6 @@ import 'package:aves/model/vaults/vaults.dart';
|
||||||
import 'package:aves/theme/durations.dart';
|
import 'package:aves/theme/durations.dart';
|
||||||
import 'package:aves/theme/icons.dart';
|
import 'package:aves/theme/icons.dart';
|
||||||
import 'package:aves/theme/text.dart';
|
import 'package:aves/theme/text.dart';
|
||||||
import 'package:aves/model/apps.dart';
|
|
||||||
import 'package:aves/utils/android_file_utils.dart';
|
import 'package:aves/utils/android_file_utils.dart';
|
||||||
import 'package:aves/widgets/common/extensions/build_context.dart';
|
import 'package:aves/widgets/common/extensions/build_context.dart';
|
||||||
import 'package:aves/widgets/common/identity/aves_filter_chip.dart';
|
import 'package:aves/widgets/common/identity/aves_filter_chip.dart';
|
||||||
|
@ -183,7 +183,7 @@ class CoveredFilterChip<T extends CollectionFilter> extends StatelessWidget {
|
||||||
if (pinned)
|
if (pinned)
|
||||||
AnimatedPadding(
|
AnimatedPadding(
|
||||||
padding: EdgeInsetsDirectional.only(end: padding),
|
padding: EdgeInsetsDirectional.only(end: padding),
|
||||||
duration: Durations.chipDecorationAnimation,
|
duration: ADurations.chipDecorationAnimation,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
AIcons.pin,
|
AIcons.pin,
|
||||||
color: _detailColor(context),
|
color: _detailColor(context),
|
||||||
|
@ -193,7 +193,7 @@ class CoveredFilterChip<T extends CollectionFilter> extends StatelessWidget {
|
||||||
if (filter is AlbumFilter && androidFileUtils.isOnRemovableStorage(filter.album))
|
if (filter is AlbumFilter && androidFileUtils.isOnRemovableStorage(filter.album))
|
||||||
AnimatedPadding(
|
AnimatedPadding(
|
||||||
padding: EdgeInsetsDirectional.only(end: padding),
|
padding: EdgeInsetsDirectional.only(end: padding),
|
||||||
duration: Durations.chipDecorationAnimation,
|
duration: ADurations.chipDecorationAnimation,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
AIcons.removableStorage,
|
AIcons.removableStorage,
|
||||||
color: _detailColor(context),
|
color: _detailColor(context),
|
||||||
|
@ -203,7 +203,7 @@ class CoveredFilterChip<T extends CollectionFilter> extends StatelessWidget {
|
||||||
if (filter is AlbumFilter && vaults.isVault(filter.album))
|
if (filter is AlbumFilter && vaults.isVault(filter.album))
|
||||||
AnimatedPadding(
|
AnimatedPadding(
|
||||||
padding: EdgeInsetsDirectional.only(end: padding),
|
padding: EdgeInsetsDirectional.only(end: padding),
|
||||||
duration: Durations.chipDecorationAnimation,
|
duration: ADurations.chipDecorationAnimation,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
AIcons.locked,
|
AIcons.locked,
|
||||||
color: _detailColor(context),
|
color: _detailColor(context),
|
||||||
|
|
|
@ -546,7 +546,7 @@ class _FilterSectionedContentState<T extends CollectionFilter> extends State<_Fi
|
||||||
final item = visibleSections.values.expand((list) => list).firstWhereOrNull((gridItem) => gridItem.filter == filter);
|
final item = visibleSections.values.expand((list) => list).firstWhereOrNull((gridItem) => gridItem.filter == filter);
|
||||||
if (item == null) return;
|
if (item == null) return;
|
||||||
|
|
||||||
await Future.delayed(Durations.highlightScrollInitDelay);
|
await Future.delayed(ADurations.highlightScrollInitDelay);
|
||||||
|
|
||||||
final animate = context.read<Settings>().accessibilityAnimations.animate;
|
final animate = context.read<Settings>().accessibilityAnimations.animate;
|
||||||
highlightInfo.trackItem(item, animate: animate, highlightItem: filter);
|
highlightInfo.trackItem(item, animate: animate, highlightItem: filter);
|
||||||
|
|
|
@ -115,7 +115,7 @@ class _ContentState extends State<_Content> with SingleTickerProviderStateMixin
|
||||||
|
|
||||||
if (ExtraEntryMapStyle.isHeavy(settings.mapStyle)) {
|
if (ExtraEntryMapStyle.isHeavy(settings.mapStyle)) {
|
||||||
_isPageAnimatingNotifier.value = true;
|
_isPageAnimatingNotifier.value = true;
|
||||||
Future.delayed(Durations.pageTransitionAnimation * timeDilation).then((_) {
|
Future.delayed(ADurations.pageTransitionAnimation * timeDilation).then((_) {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
_isPageAnimatingNotifier.value = false;
|
_isPageAnimatingNotifier.value = false;
|
||||||
});
|
});
|
||||||
|
@ -139,7 +139,7 @@ class _ContentState extends State<_Content> with SingleTickerProviderStateMixin
|
||||||
_subscriptions.add(openingCollection.source.eventBus.on<CatalogMetadataChangedEvent>().listen((e) => _updateRegionCollection()));
|
_subscriptions.add(openingCollection.source.eventBus.on<CatalogMetadataChangedEvent>().listen((e) => _updateRegionCollection()));
|
||||||
|
|
||||||
_selectedIndexNotifier.addListener(_onThumbnailIndexChanged);
|
_selectedIndexNotifier.addListener(_onThumbnailIndexChanged);
|
||||||
Future.delayed(Durations.pageTransitionAnimation * timeDilation + const Duration(seconds: 1), () {
|
Future.delayed(ADurations.pageTransitionAnimation * timeDilation + const Duration(seconds: 1), () {
|
||||||
final regionEntries = regionCollection?.sortedEntries ?? [];
|
final regionEntries = regionCollection?.sortedEntries ?? [];
|
||||||
final initialEntry = widget.initialEntry ?? regionEntries.firstOrNull;
|
final initialEntry = widget.initialEntry ?? regionEntries.firstOrNull;
|
||||||
if (initialEntry != null) {
|
if (initialEntry != null) {
|
||||||
|
@ -475,7 +475,7 @@ class _ContentState extends State<_Content> with SingleTickerProviderStateMixin
|
||||||
);
|
);
|
||||||
if (selectedAction != null) {
|
if (selectedAction != null) {
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
final delegate = EntrySetActionDelegate();
|
final delegate = EntrySetActionDelegate();
|
||||||
switch (selectedAction) {
|
switch (selectedAction) {
|
||||||
case MapClusterAction.editLocation:
|
case MapClusterAction.editLocation:
|
||||||
|
|
|
@ -28,7 +28,7 @@ class MapEntryScroller extends StatefulWidget {
|
||||||
|
|
||||||
class _MapEntryScrollerState extends State<MapEntryScroller> {
|
class _MapEntryScrollerState extends State<MapEntryScroller> {
|
||||||
final ValueNotifier<AvesEntry?> _infoEntryNotifier = ValueNotifier(null);
|
final ValueNotifier<AvesEntry?> _infoEntryNotifier = ValueNotifier(null);
|
||||||
final Debouncer _infoDebouncer = Debouncer(delay: Durations.mapInfoDebounceDelay);
|
final Debouncer _infoDebouncer = Debouncer(delay: ADurations.mapInfoDebounceDelay);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
|
@ -111,7 +111,7 @@ class _AppDrawerState extends State<AppDrawer> {
|
||||||
Widget _buildHeader(BuildContext context) {
|
Widget _buildHeader(BuildContext context) {
|
||||||
Future<void> goTo(String routeName, WidgetBuilder pageBuilder) async {
|
Future<void> goTo(String routeName, WidgetBuilder pageBuilder) async {
|
||||||
Navigator.maybeOf(context)?.pop();
|
Navigator.maybeOf(context)?.pop();
|
||||||
await Future.delayed(Durations.drawerTransitionAnimation);
|
await Future.delayed(ADurations.drawerTransitionAnimation);
|
||||||
await Navigator.maybeOf(context)?.push(MaterialPageRoute(
|
await Navigator.maybeOf(context)?.push(MaterialPageRoute(
|
||||||
settings: RouteSettings(name: routeName),
|
settings: RouteSettings(name: routeName),
|
||||||
builder: pageBuilder,
|
builder: pageBuilder,
|
||||||
|
|
|
@ -29,7 +29,7 @@ class ActionPanel extends StatelessWidget {
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
),
|
),
|
||||||
margin: const EdgeInsets.all(16),
|
margin: const EdgeInsets.all(16),
|
||||||
duration: Durations.quickActionHighlightAnimation,
|
duration: ADurations.quickActionHighlightAnimation,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
child: child,
|
child: child,
|
||||||
|
|
|
@ -111,7 +111,7 @@ class _QuickActionEditorBodyState<T extends Object> extends State<QuickActionEdi
|
||||||
void _onQuickActionTargetLeave() {
|
void _onQuickActionTargetLeave() {
|
||||||
_stopLeavingTimer();
|
_stopLeavingTimer();
|
||||||
final action = _draggedAvailableAction.value;
|
final action = _draggedAvailableAction.value;
|
||||||
_targetLeavingTimer = Timer(Durations.quickActionListAnimation + const Duration(milliseconds: 50), () {
|
_targetLeavingTimer = Timer(ADurations.quickActionListAnimation + const Duration(milliseconds: 50), () {
|
||||||
_removeQuickAction(action);
|
_removeQuickAction(action);
|
||||||
_quickActionHighlight.value = false;
|
_quickActionHighlight.value = false;
|
||||||
});
|
});
|
||||||
|
@ -329,10 +329,10 @@ class _QuickActionEditorBodyState<T extends Object> extends State<QuickActionEdi
|
||||||
_quickActions.insert(targetIndex, action);
|
_quickActions.insert(targetIndex, action);
|
||||||
_animatedListKey.currentState!.insertItem(
|
_animatedListKey.currentState!.insertItem(
|
||||||
targetIndex,
|
targetIndex,
|
||||||
duration: Durations.quickActionListAnimation,
|
duration: ADurations.quickActionListAnimation,
|
||||||
);
|
);
|
||||||
_quickActionsChangeNotifier.notify();
|
_quickActionsChangeNotifier.notify();
|
||||||
Future.delayed(Durations.quickActionListAnimation).then((value) => _reordering = false);
|
Future.delayed(ADurations.quickActionListAnimation).then((value) => _reordering = false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ class _QuickActionEditorBodyState<T extends Object> extends State<QuickActionEdi
|
||||||
_animatedListKey.currentState!.removeItem(
|
_animatedListKey.currentState!.removeItem(
|
||||||
index,
|
index,
|
||||||
(context, animation) => DraggedPlaceholder(child: _buildQuickActionButton(action, animation)),
|
(context, animation) => DraggedPlaceholder(child: _buildQuickActionButton(action, animation)),
|
||||||
duration: Durations.quickActionListAnimation,
|
duration: ADurations.quickActionListAnimation,
|
||||||
);
|
);
|
||||||
_quickActionsChangeNotifier.notify();
|
_quickActionsChangeNotifier.notify();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -25,7 +25,7 @@ class SettingsTileLeading extends StatelessWidget {
|
||||||
)),
|
)),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
duration: Durations.themeColorModeAnimation,
|
duration: ADurations.themeColorModeAnimation,
|
||||||
child: DecoratedIcon(
|
child: DecoratedIcon(
|
||||||
icon,
|
icon,
|
||||||
size: 18,
|
size: 18,
|
||||||
|
|
|
@ -68,7 +68,7 @@ class SettingsSwitchListTile extends StatelessWidget {
|
||||||
Expanded(child: titleWidget),
|
Expanded(child: titleWidget),
|
||||||
AnimatedOpacity(
|
AnimatedOpacity(
|
||||||
opacity: current ? 1 : disabledOpacity,
|
opacity: current ? 1 : disabledOpacity,
|
||||||
duration: Durations.toggleableTransitionAnimation,
|
duration: ADurations.toggleableTransitionAnimation,
|
||||||
child: trailing,
|
child: trailing,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -32,7 +32,7 @@ class LocaleTile extends StatelessWidget {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.pageTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.pageTransitionAnimation * timeDilation);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
settings.locale = value == systemLocaleOption ? null : value;
|
settings.locale = value == systemLocaleOption ? null : value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ class _FilePickerPageState extends State<FilePickerPage> {
|
||||||
},
|
},
|
||||||
onSelected: (action) async {
|
onSelected: (action) async {
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case _PickerAction.toggleHiddenView:
|
case _PickerAction.toggleHiddenView:
|
||||||
settings.filePickerShowHiddenFiles = !showHidden;
|
settings.filePickerShowHiddenFiles = !showHidden;
|
||||||
|
@ -168,7 +168,7 @@ class _FilePickerPageState extends State<FilePickerPage> {
|
||||||
title: Text(v.getDescription(context)),
|
title: Text(v.getDescription(context)),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
Navigator.maybeOf(context)?.pop();
|
Navigator.maybeOf(context)?.pop();
|
||||||
await Future.delayed(Durations.drawerTransitionAnimation);
|
await Future.delayed(ADurations.drawerTransitionAnimation);
|
||||||
_goTo(v.path);
|
_goTo(v.path);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
|
|
|
@ -155,7 +155,7 @@ class _HiddenPaths extends StatelessWidget {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.pageTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.pageTransitionAnimation * timeDilation);
|
||||||
if (path != null && path.isNotEmpty) {
|
if (path != null && path.isNotEmpty) {
|
||||||
settings.changeFilterVisibility({PathFilter(path)}, false);
|
settings.changeFilterVisibility({PathFilter(path)}, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ class _SettingsMobilePageState extends State<SettingsMobilePage> with FeedbackMi
|
||||||
},
|
},
|
||||||
onSelected: (action) async {
|
onSelected: (action) async {
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
_onActionSelected(action);
|
_onActionSelected(action);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -68,7 +68,7 @@ class _StatsPageState extends State<StatsPage> with FeedbackMixin, VaultAwareMix
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
_isPageAnimatingNotifier = ValueNotifier(true);
|
_isPageAnimatingNotifier = ValueNotifier(true);
|
||||||
Future.delayed(Durations.pageTransitionAnimation * timeDilation).then((_) {
|
Future.delayed(ADurations.pageTransitionAnimation * timeDilation).then((_) {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
_isPageAnimatingNotifier.value = false;
|
_isPageAnimatingNotifier.value = false;
|
||||||
});
|
});
|
||||||
|
|
|
@ -401,7 +401,7 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix
|
||||||
if (newName == null || newName.isEmpty || newName == targetEntry.filenameWithoutExtension) return;
|
if (newName == null || newName.isEmpty || newName == targetEntry.filenameWithoutExtension) return;
|
||||||
|
|
||||||
// wait for the dialog to hide as applying the change may block the UI
|
// wait for the dialog to hide as applying the change may block the UI
|
||||||
await Future.delayed(Durations.dialogTransitionAnimation * timeDilation);
|
await Future.delayed(ADurations.dialogTransitionAnimation * timeDilation);
|
||||||
await rename(
|
await rename(
|
||||||
context,
|
context,
|
||||||
entriesToNewName: {targetEntry: '$newName${targetEntry.extension}'},
|
entriesToNewName: {targetEntry: '$newName${targetEntry.extension}'},
|
||||||
|
|
|
@ -205,7 +205,7 @@ class VideoActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix
|
||||||
await controller.play();
|
await controller.play();
|
||||||
}
|
}
|
||||||
// hide overlay
|
// hide overlay
|
||||||
_overlayHidingTimer = Timer(context.read<DurationsData>().iconAnimation + Durations.videoOverlayHideDelay, () {
|
_overlayHidingTimer = Timer(context.read<DurationsData>().iconAnimation + ADurations.videoOverlayHideDelay, () {
|
||||||
const ToggleOverlayNotification(visible: false).dispatch(context);
|
const ToggleOverlayNotification(visible: false).dispatch(context);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ class ViewerController {
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
_autopilotAnimationControllers[vsync] = animationController;
|
_autopilotAnimationControllers[vsync] = animationController;
|
||||||
Future.delayed(Durations.viewerHorizontalPageAnimation).then((_) => _autopilotAnimationControllers[vsync]?.forward());
|
Future.delayed(ADurations.viewerHorizontalPageAnimation).then((_) => _autopilotAnimationControllers[vsync]?.forward());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,7 @@ class _ViewerVerticalPageViewState extends State<ViewerVerticalPageView> {
|
||||||
if (animate) {
|
if (animate) {
|
||||||
pageController.animateToPage(
|
pageController.animateToPage(
|
||||||
target,
|
target,
|
||||||
duration: Durations.viewerHorizontalPageAnimation,
|
duration: ADurations.viewerHorizontalPageAnimation,
|
||||||
curve: Curves.easeInOutCubic,
|
curve: Curves.easeInOutCubic,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -333,7 +333,7 @@ class _ViewerVerticalPageViewState extends State<ViewerVerticalPageView> {
|
||||||
|
|
||||||
_isVerticallyScrollingNotifier.value = true;
|
_isVerticallyScrollingNotifier.value = true;
|
||||||
_stopScrollMonitoringTimer();
|
_stopScrollMonitoringTimer();
|
||||||
_verticalScrollMonitoringTimer = Timer(Durations.infoScrollMonitoringTimerDelay, () {
|
_verticalScrollMonitoringTimer = Timer(ADurations.infoScrollMonitoringTimerDelay, () {
|
||||||
_isVerticallyScrollingNotifier.value = false;
|
_isVerticallyScrollingNotifier.value = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ class InfoAppBar extends StatelessWidget {
|
||||||
],
|
],
|
||||||
onSelected: (action) async {
|
onSelected: (action) async {
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
await Future.delayed(Durations.popupMenuAnimation * timeDilation);
|
await Future.delayed(ADurations.popupMenuAnimation * timeDilation);
|
||||||
actionDelegate.onActionSelected(context, entry, collection, action);
|
actionDelegate.onActionSelected(context, entry, collection, action);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -122,7 +122,7 @@ class _InfoPageState extends State<InfoPage> {
|
||||||
ShowImageNotification().dispatch(context);
|
ShowImageNotification().dispatch(context);
|
||||||
_scrollController.animateTo(
|
_scrollController.animateTo(
|
||||||
0,
|
0,
|
||||||
duration: Durations.pageTransitionAnimation,
|
duration: ADurations.pageTransitionAnimation,
|
||||||
curve: Curves.easeInOut,
|
curve: Curves.easeInOut,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ class _InfoPageContentState extends State<_InfoPageContent> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onActionDelegateEvent(ActionEvent<EntryAction> event) {
|
void _onActionDelegateEvent(ActionEvent<EntryAction> event) {
|
||||||
Future.delayed(Durations.dialogTransitionAnimation).then((_) {
|
Future.delayed(ADurations.dialogTransitionAnimation).then((_) {
|
||||||
if (event is ActionStartedEvent) {
|
if (event is ActionStartedEvent) {
|
||||||
_isEditingMetadataNotifier.value = event.action;
|
_isEditingMetadataNotifier.value = event.action;
|
||||||
} else if (event is ActionEndedEvent) {
|
} else if (event is ActionEndedEvent) {
|
||||||
|
|
|
@ -116,7 +116,7 @@ class _XmpCardState extends State<XmpCard> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MultiCrossFader(
|
MultiCrossFader(
|
||||||
duration: Durations.xmpStructArrayCardTransition,
|
duration: ADurations.xmpStructArrayCardTransition,
|
||||||
sizeCurve: Curves.easeOutBack,
|
sizeCurve: Curves.easeOutBack,
|
||||||
alignment: AlignmentDirectional.topStart,
|
alignment: AlignmentDirectional.topStart,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:aves/ref/mime_types.dart';
|
|
||||||
import 'package:aves/ref/metadata/xmp.dart';
|
import 'package:aves/ref/metadata/xmp.dart';
|
||||||
|
import 'package:aves/ref/mime_types.dart';
|
||||||
import 'package:aves/widgets/common/extensions/build_context.dart';
|
import 'package:aves/widgets/common/extensions/build_context.dart';
|
||||||
import 'package:aves/widgets/viewer/info/common.dart';
|
import 'package:aves/widgets/viewer/info/common.dart';
|
||||||
import 'package:aves/widgets/viewer/info/embedded/notifications.dart';
|
import 'package:aves/widgets/viewer/info/embedded/notifications.dart';
|
||||||
|
|
|
@ -14,7 +14,7 @@ class SelectionButton extends StatelessWidget {
|
||||||
final Animation<double> scale;
|
final Animation<double> scale;
|
||||||
|
|
||||||
static const double padding = 8;
|
static const double padding = 8;
|
||||||
static const duration = Durations.thumbnailOverlayAnimation;
|
static const duration = ADurations.thumbnailOverlayAnimation;
|
||||||
|
|
||||||
const SelectionButton({
|
const SelectionButton({
|
||||||
super.key,
|
super.key,
|
||||||
|
|
|
@ -25,7 +25,7 @@ class ViewerThumbnailPreview extends StatefulWidget {
|
||||||
|
|
||||||
class _ViewerThumbnailPreviewState extends State<ViewerThumbnailPreview> {
|
class _ViewerThumbnailPreviewState extends State<ViewerThumbnailPreview> {
|
||||||
final ValueNotifier<int> _entryIndexNotifier = ValueNotifier(0);
|
final ValueNotifier<int> _entryIndexNotifier = ValueNotifier(0);
|
||||||
final Debouncer _debouncer = Debouncer(delay: Durations.viewerThumbnailScrollDebounceDelay);
|
final Debouncer _debouncer = Debouncer(delay: ADurations.viewerThumbnailScrollDebounceDelay);
|
||||||
|
|
||||||
List<AvesEntry> get entries => widget.entries;
|
List<AvesEntry> get entries => widget.entries;
|
||||||
|
|
||||||
|
|
|
@ -282,7 +282,7 @@ class ViewerButtonRowContent extends StatelessWidget {
|
||||||
onSelected: (action) {
|
onSelected: (action) {
|
||||||
_popupExpandedNotifier.value = null;
|
_popupExpandedNotifier.value = null;
|
||||||
// wait for the popup menu to hide before proceeding with the action
|
// wait for the popup menu to hide before proceeding with the action
|
||||||
Future.delayed(Durations.popupMenuAnimation * timeDilation, () => actionDelegate.onActionSelected(context, action));
|
Future.delayed(ADurations.popupMenuAnimation * timeDilation, () => actionDelegate.onActionSelected(context, action));
|
||||||
},
|
},
|
||||||
onCanceled: () {
|
onCanceled: () {
|
||||||
_popupExpandedNotifier.value = null;
|
_popupExpandedNotifier.value = null;
|
||||||
|
|
|
@ -5,7 +5,6 @@ import 'dart:ui' as ui;
|
||||||
import 'package:aves/model/entry/entry.dart';
|
import 'package:aves/model/entry/entry.dart';
|
||||||
import 'package:aves/model/entry/extensions/images.dart';
|
import 'package:aves/model/entry/extensions/images.dart';
|
||||||
import 'package:aves/model/entry/extensions/props.dart';
|
import 'package:aves/model/entry/extensions/props.dart';
|
||||||
import 'package:aves_model/aves_model.dart';
|
|
||||||
import 'package:aves/services/wallpaper_service.dart';
|
import 'package:aves/services/wallpaper_service.dart';
|
||||||
import 'package:aves/widgets/common/action_mixins/feedback.dart';
|
import 'package:aves/widgets/common/action_mixins/feedback.dart';
|
||||||
import 'package:aves/widgets/common/extensions/build_context.dart';
|
import 'package:aves/widgets/common/extensions/build_context.dart';
|
||||||
|
@ -14,6 +13,7 @@ import 'package:aves/widgets/dialogs/wallpaper_settings_dialog.dart';
|
||||||
import 'package:aves/widgets/viewer/overlay/viewer_buttons.dart';
|
import 'package:aves/widgets/viewer/overlay/viewer_buttons.dart';
|
||||||
import 'package:aves/widgets/viewer/video/conductor.dart';
|
import 'package:aves/widgets/viewer/video/conductor.dart';
|
||||||
import 'package:aves/widgets/viewer/view/conductor.dart';
|
import 'package:aves/widgets/viewer/view/conductor.dart';
|
||||||
|
import 'package:aves_model/aves_model.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:latlong2/latlong.dart';
|
import 'package:latlong2/latlong.dart';
|
||||||
|
|
|
@ -174,7 +174,7 @@ mixin EntryViewControllerMixin<T extends StatefulWidget> on State<T> {
|
||||||
await _onPageChanged();
|
await _onPageChanged();
|
||||||
|
|
||||||
if (entry.isMotionPhoto && shouldAutoPlayMotionPhoto) {
|
if (entry.isMotionPhoto && shouldAutoPlayMotionPhoto) {
|
||||||
await Future.delayed(Durations.motionPhotoAutoPlayDelay);
|
await Future.delayed(ADurations.motionPhotoAutoPlayDelay);
|
||||||
if (entry == entryNotifier.value) {
|
if (entry == entryNotifier.value) {
|
||||||
multiPageController.page = 1;
|
multiPageController.page = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ import 'package:aves/model/entry/entry.dart';
|
||||||
import 'package:aves/model/entry/extensions/images.dart';
|
import 'package:aves/model/entry/extensions/images.dart';
|
||||||
import 'package:aves/model/settings/enums/entry_background.dart';
|
import 'package:aves/model/settings/enums/entry_background.dart';
|
||||||
import 'package:aves/model/settings/settings.dart';
|
import 'package:aves/model/settings/settings.dart';
|
||||||
|
import 'package:aves/model/view_state.dart';
|
||||||
import 'package:aves/utils/math_utils.dart';
|
import 'package:aves/utils/math_utils.dart';
|
||||||
import 'package:aves/widgets/common/fx/checkered_decoration.dart';
|
import 'package:aves/widgets/common/fx/checkered_decoration.dart';
|
||||||
import 'package:aves/widgets/viewer/visual/entry_page_view.dart';
|
import 'package:aves/widgets/viewer/visual/entry_page_view.dart';
|
||||||
import 'package:aves/model/view_state.dart';
|
|
||||||
import 'package:aves_model/aves_model.dart';
|
import 'package:aves_model/aves_model.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
|
@ -3,8 +3,8 @@ import 'package:aves/model/entry/extensions/images.dart';
|
||||||
import 'package:aves/model/entry/extensions/multipage.dart';
|
import 'package:aves/model/entry/extensions/multipage.dart';
|
||||||
import 'package:aves/theme/durations.dart';
|
import 'package:aves/theme/durations.dart';
|
||||||
import 'package:aves/widgets/common/thumbnail/image.dart';
|
import 'package:aves/widgets/common/thumbnail/image.dart';
|
||||||
import 'package:aves_video/aves_video.dart';
|
|
||||||
import 'package:aves_magnifier/aves_magnifier.dart';
|
import 'package:aves_magnifier/aves_magnifier.dart';
|
||||||
|
import 'package:aves_video/aves_video.dart';
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class _VideoCoverState extends State<VideoCover> {
|
||||||
child: AnimatedOpacity(
|
child: AnimatedOpacity(
|
||||||
opacity: showCover ? 1 : 0,
|
opacity: showCover ? 1 : 0,
|
||||||
curve: Curves.easeInCirc,
|
curve: Curves.easeInCirc,
|
||||||
duration: Durations.viewerVideoPlayerTransition,
|
duration: ADurations.viewerVideoPlayerTransition,
|
||||||
onEnd: () {
|
onEnd: () {
|
||||||
// while cover is fading out, the same controller is used for both the cover and the video,
|
// while cover is fading out, the same controller is used for both the cover and the video,
|
||||||
// and both fire scale boundaries events, so we make sure that in the end
|
// and both fire scale boundaries events, so we make sure that in the end
|
||||||
|
|
Loading…
Reference in a new issue