packages upgrade, super param

This commit is contained in:
Thibault Deckers 2022-05-12 21:48:46 +09:00
parent ed148712d2
commit 90bef2a5ed
228 changed files with 597 additions and 643 deletions

View file

@ -11,9 +11,9 @@ class AvesColorsProvider extends StatelessWidget {
final Widget child; final Widget child;
const AvesColorsProvider({ const AvesColorsProvider({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -74,9 +74,9 @@ class DurationsProvider extends StatelessWidget {
final Widget child; final Widget child;
const DurationsProvider({ const DurationsProvider({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -10,7 +10,7 @@ import 'package:flutter/material.dart';
class AboutPage extends StatelessWidget { class AboutPage extends StatelessWidget {
static const routeName = '/about'; static const routeName = '/about';
const AboutPage({Key? key}) : super(key: key); const AboutPage({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -10,7 +10,7 @@ import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
class AppReference extends StatefulWidget { class AppReference extends StatefulWidget {
const AppReference({Key? key}) : super(key: key); const AppReference({super.key});
@override @override
State<AppReference> createState() => _AppReferenceState(); State<AppReference> createState() => _AppReferenceState();

View file

@ -25,7 +25,7 @@ import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class BugReport extends StatefulWidget { class BugReport extends StatefulWidget {
const BugReport({Key? key}) : super(key: key); const BugReport({super.key});
@override @override
State<BugReport> createState() => _BugReportState(); State<BugReport> createState() => _BugReportState();

View file

@ -5,7 +5,7 @@ import 'package:aves/widgets/viewer/info/common.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class AboutCredits extends StatelessWidget { class AboutCredits extends StatelessWidget {
const AboutCredits({Key? key}) : super(key: key); const AboutCredits({super.key});
static const translators = { static const translators = {
'Bahasa Indonesia': 'MeFinity', 'Bahasa Indonesia': 'MeFinity',

View file

@ -11,7 +11,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class Licenses extends StatefulWidget { class Licenses extends StatefulWidget {
const Licenses({Key? key}) : super(key: key); const Licenses({super.key});
@override @override
State<Licenses> createState() => _LicensesState(); State<Licenses> createState() => _LicensesState();
@ -121,9 +121,9 @@ class LicenseRow extends StatelessWidget {
final Dependency package; final Dependency package;
const LicenseRow({ const LicenseRow({
Key? key, super.key,
required this.package, required this.package,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -6,9 +6,7 @@ import 'package:flutter/services.dart';
class PolicyPage extends StatefulWidget { class PolicyPage extends StatefulWidget {
static const routeName = '/about/policy'; static const routeName = '/about/policy';
const PolicyPage({ const PolicyPage({super.key});
Key? key,
}) : super(key: key);
@override @override
State<PolicyPage> createState() => _PolicyPageState(); State<PolicyPage> createState() => _PolicyPageState();

View file

@ -46,9 +46,9 @@ class AvesApp extends StatefulWidget {
static final GlobalKey<NavigatorState> navigatorKey = GlobalKey(debugLabel: 'app-navigator'); static final GlobalKey<NavigatorState> navigatorKey = GlobalKey(debugLabel: 'app-navigator');
const AvesApp({ const AvesApp({
Key? key, super.key,
required this.flavor, required this.flavor,
}) : super(key: key); });
@override @override
State<AvesApp> createState() => _AvesAppState(); State<AvesApp> createState() => _AvesAppState();

View file

@ -36,10 +36,10 @@ class CollectionAppBar extends StatefulWidget {
final CollectionLens collection; final CollectionLens collection;
const CollectionAppBar({ const CollectionAppBar({
Key? key, super.key,
required this.appBarHeightNotifier, required this.appBarHeightNotifier,
required this.collection, required this.collection,
}) : super(key: key); });
@override @override
State<CollectionAppBar> createState() => _CollectionAppBarState(); State<CollectionAppBar> createState() => _CollectionAppBarState();

View file

@ -51,9 +51,9 @@ class CollectionGrid extends StatefulWidget {
static const double spacing = 2; static const double spacing = 2;
const CollectionGrid({ const CollectionGrid({
Key? key, super.key,
required this.settingsRouteKey, required this.settingsRouteKey,
}) : super(key: key); });
@override @override
State<CollectionGrid> createState() => _CollectionGridState(); State<CollectionGrid> createState() => _CollectionGridState();

View file

@ -32,11 +32,11 @@ class CollectionPage extends StatefulWidget {
final bool Function(AvesEntry element)? highlightTest; final bool Function(AvesEntry element)? highlightTest;
const CollectionPage({ const CollectionPage({
Key? key, super.key,
required this.source, required this.source,
required this.filters, required this.filters,
this.highlightTest, this.highlightTest,
}) : super(key: key); });
@override @override
State<CollectionPage> createState() => _CollectionPageState(); State<CollectionPage> createState() => _CollectionPageState();

View file

@ -15,10 +15,10 @@ class CollectionDraggableThumbLabel extends StatelessWidget {
final double offsetY; final double offsetY;
const CollectionDraggableThumbLabel({ const CollectionDraggableThumbLabel({
Key? key, super.key,
required this.collection, required this.collection,
required this.offsetY, required this.offsetY,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -12,12 +12,11 @@ class FilterBar extends StatefulWidget {
final FilterCallback? onTap; final FilterCallback? onTap;
FilterBar({ FilterBar({
Key? key, super.key,
required Set<CollectionFilter> filters, required Set<CollectionFilter> filters,
required this.removable, required this.removable,
this.onTap, this.onTap,
}) : filters = List<CollectionFilter>.from(filters)..sort(), }) : filters = List<CollectionFilter>.from(filters)..sort();
super(key: key);
@override @override
State<FilterBar> createState() => _FilterBarState(); State<FilterBar> createState() => _FilterBarState();

View file

@ -13,10 +13,10 @@ class AlbumSectionHeader extends StatelessWidget {
final String? directory, albumName; final String? directory, albumName;
const AlbumSectionHeader({ const AlbumSectionHeader({
Key? key, super.key,
required this.directory, required this.directory,
required this.albumName, required this.albumName,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -17,11 +17,11 @@ class CollectionSectionHeader extends StatelessWidget {
final double height; final double height;
const CollectionSectionHeader({ const CollectionSectionHeader({
Key? key, super.key,
required this.collection, required this.collection,
required this.sectionKey, required this.sectionKey,
required this.height, required this.height,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -9,9 +9,9 @@ class DaySectionHeader<T> extends StatelessWidget {
final DateTime? date; final DateTime? date;
const DaySectionHeader({ const DaySectionHeader({
Key? key, super.key,
required this.date, required this.date,
}) : super(key: key); });
// Examples (en_US): // Examples (en_US):
// `MMMMd`: `April 15` // `MMMMd`: `April 15`
@ -56,9 +56,9 @@ class MonthSectionHeader<T> extends StatelessWidget {
final DateTime? date; final DateTime? date;
const MonthSectionHeader({ const MonthSectionHeader({
Key? key, super.key,
required this.date, required this.date,
}) : super(key: key); });
static String _formatDate(BuildContext context, DateTime? date) { static String _formatDate(BuildContext context, DateTime? date) {
final l10n = context.l10n; final l10n = context.l10n;

View file

@ -7,9 +7,9 @@ class RatingSectionHeader<T> extends StatelessWidget {
final int rating; final int rating;
const RatingSectionHeader({ const RatingSectionHeader({
Key? key, super.key,
required this.rating, required this.rating,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -14,9 +14,9 @@ class EntryListDetails extends StatelessWidget {
final AvesEntry entry; final AvesEntry entry;
const EntryListDetails({ const EntryListDetails({
Key? key, super.key,
required this.entry, required this.entry,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -14,10 +14,10 @@ class EntryListDetailsTheme extends StatelessWidget {
static const double titleDetailPadding = 6; static const double titleDetailPadding = 6;
const EntryListDetailsTheme({ const EntryListDetailsTheme({
Key? key, super.key,
required this.extent, required this.extent,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -1,6 +1,5 @@
import 'package:aves/model/entry.dart'; import 'package:aves/model/entry.dart';
import 'package:aves/model/source/collection_lens.dart'; import 'package:aves/model/source/collection_lens.dart';
import 'package:aves/model/source/enums.dart';
import 'package:aves/model/source/section_keys.dart'; import 'package:aves/model/source/section_keys.dart';
import 'package:aves/widgets/collection/grid/headers/any.dart'; import 'package:aves/widgets/collection/grid/headers/any.dart';
import 'package:aves/widgets/common/grid/section_layout.dart'; import 'package:aves/widgets/common/grid/section_layout.dart';
@ -10,29 +9,20 @@ class SectionedEntryListLayoutProvider extends SectionedListLayoutProvider<AvesE
final CollectionLens collection; final CollectionLens collection;
const SectionedEntryListLayoutProvider({ const SectionedEntryListLayoutProvider({
Key? key, super.key,
required this.collection, required this.collection,
required double scrollableWidth, required super.scrollableWidth,
required TileLayout tileLayout, required super.tileLayout,
required int columnCount, required super.columnCount,
required double spacing, required super.spacing,
required double horizontalPadding, required super.horizontalPadding,
required double tileExtent, required double tileExtent,
required Widget Function(AvesEntry entry) tileBuilder, required super.tileBuilder,
required Duration tileAnimationDelay, required super.tileAnimationDelay,
required Widget child, required super.child,
}) : super( }) : super(
key: key,
scrollableWidth: scrollableWidth,
tileLayout: tileLayout,
columnCount: columnCount,
spacing: spacing,
horizontalPadding: horizontalPadding,
tileWidth: tileExtent, tileWidth: tileExtent,
tileHeight: tileExtent, tileHeight: tileExtent,
tileBuilder: tileBuilder,
tileAnimationDelay: tileAnimationDelay,
child: child,
); );
@override @override

View file

@ -21,13 +21,13 @@ class InteractiveTile extends StatelessWidget {
final ValueNotifier<bool>? isScrollingNotifier; final ValueNotifier<bool>? isScrollingNotifier;
const InteractiveTile({ const InteractiveTile({
Key? key, super.key,
required this.collection, required this.collection,
required this.entry, required this.entry,
required this.thumbnailExtent, required this.thumbnailExtent,
required this.tileLayout, required this.tileLayout,
this.isScrollingNotifier, this.isScrollingNotifier,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -101,7 +101,7 @@ class Tile extends StatelessWidget {
final Object? Function()? heroTagger; final Object? Function()? heroTagger;
const Tile({ const Tile({
Key? key, super.key,
required this.entry, required this.entry,
required this.thumbnailExtent, required this.thumbnailExtent,
required this.tileLayout, required this.tileLayout,
@ -109,7 +109,7 @@ class Tile extends StatelessWidget {
this.highlightable = false, this.highlightable = false,
this.isScrollingNotifier, this.isScrollingNotifier,
this.heroTagger, this.heroTagger,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -13,10 +13,10 @@ class EntryQueryBar extends StatefulWidget {
static const preferredHeight = kToolbarHeight; static const preferredHeight = kToolbarHeight;
const EntryQueryBar({ const EntryQueryBar({
Key? key, super.key,
required this.queryNotifier, required this.queryNotifier,
required this.focusNode, required this.focusNode,
}) : super(key: key); });
@override @override
State<EntryQueryBar> createState() => _EntryQueryBarState(); State<EntryQueryBar> createState() => _EntryQueryBarState();

View file

@ -148,12 +148,12 @@ class ReportOverlay<T> extends StatefulWidget {
final void Function(Set<T> processed) onDone; final void Function(Set<T> processed) onDone;
const ReportOverlay({ const ReportOverlay({
Key? key, super.key,
required this.opStream, required this.opStream,
required this.itemCount, required this.itemCount,
required this.onCancel, required this.onCancel,
required this.onDone, required this.onDone,
}) : super(key: key); });
@override @override
State<ReportOverlay<T>> createState() => _ReportOverlayState<T>(); State<ReportOverlay<T>> createState() => _ReportOverlayState<T>();
@ -281,12 +281,12 @@ class _FeedbackMessage extends StatefulWidget {
final Color progressColor; final Color progressColor;
const _FeedbackMessage({ const _FeedbackMessage({
Key? key, super.key,
required this.message, required this.message,
required this.progressColor, required this.progressColor,
this.start, this.start,
this.stop, this.stop,
}) : super(key: key); });
@override @override
State<_FeedbackMessage> createState() => _FeedbackMessageState(); State<_FeedbackMessage> createState() => _FeedbackMessageState();
@ -365,9 +365,9 @@ class ActionFeedback extends StatefulWidget {
final Widget? child; final Widget? child;
const ActionFeedback({ const ActionFeedback({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
State<ActionFeedback> createState() => _ActionFeedbackState(); State<ActionFeedback> createState() => _ActionFeedbackState();

View file

@ -13,10 +13,10 @@ class SourceStateAwareAppBarTitle extends StatelessWidget {
final CollectionSource source; final CollectionSource source;
const SourceStateAwareAppBarTitle({ const SourceStateAwareAppBarTitle({
Key? key, super.key,
required this.title, required this.title,
required this.source, required this.source,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -54,9 +54,9 @@ class SourceStateSubtitle extends StatelessWidget {
final CollectionSource source; final CollectionSource source;
const SourceStateSubtitle({ const SourceStateSubtitle({
Key? key, super.key,
required this.source, required this.source,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -5,10 +5,10 @@ class InteractiveAppBarTitle extends StatelessWidget {
final Widget child; final Widget child;
const InteractiveAppBarTitle({ const InteractiveAppBarTitle({
Key? key, super.key,
this.onTap, this.onTap,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -31,15 +31,14 @@ class AvesHighlightView extends StatelessWidget {
final TextStyle? textStyle; final TextStyle? textStyle;
AvesHighlightView({ AvesHighlightView({
Key? key, super.key,
required String input, required String input,
this.language, this.language,
this.theme = const {}, this.theme = const {},
this.padding, this.padding,
this.textStyle, this.textStyle,
int tabSize = 8, // TODO: https://github.com/flutter/flutter/issues/50087 int tabSize = 8, // TODO: https://github.com/flutter/flutter/issues/50087
}) : source = input.replaceAll('\t', ' ' * tabSize), }) : source = input.replaceAll('\t', ' ' * tabSize);
super(key: key);
List<TextSpan> _convert(List<Node> nodes) { List<TextSpan> _convert(List<Node> nodes) {
final spans = <TextSpan>[]; final spans = <TextSpan>[];

View file

@ -8,14 +8,14 @@ class CircularIndicator extends StatefulWidget {
final Widget center; final Widget center;
const CircularIndicator({ const CircularIndicator({
Key? key, super.key,
required this.radius, required this.radius,
required this.lineWidth, required this.lineWidth,
required this.percent, required this.percent,
required this.background, required this.background,
required this.foreground, required this.foreground,
required this.center, required this.center,
}) : super(key: key); });
@override @override
State<CircularIndicator> createState() => _CircularIndicatorState(); State<CircularIndicator> createState() => _CircularIndicatorState();
@ -53,12 +53,12 @@ class Circle extends StatelessWidget {
final Color color; final Color color;
const Circle({ const Circle({
Key? key, super.key,
required this.radius, required this.radius,
required this.lineWidth, required this.lineWidth,
required this.percent, required this.percent,
required this.color, required this.color,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -12,11 +12,11 @@ class ColorListTile extends StatelessWidget {
static const double radius = 16.0; static const double radius = 16.0;
const ColorListTile({ const ColorListTile({
Key? key, super.key,
required this.title, required this.title,
required this.value, required this.value,
required this.onChanged, required this.onChanged,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -51,9 +51,9 @@ class ColorPickerDialog extends StatefulWidget {
final Color initialValue; final Color initialValue;
const ColorPickerDialog({ const ColorPickerDialog({
Key? key, super.key,
required this.initialValue, required this.initialValue,
}) : super(key: key); });
@override @override
State<ColorPickerDialog> createState() => _ColorPickerDialogState(); State<ColorPickerDialog> createState() => _ColorPickerDialogState();

View file

@ -61,7 +61,7 @@ class DraggableScrollbar extends StatefulWidget {
final ScrollView child; final ScrollView child;
DraggableScrollbar({ DraggableScrollbar({
Key? key, super.key,
required this.backgroundColor, required this.backgroundColor,
required this.scrollThumbSize, required this.scrollThumbSize,
required this.scrollThumbBuilder, required this.scrollThumbBuilder,
@ -73,8 +73,7 @@ class DraggableScrollbar extends StatefulWidget {
required this.labelTextBuilder, required this.labelTextBuilder,
required this.crumbTextBuilder, required this.crumbTextBuilder,
required this.child, required this.child,
}) : assert(child.scrollDirection == Axis.vertical), }) : assert(child.scrollDirection == Axis.vertical);
super(key: key);
@override @override
State<DraggableScrollbar> createState() => _DraggableScrollbarState(); State<DraggableScrollbar> createState() => _DraggableScrollbarState();
@ -116,11 +115,11 @@ class ScrollLabel extends StatelessWidget {
final Widget child; final Widget child;
const ScrollLabel({ const ScrollLabel({
Key? key, super.key,
required this.child, required this.child,
required this.animation, required this.animation,
required this.backgroundColor, required this.backgroundColor,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -418,10 +417,10 @@ class SlideFadeTransition extends StatelessWidget {
final Widget child; final Widget child;
const SlideFadeTransition({ const SlideFadeTransition({
Key? key, super.key,
required this.animation, required this.animation,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -7,7 +7,7 @@ import 'package:provider/provider.dart';
// - a vertically scrollable body. // - a vertically scrollable body.
// It will prevent the body from scrolling when a user swipe from bottom to use Android Q style navigation gestures. // It will prevent the body from scrolling when a user swipe from bottom to use Android Q style navigation gestures.
class BottomGestureAreaProtector extends StatelessWidget { class BottomGestureAreaProtector extends StatelessWidget {
const BottomGestureAreaProtector({Key? key}) : super(key: key); const BottomGestureAreaProtector({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -27,7 +27,7 @@ class BottomGestureAreaProtector extends StatelessWidget {
// It will prevent the body from scrolling when a user swipe from edges to use Android Q style navigation gestures. // It will prevent the body from scrolling when a user swipe from edges to use Android Q style navigation gestures.
class SideGestureAreaProtector extends StatelessWidget { class SideGestureAreaProtector extends StatelessWidget {
const SideGestureAreaProtector({Key? key}) : super(key: key); const SideGestureAreaProtector({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -63,9 +63,9 @@ class GestureAreaProtectorStack extends StatelessWidget {
final Widget child; final Widget child;
const GestureAreaProtectorStack({ const GestureAreaProtectorStack({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -79,7 +79,7 @@ class GestureAreaProtectorStack extends StatelessWidget {
} }
class BottomPaddingSliver extends StatelessWidget { class BottomPaddingSliver extends StatelessWidget {
const BottomPaddingSliver({Key? key}) : super(key: key); const BottomPaddingSliver({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -13,14 +13,14 @@ class LinkChip extends StatelessWidget {
static const borderRadius = BorderRadius.all(Radius.circular(8)); static const borderRadius = BorderRadius.all(Radius.circular(8));
const LinkChip({ const LinkChip({
Key? key, super.key,
this.leading, this.leading,
required this.text, required this.text,
this.urlString, this.urlString,
this.color, this.color,
this.textStyle, this.textStyle,
this.onTap, this.onTap,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -8,10 +8,10 @@ class MarkdownContainer extends StatelessWidget {
final TextDirection? textDirection; final TextDirection? textDirection;
const MarkdownContainer({ const MarkdownContainer({
Key? key, super.key,
required this.data, required this.data,
this.textDirection, this.textDirection,
}) : super(key: key); });
static const double maxWidth = 460; static const double maxWidth = 460;

View file

@ -7,10 +7,10 @@ class MenuRow extends StatelessWidget {
final Widget? icon; final Widget? icon;
const MenuRow({ const MenuRow({
Key? key, super.key,
required this.text, required this.text,
this.icon, this.icon,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -37,9 +37,9 @@ class MenuIconTheme extends StatelessWidget {
final Widget child; final Widget child;
const MenuIconTheme({ const MenuIconTheme({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -60,12 +60,12 @@ class PopupMenuItemExpansionPanel<T> extends StatefulWidget {
final List<PopupMenuEntry<T>> items; final List<PopupMenuEntry<T>> items;
const PopupMenuItemExpansionPanel({ const PopupMenuItemExpansionPanel({
Key? key, super.key,
this.enabled = true, this.enabled = true,
required this.icon, required this.icon,
required this.title, required this.title,
required this.items, required this.items,
}) : super(key: key); });
@override @override
State<PopupMenuItemExpansionPanel<T>> createState() => _PopupMenuItemExpansionPanelState<T>(); State<PopupMenuItemExpansionPanel<T>> createState() => _PopupMenuItemExpansionPanelState<T>();

View file

@ -7,13 +7,13 @@ class MultiCrossFader extends StatefulWidget {
final Widget child; final Widget child;
const MultiCrossFader({ const MultiCrossFader({
Key? key, super.key,
required this.duration, required this.duration,
this.fadeCurve = Curves.linear, this.fadeCurve = Curves.linear,
this.sizeCurve = Curves.linear, this.sizeCurve = Curves.linear,
this.alignment = Alignment.topCenter, this.alignment = Alignment.topCenter,
required this.child, required this.child,
}) : super(key: key); });
@override @override
State<MultiCrossFader> createState() => _MultiCrossFaderState(); State<MultiCrossFader> createState() => _MultiCrossFaderState();

View file

@ -12,7 +12,7 @@ class OutlinedText extends StatelessWidget {
static const widgetSpanAlignment = PlaceholderAlignment.middle; static const widgetSpanAlignment = PlaceholderAlignment.middle;
const OutlinedText({ const OutlinedText({
Key? key, super.key,
required this.textSpans, required this.textSpans,
double? outlineWidth, double? outlineWidth,
Color? outlineColor, Color? outlineColor,
@ -20,8 +20,7 @@ class OutlinedText extends StatelessWidget {
this.textAlign, this.textAlign,
}) : outlineWidth = outlineWidth ?? 1, }) : outlineWidth = outlineWidth ?? 1,
outlineColor = outlineColor ?? Colors.black, outlineColor = outlineColor ?? Colors.black,
outlineBlurSigma = outlineBlurSigma ?? 0, outlineBlurSigma = outlineBlurSigma ?? 0;
super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -4,41 +4,24 @@ class AvesPopupMenuButton<T> extends PopupMenuButton<T> {
final VoidCallback? onMenuOpened; final VoidCallback? onMenuOpened;
const AvesPopupMenuButton({ const AvesPopupMenuButton({
Key? key, super.key,
required PopupMenuItemBuilder<T> itemBuilder, required super.itemBuilder,
T? initialValue, super.initialValue,
PopupMenuItemSelected<T>? onSelected, super.onSelected,
PopupMenuCanceled? onCanceled, super.onCanceled,
String? tooltip, super.tooltip,
double? elevation, super.elevation,
EdgeInsetsGeometry padding = const EdgeInsets.all(8.0), super.padding = const EdgeInsets.all(8.0),
Widget? child, super.child,
Widget? icon, super.icon,
Offset offset = Offset.zero, super.offset = Offset.zero,
bool enabled = true, super.enabled = true,
ShapeBorder? shape, super.shape,
Color? color, super.color,
bool? enableFeedback, super.enableFeedback,
double? iconSize, super.iconSize,
this.onMenuOpened, this.onMenuOpened,
}) : super( });
key: key,
itemBuilder: itemBuilder,
initialValue: initialValue,
onSelected: onSelected,
onCanceled: onCanceled,
tooltip: tooltip,
elevation: elevation,
padding: padding,
child: child,
icon: icon,
iconSize: iconSize,
offset: offset,
enabled: enabled,
shape: shape,
color: color,
enableFeedback: enableFeedback,
);
@override @override
PopupMenuButtonState<T> createState() => _AvesPopupMenuButtonState<T>(); PopupMenuButtonState<T> createState() => _AvesPopupMenuButtonState<T>();

View file

@ -12,13 +12,13 @@ class QueryBar extends StatefulWidget {
final bool editable; final bool editable;
const QueryBar({ const QueryBar({
Key? key, super.key,
required this.queryNotifier, required this.queryNotifier,
this.focusNode, this.focusNode,
this.icon, this.icon,
this.hintText, this.hintText,
this.editable = true, this.editable = true,
}) : super(key: key); });
@override @override
State<QueryBar> createState() => _QueryBarState(); State<QueryBar> createState() => _QueryBarState();

View file

@ -20,7 +20,7 @@ class ReselectableRadioListTile<T> extends StatelessWidget {
bool get checked => value == groupValue; bool get checked => value == groupValue;
const ReselectableRadioListTile({ const ReselectableRadioListTile({
Key? key, super.key,
required this.value, required this.value,
required this.groupValue, required this.groupValue,
required this.onChanged, required this.onChanged,
@ -35,8 +35,7 @@ class ReselectableRadioListTile<T> extends StatelessWidget {
this.selected = false, this.selected = false,
this.controlAffinity = ListTileControlAffinity.platform, this.controlAffinity = ListTileControlAffinity.platform,
this.autofocus = false, this.autofocus = false,
}) : assert(!isThreeLine || subtitle != null), }) : assert(!isThreeLine || subtitle != null);
super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -9,14 +9,14 @@ class SliderListTile extends StatelessWidget {
final int? divisions; final int? divisions;
const SliderListTile({ const SliderListTile({
Key? key, super.key,
required this.title, required this.title,
required this.value, required this.value,
required this.onChanged, required this.onChanged,
this.min = 0.0, this.min = 0.0,
this.max = 1.0, this.max = 1.0,
this.divisions, this.divisions,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -7,12 +7,12 @@ class WheelSelector<T> extends StatefulWidget {
final TextAlign textAlign; final TextAlign textAlign;
const WheelSelector({ const WheelSelector({
Key? key, super.key,
required this.valueNotifier, required this.valueNotifier,
required this.values, required this.values,
required this.textStyle, required this.textStyle,
required this.textAlign, required this.textAlign,
}) : super(key: key); });
@override @override
State<WheelSelector<T>> createState() => _WheelSelectorState<T>(); State<WheelSelector<T>> createState() => _WheelSelectorState<T>();

View file

@ -12,9 +12,9 @@ class DoubleBackPopScope extends StatefulWidget {
final Widget child; final Widget child;
const DoubleBackPopScope({ const DoubleBackPopScope({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
State<DoubleBackPopScope> createState() => _DoubleBackPopScopeState(); State<DoubleBackPopScope> createState() => _DoubleBackPopScopeState();

View file

@ -15,7 +15,7 @@ class ExpandableFilterRow extends StatelessWidget {
final OffsetFilterCallback? onLongPress; final OffsetFilterCallback? onLongPress;
const ExpandableFilterRow({ const ExpandableFilterRow({
Key? key, super.key,
this.title, this.title,
required this.filters, required this.filters,
required this.expandedNotifier, required this.expandedNotifier,
@ -23,7 +23,7 @@ class ExpandableFilterRow extends StatelessWidget {
this.heroTypeBuilder, this.heroTypeBuilder,
required this.onTap, required this.onTap,
required this.onLongPress, required this.onLongPress,
}) : super(key: key); });
static const double horizontalPadding = 8; static const double horizontalPadding = 8;
static const double verticalPadding = 8; static const double verticalPadding = 8;

View file

@ -14,11 +14,11 @@ class FavouriteToggler extends StatefulWidget {
final VoidCallback? onPressed; final VoidCallback? onPressed;
const FavouriteToggler({ const FavouriteToggler({
Key? key, super.key,
required this.entries, required this.entries,
this.isMenuItem = false, this.isMenuItem = false,
this.onPressed, this.onPressed,
}) : super(key: key); });
@override @override
State<FavouriteToggler> createState() => _FavouriteTogglerState(); State<FavouriteToggler> createState() => _FavouriteTogglerState();

View file

@ -9,10 +9,10 @@ class BlurredRect extends StatelessWidget {
final Widget child; final Widget child;
const BlurredRect({ const BlurredRect({
Key? key, super.key,
this.enabled = true, this.enabled = true,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -33,11 +33,11 @@ class BlurredRRect extends StatelessWidget {
final Widget child; final Widget child;
const BlurredRRect({ const BlurredRRect({
Key? key, super.key,
this.enabled = true, this.enabled = true,
required this.borderRadius, required this.borderRadius,
required this.child, required this.child,
}) : super(key: key); });
factory BlurredRRect.all({ factory BlurredRRect.all({
Key? key, Key? key,
@ -72,10 +72,10 @@ class BlurredOval extends StatelessWidget {
final Widget child; final Widget child;
const BlurredOval({ const BlurredOval({
Key? key, super.key,
this.enabled = true, this.enabled = true,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -15,7 +15,7 @@ class Sweeper extends StatefulWidget {
final VoidCallback? onSweepEnd; final VoidCallback? onSweepEnd;
const Sweeper({ const Sweeper({
Key? key, super.key,
required this.builder, required this.builder,
this.startAngle = -pi / 2, this.startAngle = -pi / 2,
this.sweepAngle = pi / 4, this.sweepAngle = pi / 4,
@ -23,7 +23,7 @@ class Sweeper extends StatefulWidget {
required this.toggledNotifier, required this.toggledNotifier,
this.centerSweep = true, this.centerSweep = true,
this.onSweepEnd, this.onSweepEnd,
}) : super(key: key); });
@override @override
State<Sweeper> createState() => _SweeperState(); State<Sweeper> createState() => _SweeperState();

View file

@ -16,13 +16,13 @@ class TransitionImage extends StatefulWidget {
final Color? background; final Color? background;
const TransitionImage({ const TransitionImage({
Key? key, super.key,
required this.image, required this.image,
required this.animation, required this.animation,
this.width, this.width,
this.height, this.height,
this.background, this.background,
}) : super(key: key); });
@override @override
State<TransitionImage> createState() => _TransitionImageState(); State<TransitionImage> createState() => _TransitionImageState();

View file

@ -9,9 +9,9 @@ class DraggableCrumbLabel extends StatelessWidget {
final String label; final String label;
const DraggableCrumbLabel({ const DraggableCrumbLabel({
Key? key, super.key,
required this.label, required this.label,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -30,10 +30,10 @@ class DraggableThumbLabel<T> extends StatelessWidget {
final List<String> Function(BuildContext context, T item) lineBuilder; final List<String> Function(BuildContext context, T item) lineBuilder;
const DraggableThumbLabel({ const DraggableThumbLabel({
Key? key, super.key,
required this.offsetY, required this.offsetY,
required this.lineBuilder, required this.lineBuilder,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -16,13 +16,13 @@ class SectionHeader<T> extends StatelessWidget {
final bool selectable; final bool selectable;
const SectionHeader({ const SectionHeader({
Key? key, super.key,
required this.sectionKey, required this.sectionKey,
this.leading, this.leading,
required this.title, required this.title,
this.trailing, this.trailing,
this.selectable = true, this.selectable = true,
}) : super(key: key); });
static const leadingDimension = 32.0; static const leadingDimension = 32.0;
static const padding = EdgeInsets.all(16); static const padding = EdgeInsets.all(16);
@ -39,6 +39,7 @@ class SectionHeader<T> extends StatelessWidget {
child: Text.rich( child: Text.rich(
TextSpan( TextSpan(
children: [ children: [
// TODO TLAD [flutter 3] https://github.com/flutter/flutter/issues/103615
WidgetSpan( WidgetSpan(
alignment: widgetSpanAlignment, alignment: widgetSpanAlignment,
child: _SectionSelectableLeading<T>( child: _SectionSelectableLeading<T>(
@ -127,12 +128,12 @@ class _SectionSelectableLeading<T> extends StatelessWidget {
final VoidCallback? onPressed; final VoidCallback? onPressed;
const _SectionSelectableLeading({ const _SectionSelectableLeading({
Key? key, super.key,
this.selectable = true, this.selectable = true,
required this.sectionKey, required this.sectionKey,
required this.browsingBuilder, required this.browsingBuilder,
required this.onPressed, required this.onPressed,
}) : super(key: key); });
static const leadingDimension = SectionHeader.leadingDimension; static const leadingDimension = SectionHeader.leadingDimension;
@ -180,10 +181,10 @@ class _SectionSelectingLeading<T> extends StatelessWidget {
final VoidCallback? onPressed; final VoidCallback? onPressed;
const _SectionSelectingLeading({ const _SectionSelectingLeading({
Key? key, super.key,
required this.sectionKey, required this.sectionKey,
required this.onPressed, required this.onPressed,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -17,13 +17,13 @@ class GridItemTracker<T> extends StatefulWidget {
final Widget child; final Widget child;
const GridItemTracker({ const GridItemTracker({
Key? key, super.key,
required this.scrollableKey, required this.scrollableKey,
required this.appBarHeightNotifier, required this.appBarHeightNotifier,
required this.tileLayout, required this.tileLayout,
required this.scrollController, required this.scrollController,
required this.child, required this.child,
}) : super(key: key); });
@override @override
State<GridItemTracker<T>> createState() => _GridItemTrackerState<T>(); State<GridItemTracker<T>> createState() => _GridItemTrackerState<T>();

View file

@ -13,11 +13,11 @@ class GridItemSelectionOverlay<T> extends StatelessWidget {
static const duration = Durations.thumbnailOverlayAnimation; static const duration = Durations.thumbnailOverlayAnimation;
const GridItemSelectionOverlay({ const GridItemSelectionOverlay({
Key? key, super.key,
required this.item, required this.item,
this.borderRadius, this.borderRadius,
this.padding, this.padding,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -31,7 +31,7 @@ class GridScaleGestureDetector<T> extends StatefulWidget {
final Widget child; final Widget child;
const GridScaleGestureDetector({ const GridScaleGestureDetector({
Key? key, super.key,
required this.scrollableKey, required this.scrollableKey,
required this.tileLayout, required this.tileLayout,
required this.heightForWidth, required this.heightForWidth,
@ -39,7 +39,7 @@ class GridScaleGestureDetector<T> extends StatefulWidget {
required this.scaledBuilder, required this.scaledBuilder,
this.highlightItem, this.highlightItem,
required this.child, required this.child,
}) : super(key: key); });
@override @override
State<GridScaleGestureDetector<T>> createState() => _GridScaleGestureDetectorState<T>(); State<GridScaleGestureDetector<T>> createState() => _GridScaleGestureDetectorState<T>();
@ -236,7 +236,7 @@ class _ScaleOverlay extends StatefulWidget {
final Widget Function(Offset center, Size tileSize, Widget child) gridBuilder; final Widget Function(Offset center, Size tileSize, Widget child) gridBuilder;
const _ScaleOverlay({ const _ScaleOverlay({
Key? key, super.key,
required this.builder, required this.builder,
required this.tileLayout, required this.tileLayout,
required this.center, required this.center,
@ -244,7 +244,7 @@ class _ScaleOverlay extends StatefulWidget {
required this.xMax, required this.xMax,
required this.scaledSizeNotifier, required this.scaledSizeNotifier,
required this.gridBuilder, required this.gridBuilder,
}) : super(key: key); });
@override @override
State<_ScaleOverlay> createState() => _ScaleOverlayState(); State<_ScaleOverlay> createState() => _ScaleOverlayState();

View file

@ -21,7 +21,7 @@ abstract class SectionedListLayoutProvider<T> extends StatelessWidget {
final Widget child; final Widget child;
const SectionedListLayoutProvider({ const SectionedListLayoutProvider({
Key? key, super.key,
required this.scrollableWidth, required this.scrollableWidth,
required this.tileLayout, required this.tileLayout,
required int columnCount, required int columnCount,
@ -34,8 +34,7 @@ abstract class SectionedListLayoutProvider<T> extends StatelessWidget {
required this.child, required this.child,
}) : assert(scrollableWidth != 0), }) : assert(scrollableWidth != 0),
columnCount = tileLayout == TileLayout.list ? 1 : columnCount, columnCount = tileLayout == TileLayout.list ? 1 : columnCount,
tileWidth = tileLayout == TileLayout.list ? scrollableWidth - (horizontalPadding * 2) : tileWidth, tileWidth = tileLayout == TileLayout.list ? scrollableWidth - (horizontalPadding * 2) : tileWidth;
super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -296,13 +295,12 @@ class _GridRow extends MultiChildRenderObjectWidget {
final TextDirection textDirection; final TextDirection textDirection;
_GridRow({ _GridRow({
Key? key,
required this.width, required this.width,
required this.height, required this.height,
required this.spacing, required this.spacing,
required this.textDirection, required this.textDirection,
required List<Widget> children, required List<Widget> children,
}) : super(key: key, children: children); }) : super(children: children);
@override @override
RenderObject createRenderObject(BuildContext context) { RenderObject createRenderObject(BuildContext context) {

View file

@ -18,14 +18,14 @@ class GridSelectionGestureDetector<T> extends StatefulWidget {
final Widget child; final Widget child;
const GridSelectionGestureDetector({ const GridSelectionGestureDetector({
Key? key, super.key,
required this.scrollableKey, required this.scrollableKey,
this.selectable = true, this.selectable = true,
required this.items, required this.items,
required this.scrollController, required this.scrollController,
required this.appBarHeightNotifier, required this.appBarHeightNotifier,
required this.child, required this.child,
}) : super(key: key); });
@override @override
State<GridSelectionGestureDetector<T>> createState() => _GridSelectionGestureDetectorState<T>(); State<GridSelectionGestureDetector<T>> createState() => _GridSelectionGestureDetectorState<T>();

View file

@ -14,7 +14,7 @@ import 'package:provider/provider.dart';
// cf https://github.com/flutter/flutter/issues/49027 // cf https://github.com/flutter/flutter/issues/49027
// adapted from Flutter `RenderSliverFixedExtentBoxAdaptor` in `/rendering/sliver_fixed_extent_list.dart` // adapted from Flutter `RenderSliverFixedExtentBoxAdaptor` in `/rendering/sliver_fixed_extent_list.dart`
class SectionedListSliver<T> extends StatelessWidget { class SectionedListSliver<T> extends StatelessWidget {
const SectionedListSliver({Key? key}) : super(key: key); const SectionedListSliver({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -40,10 +40,9 @@ class _SliverKnownExtentList extends SliverMultiBoxAdaptorWidget {
final List<SectionLayout> sectionLayouts; final List<SectionLayout> sectionLayouts;
const _SliverKnownExtentList({ const _SliverKnownExtentList({
Key? key,
required SliverChildDelegate delegate, required SliverChildDelegate delegate,
required this.sectionLayouts, required this.sectionLayouts,
}) : super(key: key, delegate: delegate); }) : super(delegate: delegate);
@override @override
_RenderSliverKnownExtentBoxAdaptor createRenderObject(BuildContext context) { _RenderSliverKnownExtentBoxAdaptor createRenderObject(BuildContext context) {

View file

@ -10,12 +10,12 @@ class GridTheme extends StatelessWidget {
final Widget child; final Widget child;
const GridTheme({ const GridTheme({
Key? key, super.key,
required this.extent, required this.extent,
this.showLocation, this.showLocation,
this.showTrash, this.showTrash,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -14,7 +14,7 @@ class AvesExpansionTile extends StatelessWidget {
final List<Widget> children; final List<Widget> children;
const AvesExpansionTile({ const AvesExpansionTile({
Key? key, super.key,
String? value, String? value,
this.leading, this.leading,
required this.title, required this.title,
@ -23,8 +23,7 @@ class AvesExpansionTile extends StatelessWidget {
this.initiallyExpanded = false, this.initiallyExpanded = false,
this.showHighlight = true, this.showHighlight = true,
required this.children, required this.children,
}) : value = value ?? title, }) : value = value ?? title;
super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -60,7 +60,7 @@ class AvesFilterChip extends StatefulWidget {
static const double decoratedContentVerticalPadding = 5; static const double decoratedContentVerticalPadding = 5;
const AvesFilterChip({ const AvesFilterChip({
Key? key, super.key,
required this.filter, required this.filter,
this.removable = false, this.removable = false,
this.showText = true, this.showText = true,
@ -75,7 +75,7 @@ class AvesFilterChip extends StatefulWidget {
this.heroType = HeroType.onTap, this.heroType = HeroType.onTap,
this.onTap, this.onTap,
this.onLongPress = showDefaultLongPressMenu, this.onLongPress = showDefaultLongPressMenu,
}) : super(key: key); });
static Future<void> showDefaultLongPressMenu(BuildContext context, CollectionFilter filter, Offset tapPosition) async { static Future<void> showDefaultLongPressMenu(BuildContext context, CollectionFilter filter, Offset tapPosition) async {
if (context.read<ValueNotifier<AppMode>>().value == AppMode.main) { if (context.read<ValueNotifier<AppMode>>().value == AppMode.main) {

View file

@ -12,9 +12,9 @@ class VideoIcon extends StatelessWidget {
final AvesEntry entry; final AvesEntry entry;
const VideoIcon({ const VideoIcon({
Key? key, super.key,
required this.entry, required this.entry,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -38,7 +38,7 @@ class VideoIcon extends StatelessWidget {
} }
class AnimatedImageIcon extends StatelessWidget { class AnimatedImageIcon extends StatelessWidget {
const AnimatedImageIcon({Key? key}) : super(key: key); const AnimatedImageIcon({super.key});
static const scale = .8; static const scale = .8;
@ -52,7 +52,7 @@ class AnimatedImageIcon extends StatelessWidget {
} }
class GeoTiffIcon extends StatelessWidget { class GeoTiffIcon extends StatelessWidget {
const GeoTiffIcon({Key? key}) : super(key: key); const GeoTiffIcon({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -63,7 +63,7 @@ class GeoTiffIcon extends StatelessWidget {
} }
class SphericalImageIcon extends StatelessWidget { class SphericalImageIcon extends StatelessWidget {
const SphericalImageIcon({Key? key}) : super(key: key); const SphericalImageIcon({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -74,7 +74,7 @@ class SphericalImageIcon extends StatelessWidget {
} }
class FavouriteIcon extends StatelessWidget { class FavouriteIcon extends StatelessWidget {
const FavouriteIcon({Key? key}) : super(key: key); const FavouriteIcon({super.key});
static const scale = .9; static const scale = .9;
@ -88,7 +88,7 @@ class FavouriteIcon extends StatelessWidget {
} }
class TagIcon extends StatelessWidget { class TagIcon extends StatelessWidget {
const TagIcon({Key? key}) : super(key: key); const TagIcon({super.key});
static const scale = .9; static const scale = .9;
@ -103,7 +103,7 @@ class TagIcon extends StatelessWidget {
} }
class GpsIcon extends StatelessWidget { class GpsIcon extends StatelessWidget {
const GpsIcon({Key? key}) : super(key: key); const GpsIcon({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -114,7 +114,7 @@ class GpsIcon extends StatelessWidget {
} }
class RawIcon extends StatelessWidget { class RawIcon extends StatelessWidget {
const RawIcon({Key? key}) : super(key: key); const RawIcon({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -125,7 +125,7 @@ class RawIcon extends StatelessWidget {
} }
class MotionPhotoIcon extends StatelessWidget { class MotionPhotoIcon extends StatelessWidget {
const MotionPhotoIcon({Key? key}) : super(key: key); const MotionPhotoIcon({super.key});
static const scale = .8; static const scale = .8;
@ -144,9 +144,9 @@ class MultiPageIcon extends StatelessWidget {
static const scale = .8; static const scale = .8;
const MultiPageIcon({ const MultiPageIcon({
Key? key, super.key,
required this.entry, required this.entry,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -172,9 +172,9 @@ class RatingIcon extends StatelessWidget {
final AvesEntry entry; final AvesEntry entry;
const RatingIcon({ const RatingIcon({
Key? key, super.key,
required this.entry, required this.entry,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -195,9 +195,9 @@ class TrashIcon extends StatelessWidget {
final int? trashDaysLeft; final int? trashDaysLeft;
const TrashIcon({ const TrashIcon({
Key? key, super.key,
required this.trashDaysLeft, required this.trashDaysLeft,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -223,14 +223,14 @@ class OverlayIcon extends StatelessWidget {
final Offset? relativeOffset; final Offset? relativeOffset;
const OverlayIcon({ const OverlayIcon({
Key? key, super.key,
required this.icon, required this.icon,
this.iconScale = 1, this.iconScale = 1,
this.text, this.text,
// default margin for multiple icons in a `Column` // default margin for multiple icons in a `Column`
this.margin = const EdgeInsets.only(left: 1, right: 1, bottom: 1), this.margin = const EdgeInsets.only(left: 1, right: 1, bottom: 1),
this.relativeOffset, this.relativeOffset,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -9,9 +9,9 @@ class AvesLogo extends StatelessWidget {
final double size; final double size;
const AvesLogo({ const AvesLogo({
Key? key, super.key,
required this.size, required this.size,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -6,11 +6,11 @@ class AvesOutlinedButton extends StatelessWidget {
final VoidCallback? onPressed; final VoidCallback? onPressed;
const AvesOutlinedButton({ const AvesOutlinedButton({
Key? key, super.key,
this.icon, this.icon,
required this.label, required this.label,
required this.onPressed, required this.onPressed,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -10,13 +10,13 @@ class EmptyContent extends StatelessWidget {
final bool safeBottom; final bool safeBottom;
const EmptyContent({ const EmptyContent({
Key? key, super.key,
this.icon, this.icon,
required this.text, required this.text,
this.alignment = const FractionalOffset(.5, .35), this.alignment = const FractionalOffset(.5, .35),
this.fontSize = 22, this.fontSize = 22,
this.safeBottom = true, this.safeBottom = true,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -15,14 +15,14 @@ class HighlightTitle extends StatelessWidget {
final bool showHighlight; final bool showHighlight;
const HighlightTitle({ const HighlightTitle({
Key? key, super.key,
required this.title, required this.title,
this.color, this.color,
this.fontSize = 18, this.fontSize = 18,
this.enabled = true, this.enabled = true,
this.selectable = false, this.selectable = false,
this.showHighlight = true, this.showHighlight = true,
}) : super(key: key); });
static const disabledColor = Colors.grey; static const disabledColor = Colors.grey;

View file

@ -23,7 +23,7 @@ class MagnifierCore extends StatefulWidget {
final Widget child; final Widget child;
const MagnifierCore({ const MagnifierCore({
Key? key, super.key,
required this.controller, required this.controller,
required this.scaleStateCycle, required this.scaleStateCycle,
required this.applyScale, required this.applyScale,
@ -31,7 +31,7 @@ class MagnifierCore extends StatefulWidget {
this.onTap, this.onTap,
this.onDoubleTap, this.onDoubleTap,
required this.child, required this.child,
}) : super(key: key); });
@override @override
State<StatefulWidget> createState() => _MagnifierCoreState(); State<StatefulWidget> createState() => _MagnifierCoreState();

View file

@ -7,7 +7,7 @@ import 'package:provider/provider.dart';
class MagnifierGestureDetector extends StatefulWidget { class MagnifierGestureDetector extends StatefulWidget {
const MagnifierGestureDetector({ const MagnifierGestureDetector({
Key? key, super.key,
required this.hitDetector, required this.hitDetector,
this.onScaleStart, this.onScaleStart,
this.onScaleUpdate, this.onScaleUpdate,
@ -17,7 +17,7 @@ class MagnifierGestureDetector extends StatefulWidget {
this.onDoubleTap, this.onDoubleTap,
this.behavior, this.behavior,
this.child, this.child,
}) : super(key: key); });
final CornerHitDetector hitDetector; final CornerHitDetector hitDetector;
final void Function(ScaleStartDetails details, bool doubleTap)? onScaleStart; final void Function(ScaleStartDetails details, bool doubleTap)? onScaleStart;

View file

@ -20,7 +20,7 @@ import 'package:flutter/material.dart';
*/ */
class Magnifier extends StatelessWidget { class Magnifier extends StatelessWidget {
const Magnifier({ const Magnifier({
Key? key, super.key,
required this.controller, required this.controller,
required this.childSize, required this.childSize,
this.minScale = const ScaleLevel(factor: .0), this.minScale = const ScaleLevel(factor: .0),
@ -31,7 +31,7 @@ class Magnifier extends StatelessWidget {
this.onTap, this.onTap,
this.onDoubleTap, this.onDoubleTap,
required this.child, required this.child,
}) : super(key: key); });
final MagnifierController controller; final MagnifierController controller;

View file

@ -8,11 +8,11 @@ import 'package:flutter/widgets.dart';
/// such as [PageView], [Dismissible], [BottomSheet]. /// such as [PageView], [Dismissible], [BottomSheet].
class MagnifierGestureDetectorScope extends InheritedWidget { class MagnifierGestureDetectorScope extends InheritedWidget {
const MagnifierGestureDetectorScope({ const MagnifierGestureDetectorScope({
Key? key, super.key,
required this.axis, required this.axis,
this.touchSlopFactor = .8, this.touchSlopFactor = .8,
required Widget child, required Widget child,
}) : super(key: key, child: child); }) : super(child: child);
static MagnifierGestureDetectorScope? of(BuildContext context) { static MagnifierGestureDetectorScope? of(BuildContext context) {
final scope = context.dependOnInheritedWidgetOfExactType<MagnifierGestureDetectorScope>(); final scope = context.dependOnInheritedWidgetOfExactType<MagnifierGestureDetectorScope>();

View file

@ -9,9 +9,9 @@ class Attribution extends StatelessWidget {
final EntryMapStyle style; final EntryMapStyle style;
const Attribution({ const Attribution({
Key? key, super.key,
required this.style, required this.style,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -12,11 +12,11 @@ class MapOverlayButton extends StatelessWidget {
final VoidCallback? onPressed; final VoidCallback? onPressed;
const MapOverlayButton({ const MapOverlayButton({
Key? key, super.key,
required this.icon, required this.icon,
required this.tooltip, required this.tooltip,
required this.onPressed, required this.onPressed,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -15,10 +15,10 @@ class OverlayCoordinateFilterChip extends StatefulWidget {
final double padding; final double padding;
const OverlayCoordinateFilterChip({ const OverlayCoordinateFilterChip({
Key? key, super.key,
required this.boundsNotifier, required this.boundsNotifier,
required this.padding, required this.padding,
}) : super(key: key); });
@override @override
State<OverlayCoordinateFilterChip> createState() => _OverlayCoordinateFilterChipState(); State<OverlayCoordinateFilterChip> createState() => _OverlayCoordinateFilterChipState();

View file

@ -21,12 +21,12 @@ class MapButtonPanel extends StatelessWidget {
final VoidCallback? resetRotation; final VoidCallback? resetRotation;
const MapButtonPanel({ const MapButtonPanel({
Key? key, super.key,
required this.boundsNotifier, required this.boundsNotifier,
this.zoomBy, this.zoomBy,
this.openMapPage, this.openMapPage,
this.resetRotation, this.resetRotation,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -11,9 +11,9 @@ class MapDecorator extends StatelessWidget {
static const mapLoadingGrid = Color(0xFFC4BEBB); static const mapLoadingGrid = Color(0xFFC4BEBB);
const MapDecorator({ const MapDecorator({
Key? key, super.key,
this.child, this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -37,7 +37,7 @@ class GeoMap extends StatefulWidget {
final void Function(BuildContext context)? openMapPage; final void Function(BuildContext context)? openMapPage;
const GeoMap({ const GeoMap({
Key? key, super.key,
this.controller, this.controller,
this.collectionListenable, this.collectionListenable,
required this.entries, required this.entries,
@ -50,7 +50,7 @@ class GeoMap extends StatefulWidget {
this.onMapTap, this.onMapTap,
this.onMarkerTap, this.onMarkerTap,
this.openMapPage, this.openMapPage,
}) : super(key: key); });
@override @override
State<GeoMap> createState() => _GeoMapState(); State<GeoMap> createState() => _GeoMapState();

View file

@ -31,7 +31,7 @@ class EntryLeafletMap<T> extends StatefulWidget {
final MarkerTapCallback<T>? onMarkerTap; final MarkerTapCallback<T>? onMarkerTap;
const EntryLeafletMap({ const EntryLeafletMap({
Key? key, super.key,
this.controller, this.controller,
required this.clusterListenable, required this.clusterListenable,
required this.boundsNotifier, required this.boundsNotifier,
@ -50,7 +50,7 @@ class EntryLeafletMap<T> extends StatefulWidget {
this.onUserZoomChange, this.onUserZoomChange,
this.onMapTap, this.onMapTap,
this.onMarkerTap, this.onMarkerTap,
}) : super(key: key); });
@override @override
State<StatefulWidget> createState() => _EntryLeafletMapState<T>(); State<StatefulWidget> createState() => _EntryLeafletMapState<T>();

View file

@ -9,11 +9,11 @@ class ScaleLayerOptions extends LayerOptions {
final Widget Function(double width, String distance) builder; final Widget Function(double width, String distance) builder;
ScaleLayerOptions({ ScaleLayerOptions({
Key? key, super.key,
this.unitSystem = UnitSystem.metric, this.unitSystem = UnitSystem.metric,
this.builder = defaultBuilder, this.builder = defaultBuilder,
rebuild, rebuild,
}) : super(key: key, rebuild: rebuild); }) : super(rebuild: rebuild);
static Widget defaultBuilder(double width, String distance) { static Widget defaultBuilder(double width, String distance) {
return ScaleBar( return ScaleBar(
@ -132,10 +132,10 @@ class ScaleBar extends StatelessWidget {
static const double barThickness = 1; static const double barThickness = 1;
const ScaleBar({ const ScaleBar({
Key? key, super.key,
required this.distance, required this.distance,
required this.width, required this.width,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -6,7 +6,7 @@ import 'package:provider/provider.dart';
const _tileLayerBackgroundColor = Colors.transparent; const _tileLayerBackgroundColor = Colors.transparent;
class OSMHotLayer extends StatelessWidget { class OSMHotLayer extends StatelessWidget {
const OSMHotLayer({Key? key}) : super(key: key); const OSMHotLayer({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -23,7 +23,7 @@ class OSMHotLayer extends StatelessWidget {
} }
class StamenTonerLayer extends StatelessWidget { class StamenTonerLayer extends StatelessWidget {
const StamenTonerLayer({Key? key}) : super(key: key); const StamenTonerLayer({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -40,7 +40,7 @@ class StamenTonerLayer extends StatelessWidget {
} }
class StamenWatercolorLayer extends StatelessWidget { class StamenWatercolorLayer extends StatelessWidget {
const StamenWatercolorLayer({Key? key}) : super(key: key); const StamenWatercolorLayer({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -6,9 +6,9 @@ class HighlightInfoProvider extends StatelessWidget {
final Widget child; final Widget child;
const HighlightInfoProvider({ const HighlightInfoProvider({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -12,7 +12,7 @@ class MapTheme extends StatelessWidget {
final Widget child; final Widget child;
const MapTheme({ const MapTheme({
Key? key, super.key,
required this.interactive, required this.interactive,
required this.showCoordinateFilter, required this.showCoordinateFilter,
required this.navigationButton, required this.navigationButton,
@ -20,7 +20,7 @@ class MapTheme extends StatelessWidget {
this.visualDensity, this.visualDensity,
this.mapHeight, this.mapHeight,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -5,9 +5,9 @@ class MediaQueryDataProvider extends StatelessWidget {
final Widget child; final Widget child;
const MediaQueryDataProvider({ const MediaQueryDataProvider({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -7,10 +7,10 @@ class QueryProvider extends StatelessWidget {
final Widget child; final Widget child;
const QueryProvider({ const QueryProvider({
Key? key, super.key,
required this.initialQuery, required this.initialQuery,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -6,9 +6,9 @@ class SelectionProvider<T> extends StatelessWidget {
final Widget child; final Widget child;
const SelectionProvider({ const SelectionProvider({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -7,10 +7,10 @@ class TileExtentControllerProvider extends StatelessWidget {
final Widget child; final Widget child;
const TileExtentControllerProvider({ const TileExtentControllerProvider({
Key? key, super.key,
required this.controller, required this.controller,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -7,9 +7,9 @@ class SliverAppBarTitleWrapper extends StatelessWidget {
final Widget child; final Widget child;
const SliverAppBarTitleWrapper({ const SliverAppBarTitleWrapper({
Key? key, super.key,
required this.child, required this.child,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -16,14 +16,14 @@ class DecoratedThumbnail extends StatelessWidget {
static final double borderWidth = AvesBorder.straightBorderWidth; static final double borderWidth = AvesBorder.straightBorderWidth;
const DecoratedThumbnail({ const DecoratedThumbnail({
Key? key, super.key,
required this.entry, required this.entry,
required this.tileExtent, required this.tileExtent,
this.cancellableNotifier, this.cancellableNotifier,
this.selectable = true, this.selectable = true,
this.highlightable = true, this.highlightable = true,
this.heroTagger, this.heroTagger,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -12,10 +12,10 @@ class ErrorThumbnail extends StatefulWidget {
final double extent; final double extent;
const ErrorThumbnail({ const ErrorThumbnail({
Key? key, super.key,
required this.entry, required this.entry,
required this.extent, required this.extent,
}) : super(key: key); });
@override @override
State<ErrorThumbnail> createState() => _ErrorThumbnailState(); State<ErrorThumbnail> createState() => _ErrorThumbnailState();

View file

@ -26,7 +26,7 @@ class ThumbnailImage extends StatefulWidget {
final Object? heroTag; final Object? heroTag;
const ThumbnailImage({ const ThumbnailImage({
Key? key, super.key,
required this.entry, required this.entry,
required this.extent, required this.extent,
this.progressive = true, this.progressive = true,
@ -34,7 +34,7 @@ class ThumbnailImage extends StatefulWidget {
this.showLoadingBackground = true, this.showLoadingBackground = true,
this.cancellableNotifier, this.cancellableNotifier,
this.heroTag, this.heroTag,
}) : super(key: key); });
@override @override
State<ThumbnailImage> createState() => _ThumbnailImageState(); State<ThumbnailImage> createState() => _ThumbnailImageState();

View file

@ -12,9 +12,9 @@ class ThumbnailEntryOverlay extends StatelessWidget {
final AvesEntry entry; final AvesEntry entry;
const ThumbnailEntryOverlay({ const ThumbnailEntryOverlay({
Key? key, super.key,
required this.entry, required this.entry,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -54,9 +54,9 @@ class ThumbnailHighlightOverlay extends StatefulWidget {
final AvesEntry entry; final AvesEntry entry;
const ThumbnailHighlightOverlay({ const ThumbnailHighlightOverlay({
Key? key, super.key,
required this.entry, required this.entry,
}) : super(key: key); });
@override @override
State<ThumbnailHighlightOverlay> createState() => _ThumbnailHighlightOverlayState(); State<ThumbnailHighlightOverlay> createState() => _ThumbnailHighlightOverlayState();

View file

@ -18,7 +18,7 @@ class ThumbnailScroller extends StatefulWidget {
final bool scrollable, highlightable, showLocation; final bool scrollable, highlightable, showLocation;
const ThumbnailScroller({ const ThumbnailScroller({
Key? key, super.key,
required this.availableWidth, required this.availableWidth,
required this.entryCount, required this.entryCount,
required this.entryBuilder, required this.entryBuilder,
@ -28,7 +28,7 @@ class ThumbnailScroller extends StatefulWidget {
this.highlightable = false, this.highlightable = false,
this.showLocation = true, this.showLocation = true,
this.scrollable = true, this.scrollable = true,
}) : super(key: key); });
@override @override
State<ThumbnailScroller> createState() => _ThumbnailScrollerState(); State<ThumbnailScroller> createState() => _ThumbnailScrollerState();

View file

@ -8,7 +8,7 @@ import 'package:collection/collection.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DebugAndroidAppSection extends StatefulWidget { class DebugAndroidAppSection extends StatefulWidget {
const DebugAndroidAppSection({Key? key}) : super(key: key); const DebugAndroidAppSection({super.key});
@override @override
State<DebugAndroidAppSection> createState() => _DebugAndroidAppSectionState(); State<DebugAndroidAppSection> createState() => _DebugAndroidAppSectionState();

View file

@ -7,7 +7,7 @@ import 'package:collection/collection.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DebugAndroidCodecSection extends StatefulWidget { class DebugAndroidCodecSection extends StatefulWidget {
const DebugAndroidCodecSection({Key? key}) : super(key: key); const DebugAndroidCodecSection({super.key});
@override @override
State<DebugAndroidCodecSection> createState() => _DebugAndroidCodecSectionState(); State<DebugAndroidCodecSection> createState() => _DebugAndroidCodecSectionState();

View file

@ -6,7 +6,7 @@ import 'package:aves/widgets/viewer/info/common.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DebugAndroidDirSection extends StatefulWidget { class DebugAndroidDirSection extends StatefulWidget {
const DebugAndroidDirSection({Key? key}) : super(key: key); const DebugAndroidDirSection({super.key});
@override @override
State<DebugAndroidDirSection> createState() => _DebugAndroidDirSectionState(); State<DebugAndroidDirSection> createState() => _DebugAndroidDirSectionState();

View file

@ -31,7 +31,7 @@ import 'package:provider/provider.dart';
class AppDebugPage extends StatefulWidget { class AppDebugPage extends StatefulWidget {
static const routeName = '/debug'; static const routeName = '/debug';
const AppDebugPage({Key? key}) : super(key: key); const AppDebugPage({super.key});
@override @override
State<StatefulWidget> createState() => _AppDebugPageState(); State<StatefulWidget> createState() => _AppDebugPageState();

View file

@ -4,7 +4,7 @@ import 'package:aves/widgets/common/identity/aves_expansion_tile.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DebugCacheSection extends StatefulWidget { class DebugCacheSection extends StatefulWidget {
const DebugCacheSection({Key? key}) : super(key: key); const DebugCacheSection({super.key});
@override @override
State<DebugCacheSection> createState() => _DebugCacheSectionState(); State<DebugCacheSection> createState() => _DebugCacheSectionState();

View file

@ -11,7 +11,7 @@ import 'package:aves/widgets/common/identity/aves_expansion_tile.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DebugAppDatabaseSection extends StatefulWidget { class DebugAppDatabaseSection extends StatefulWidget {
const DebugAppDatabaseSection({Key? key}) : super(key: key); const DebugAppDatabaseSection({super.key});
@override @override
State<DebugAppDatabaseSection> createState() => _DebugAppDatabaseSectionState(); State<DebugAppDatabaseSection> createState() => _DebugAppDatabaseSectionState();

View file

@ -6,7 +6,7 @@ import 'package:aves/widgets/dialogs/aves_dialog.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class MediaStoreScanDirDialog extends StatefulWidget { class MediaStoreScanDirDialog extends StatefulWidget {
const MediaStoreScanDirDialog({Key? key}) : super(key: key); const MediaStoreScanDirDialog({super.key});
@override @override
State<MediaStoreScanDirDialog> createState() => _MediaStoreScanDirDialogState(); State<MediaStoreScanDirDialog> createState() => _MediaStoreScanDirDialogState();

View file

@ -2,7 +2,7 @@ import 'package:aves/services/common/service_policy.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DebugTaskQueueOverlay extends StatelessWidget { class DebugTaskQueueOverlay extends StatelessWidget {
const DebugTaskQueueOverlay({Key? key}) : super(key: key); const DebugTaskQueueOverlay({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -5,7 +5,7 @@ import 'package:aves/widgets/viewer/info/common.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DebugErrorReportingSection extends StatelessWidget { class DebugErrorReportingSection extends StatelessWidget {
const DebugErrorReportingSection({Key? key}) : super(key: key); const DebugErrorReportingSection({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class DebugSettingsSection extends StatelessWidget { class DebugSettingsSection extends StatelessWidget {
const DebugSettingsSection({Key? key}) : super(key: key); const DebugSettingsSection({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View file

@ -6,7 +6,7 @@ import 'package:aves/widgets/viewer/info/common.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DebugStorageSection extends StatefulWidget { class DebugStorageSection extends StatefulWidget {
const DebugStorageSection({Key? key}) : super(key: key); const DebugStorageSection({super.key});
@override @override
State<DebugStorageSection> createState() => _DebugStorageSectionState(); State<DebugStorageSection> createState() => _DebugStorageSectionState();

View file

@ -17,10 +17,10 @@ class AddShortcutDialog extends StatefulWidget {
final String defaultName; final String defaultName;
const AddShortcutDialog({ const AddShortcutDialog({
Key? key, super.key,
required this.defaultName, required this.defaultName,
this.collection, this.collection,
}) : super(key: key); });
@override @override
State<AddShortcutDialog> createState() => _AddShortcutDialogState(); State<AddShortcutDialog> createState() => _AddShortcutDialogState();

Some files were not shown because too many files have changed in this diff Show more