format
This commit is contained in:
parent
2e775b3906
commit
ca2d2c2026
15 changed files with 48 additions and 50 deletions
|
@ -9,6 +9,11 @@ analyzer:
|
|||
# implicit-casts: false
|
||||
# implicit-dynamic: false
|
||||
|
||||
# cf https://github.com/dart-lang/dart_style/wiki/Configuration
|
||||
formatter:
|
||||
page_width: 240
|
||||
trailing_commas: preserve
|
||||
|
||||
linter:
|
||||
rules:
|
||||
# from 'flutter_lints', excluded
|
||||
|
|
|
@ -4,8 +4,8 @@ import 'package:aves/model/entry/entry.dart';
|
|||
import 'package:aves/model/entry/extensions/keys.dart';
|
||||
import 'package:aves/model/entry/extensions/props.dart';
|
||||
import 'package:aves/model/media/geotiff.dart';
|
||||
import 'package:aves/model/metadata/catalog.dart';
|
||||
import 'package:aves/model/media/video/metadata.dart';
|
||||
import 'package:aves/model/metadata/catalog.dart';
|
||||
import 'package:aves/ref/mime_types.dart';
|
||||
import 'package:aves/services/common/services.dart';
|
||||
import 'package:aves/services/metadata/svg_metadata_service.dart';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:aves/model/filters/container/container.dart';
|
||||
import 'package:aves/model/filters/covered/location.dart';
|
||||
import 'package:aves/model/filters/covered/stored_album.dart';
|
||||
import 'package:aves/model/filters/filters.dart';
|
||||
import 'package:aves/model/filters/covered/location.dart';
|
||||
import 'package:aves/theme/icons.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
|
|
@ -14,4 +14,3 @@ mixin CoveredFilter on CollectionFilter {
|
|||
return super.color(context);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,11 @@ import 'dart:convert';
|
|||
|
||||
import 'package:aves/model/entry/entry.dart';
|
||||
import 'package:aves/model/filters/aspect_ratio.dart';
|
||||
import 'package:aves/model/filters/coordinate.dart';
|
||||
import 'package:aves/model/filters/container/album_group.dart';
|
||||
import 'package:aves/model/filters/container/dynamic_album.dart';
|
||||
import 'package:aves/model/filters/container/set_and.dart';
|
||||
import 'package:aves/model/filters/container/set_or.dart';
|
||||
import 'package:aves/model/filters/coordinate.dart';
|
||||
import 'package:aves/model/filters/covered/location.dart';
|
||||
import 'package:aves/model/filters/covered/stored_album.dart';
|
||||
import 'package:aves/model/filters/covered/tag.dart';
|
||||
|
@ -17,8 +19,6 @@ import 'package:aves/model/filters/placeholder.dart';
|
|||
import 'package:aves/model/filters/query.dart';
|
||||
import 'package:aves/model/filters/rating.dart';
|
||||
import 'package:aves/model/filters/recent.dart';
|
||||
import 'package:aves/model/filters/container/set_and.dart';
|
||||
import 'package:aves/model/filters/container/set_or.dart';
|
||||
import 'package:aves/model/filters/trash.dart';
|
||||
import 'package:aves/model/filters/type.dart';
|
||||
import 'package:aves/model/filters/weekday.dart';
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:async';
|
||||
import 'dart:math';
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:aves/model/app/support.dart';
|
||||
import 'package:aves/model/entry/entry.dart';
|
||||
|
@ -13,7 +14,6 @@ import 'package:equatable/equatable.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:streams_channel/streams_channel.dart';
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
abstract class MediaFetchService {
|
||||
Future<AvesEntry?> getEntry(String uri, String? mimeType, {bool allowUnsized = false});
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import 'package:flutter/painting.dart';
|
||||
|
||||
class AStyles {
|
||||
|
|
|
@ -4,9 +4,9 @@ import 'dart:math';
|
|||
import 'package:aves/app_mode.dart';
|
||||
import 'package:aves/model/entry/entry.dart';
|
||||
import 'package:aves/model/filters/container/dynamic_album.dart';
|
||||
import 'package:aves/model/filters/container/set_and.dart';
|
||||
import 'package:aves/model/filters/filters.dart';
|
||||
import 'package:aves/model/filters/query.dart';
|
||||
import 'package:aves/model/filters/container/set_and.dart';
|
||||
import 'package:aves/model/filters/trash.dart';
|
||||
import 'package:aves/model/query.dart';
|
||||
import 'package:aves/model/selection.dart';
|
||||
|
|
|
@ -10,8 +10,8 @@ import 'package:aves/model/entry/extensions/multipage.dart';
|
|||
import 'package:aves/model/entry/extensions/props.dart';
|
||||
import 'package:aves/model/favourites.dart';
|
||||
import 'package:aves/model/filters/container/dynamic_album.dart';
|
||||
import 'package:aves/model/filters/filters.dart';
|
||||
import 'package:aves/model/filters/container/set_and.dart';
|
||||
import 'package:aves/model/filters/filters.dart';
|
||||
import 'package:aves/model/grouping/common.dart';
|
||||
import 'package:aves/model/highlight.dart';
|
||||
import 'package:aves/model/metadata/date_modifier.dart';
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import 'package:aves/model/source/collection_source.dart';
|
||||
import 'package:aves/model/source/events.dart';
|
||||
import 'package:aves/theme/durations.dart';
|
||||
|
|
|
@ -522,7 +522,7 @@ class _InkResponseStateWidget extends StatefulWidget {
|
|||
if (onSecondaryTap != null) 'secondary tap',
|
||||
if (onSecondaryTapUp != null) 'secondary tap up',
|
||||
if (onSecondaryTapDown != null) 'secondary tap down',
|
||||
if (onSecondaryTapCancel != null) 'secondary tap cancel'
|
||||
if (onSecondaryTapCancel != null) 'secondary tap cancel',
|
||||
];
|
||||
properties.add(IterableProperty<String>('gestures', gestures, ifEmpty: '<none>'));
|
||||
properties.add(DiagnosticsProperty<MouseCursor>('mouseCursor', mouseCursor));
|
||||
|
@ -544,10 +544,7 @@ enum _HighlightType {
|
|||
focus,
|
||||
}
|
||||
|
||||
class _InkResponseState extends State<_InkResponseStateWidget>
|
||||
with AutomaticKeepAliveClientMixin<_InkResponseStateWidget>
|
||||
implements _ParentInkResponseState
|
||||
{
|
||||
class _InkResponseState extends State<_InkResponseStateWidget> with AutomaticKeepAliveClientMixin<_InkResponseStateWidget> implements _ParentInkResponseState {
|
||||
Set<InteractiveInkFeature>? _splashes;
|
||||
InteractiveInkFeature? _currentSplash;
|
||||
bool _hovering = false;
|
||||
|
@ -578,6 +575,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
|
|||
widget.parentState?.markChildInkResponsePressed(this, nowAnyPressed);
|
||||
}
|
||||
}
|
||||
|
||||
bool get _anyChildInkResponsePressed => _activeChildren.isNotEmpty;
|
||||
|
||||
void activateOnIntent(Intent? intent) {
|
||||
|
@ -642,9 +640,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
|
|||
}
|
||||
initStatesController();
|
||||
}
|
||||
if (widget.radius != oldWidget.radius ||
|
||||
widget.highlightShape != oldWidget.highlightShape ||
|
||||
widget.borderRadius != oldWidget.borderRadius) {
|
||||
if (widget.radius != oldWidget.radius || widget.highlightShape != oldWidget.highlightShape || widget.borderRadius != oldWidget.borderRadius) {
|
||||
final InkHighlight? hoverHighlight = _highlights[_HighlightType.hover];
|
||||
if (hoverHighlight != null) {
|
||||
hoverHighlight.dispose();
|
||||
|
@ -730,8 +726,8 @@ class _InkResponseState extends State<_InkResponseStateWidget>
|
|||
|
||||
if (value) {
|
||||
if (highlight == null) {
|
||||
final Color resolvedOverlayColor = widget.overlayColor?.resolve(statesController.value)
|
||||
?? switch (type) {
|
||||
final Color resolvedOverlayColor = widget.overlayColor?.resolve(statesController.value) ??
|
||||
switch (type) {
|
||||
// Use the backwards compatible defaults
|
||||
_HighlightType.pressed => widget.highlightColor ?? Theme.of(context).highlightColor,
|
||||
_HighlightType.focus => widget.focusColor ?? Theme.of(context).focusColor,
|
||||
|
@ -846,6 +842,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
|
|||
}
|
||||
|
||||
bool _hasFocus = false;
|
||||
|
||||
void handleFocusUpdate(bool hasFocus) {
|
||||
_hasFocus = hasFocus;
|
||||
// Set here rather than updateHighlight because this widget's
|
||||
|
@ -978,21 +975,17 @@ class _InkResponseState extends State<_InkResponseStateWidget>
|
|||
}
|
||||
|
||||
bool _primaryButtonEnabled(_InkResponseStateWidget widget) {
|
||||
return widget.onTap != null
|
||||
|| widget.onDoubleTap != null
|
||||
|| widget.onLongPress != null
|
||||
|| widget.onTapUp != null
|
||||
|| widget.onTapDown != null;
|
||||
return widget.onTap != null || widget.onDoubleTap != null || widget.onLongPress != null || widget.onTapUp != null || widget.onTapDown != null;
|
||||
}
|
||||
|
||||
bool _secondaryButtonEnabled(_InkResponseStateWidget widget) {
|
||||
return widget.onSecondaryTap != null
|
||||
|| widget.onSecondaryTapUp != null
|
||||
|| widget.onSecondaryTapDown != null;
|
||||
return widget.onSecondaryTap != null || widget.onSecondaryTapUp != null || widget.onSecondaryTapDown != null;
|
||||
}
|
||||
|
||||
bool get enabled => isWidgetEnabled(widget);
|
||||
|
||||
bool get _primaryEnabled => _primaryButtonEnabled(widget);
|
||||
|
||||
bool get _secondaryEnabled => _secondaryButtonEnabled(widget);
|
||||
|
||||
void handleMouseEnter(PointerEnterEvent event) {
|
||||
|
@ -1040,6 +1033,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
|
|||
_HighlightType.hover => widget.overlayColor?.resolve(hovered) ?? widget.hoverColor ?? theme.hoverColor,
|
||||
};
|
||||
}
|
||||
|
||||
for (final _HighlightType type in _highlights.keys) {
|
||||
_highlights[type]?.color = getHighlightColorForType(type);
|
||||
}
|
||||
|
|
|
@ -43,10 +43,12 @@ abstract class AvesSearchDelegate extends SearchDelegate {
|
|||
final animate = context.read<Settings>().animate;
|
||||
return canPop
|
||||
? IconButton(
|
||||
icon: animate ? AnimatedIcon(
|
||||
icon: animate
|
||||
? AnimatedIcon(
|
||||
icon: AnimatedIcons.menu_arrow,
|
||||
progress: transitionAnimation,
|
||||
): const Icon(Icons.arrow_back),
|
||||
)
|
||||
: const Icon(Icons.arrow_back),
|
||||
onPressed: () => goBack(context),
|
||||
tooltip: MaterialLocalizations.of(context).backButtonTooltip,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue