upgraded flutter to v2.5.0

This commit is contained in:
Thibault Deckers 2021-09-09 14:16:46 +09:00
parent 487a2f2699
commit 79e92e6ad6
33 changed files with 125 additions and 95 deletions

View file

@ -15,7 +15,7 @@ jobs:
- uses: subosito/flutter-action@v1 - uses: subosito/flutter-action@v1
with: with:
channel: stable channel: stable
flutter-version: '2.2.3' flutter-version: '2.5.0'
- name: Clone the repository. - name: Clone the repository.
uses: actions/checkout@v2 uses: actions/checkout@v2

View file

@ -17,7 +17,7 @@ jobs:
- uses: subosito/flutter-action@v1 - uses: subosito/flutter-action@v1
with: with:
channel: stable channel: stable
flutter-version: '2.2.3' flutter-version: '2.5.0'
# Workaround for this Android Gradle Plugin issue (supposedly fixed in AGP 4.1): # Workaround for this Android Gradle Plugin issue (supposedly fixed in AGP 4.1):
# https://issuetracker.google.com/issues/144111441 # https://issuetracker.google.com/issues/144111441
@ -50,8 +50,8 @@ jobs:
echo "${{ secrets.KEY_JKS }}" > release.keystore.asc echo "${{ secrets.KEY_JKS }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.KEY_JKS_PASSPHRASE }}" --batch release.keystore.asc > $AVES_STORE_FILE gpg -d --passphrase "${{ secrets.KEY_JKS_PASSPHRASE }}" --batch release.keystore.asc > $AVES_STORE_FILE
rm release.keystore.asc rm release.keystore.asc
flutter build apk --bundle-sksl-path shaders_2.2.3.sksl.json flutter build apk --bundle-sksl-path shaders_2.5.0.sksl.json
flutter build appbundle --bundle-sksl-path shaders_2.2.3.sksl.json flutter build appbundle --bundle-sksl-path shaders_2.5.0.sksl.json
rm $AVES_STORE_FILE rm $AVES_STORE_FILE
env: env:
AVES_STORE_FILE: ${{ github.workspace }}/key.jks AVES_STORE_FILE: ${{ github.workspace }}/key.jks

View file

@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [Unreleased] ## [Unreleased]
### Changed
- upgraded Flutter to stable v2.5.0
## [v1.5.1] - 2021-09-08 ## [v1.5.1] - 2021-09-08
### Added ### Added
@ -71,7 +73,7 @@ All notable changes to this project will be documented in this file.
### Changed ### Changed
- improved SVG support with a different rendering engine - improved SVG support with a different rendering engine
- changed logo - changed logo
- upgraded flutter to stable v2.2.3 - upgraded Flutter to stable v2.2.3
- migrated to sound null safety - migrated to sound null safety
- viewer: parallax effect when scrolling - viewer: parallax effect when scrolling

View file

@ -3,7 +3,7 @@
"@appName": {}, "@appName": {},
"welcomeMessage": "Welcome to Aves", "welcomeMessage": "Welcome to Aves",
"@welcomeMessage": {}, "@welcomeMessage": {},
"welcomeCrashReportToggle": "Allow anonymous crash reporting (optional)", "welcomeCrashReportToggle": "Allow anonymous error reporting (optional)",
"@welcomeCrashReportToggle": {}, "@welcomeCrashReportToggle": {},
"welcomeTermsToggle": "I agree to the terms and conditions", "welcomeTermsToggle": "I agree to the terms and conditions",
"@welcomeTermsToggle": {}, "@welcomeTermsToggle": {},

View file

@ -17,25 +17,24 @@ class Themes {
static final darkTheme = ThemeData( static final darkTheme = ThemeData(
brightness: Brightness.dark, brightness: Brightness.dark,
accentColor: _accentColor,
// canvas color is used as background for the drawer and popups // canvas color is used as background for the drawer and popups
// when using a popup menu on a dialog, lighten the background via `PopupMenuTheme` // when using a popup menu on a dialog, lighten the background via `PopupMenuTheme`
canvasColor: Colors.grey[850], canvasColor: Colors.grey[850],
scaffoldBackgroundColor: Colors.grey.shade900, scaffoldBackgroundColor: Colors.grey.shade900,
dialogBackgroundColor: Colors.grey[850], dialogBackgroundColor: Colors.grey[850],
indicatorColor: _accentColor,
toggleableActiveColor: _accentColor, toggleableActiveColor: _accentColor,
tooltipTheme: const TooltipThemeData( tooltipTheme: const TooltipThemeData(
verticalOffset: 32, verticalOffset: 32,
), ),
appBarTheme: const AppBarTheme( appBarTheme: AppBarTheme(
textTheme: TextTheme( backgroundColor: Colors.grey.shade900,
headline6: TextStyle( titleTextStyle: const TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontFeatures: [FontFeature.enable('smcp')], fontFeatures: [FontFeature.enable('smcp')],
), ),
), ),
),
colorScheme: const ColorScheme.dark( colorScheme: const ColorScheme.dark(
primary: _accentColor, primary: _accentColor,
secondary: _accentColor, secondary: _accentColor,

View file

@ -84,7 +84,7 @@ class _BugReportState extends State<BugReport> with FeedbackMixin {
), ),
isExpanded: _showInstructions, isExpanded: _showInstructions,
canTapOnHeader: true, canTapOnHeader: true,
backgroundColor: Colors.transparent, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
), ),
], ],
); );
@ -99,7 +99,7 @@ class _BugReportState extends State<BugReport> with FeedbackMixin {
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.fromBorderSide(BorderSide( border: Border.fromBorderSide(BorderSide(
color: Theme.of(context).accentColor, color: Theme.of(context).colorScheme.secondary,
width: AvesFilterChip.outlineWidth, width: AvesFilterChip.outlineWidth,
)), )),
shape: BoxShape.circle, shape: BoxShape.circle,
@ -112,7 +112,7 @@ class _BugReportState extends State<BugReport> with FeedbackMixin {
OutlinedButton( OutlinedButton(
onPressed: onPressed, onPressed: onPressed,
style: ButtonStyle( style: ButtonStyle(
side: MaterialStateProperty.all<BorderSide>(BorderSide(color: Theme.of(context).accentColor)), side: MaterialStateProperty.all<BorderSide>(BorderSide(color: Theme.of(context).colorScheme.secondary)),
foregroundColor: MaterialStateProperty.all<Color>(Colors.white), foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
), ),
child: Text(buttonText), child: Text(buttonText),

View file

@ -10,15 +10,17 @@ mixin FeedbackMixin {
void dismissFeedback(BuildContext context) => ScaffoldMessenger.of(context).hideCurrentSnackBar(); void dismissFeedback(BuildContext context) => ScaffoldMessenger.of(context).hideCurrentSnackBar();
void showFeedback(BuildContext context, String message, [SnackBarAction? action]) { void showFeedback(BuildContext context, String message, [SnackBarAction? action]) {
showFeedbackWithMessenger(ScaffoldMessenger.of(context), message, action); showFeedbackWithMessenger(context, ScaffoldMessenger.of(context), message, action);
} }
// provide the messenger if feedback happens as the widget is disposed // provide the messenger if feedback happens as the widget is disposed
void showFeedbackWithMessenger(ScaffoldMessengerState messenger, String message, [SnackBarAction? action]) { void showFeedbackWithMessenger(BuildContext context, ScaffoldMessengerState messenger, String message, [SnackBarAction? action]) {
final duration = action != null ? Durations.opToastActionDisplay : Durations.opToastDisplay; final duration = action != null ? Durations.opToastActionDisplay : Durations.opToastDisplay;
final progressColor = Theme.of(context).colorScheme.secondary;
messenger.showSnackBar(SnackBar( messenger.showSnackBar(SnackBar(
content: _FeedbackMessage( content: _FeedbackMessage(
message: message, message: message,
progressColor: progressColor,
duration: action != null ? duration : null, duration: action != null ? duration : null,
), ),
action: action, action: action,
@ -107,7 +109,7 @@ class _ReportOverlayState<T> extends State<ReportOverlay<T>> with SingleTickerPr
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final progressColor = Theme.of(context).accentColor; final progressColor = Theme.of(context).colorScheme.secondary;
return AbsorbPointer( return AbsorbPointer(
child: StreamBuilder<T>( child: StreamBuilder<T>(
stream: opStream, stream: opStream,
@ -163,10 +165,12 @@ class _ReportOverlayState<T> extends State<ReportOverlay<T>> with SingleTickerPr
class _FeedbackMessage extends StatefulWidget { class _FeedbackMessage extends StatefulWidget {
final String message; final String message;
final Duration? duration; final Duration? duration;
final Color progressColor;
const _FeedbackMessage({ const _FeedbackMessage({
Key? key, Key? key,
required this.message, required this.message,
required this.progressColor,
this.duration, this.duration,
}) : super(key: key); }) : super(key: key);
@ -212,7 +216,9 @@ class _FeedbackMessageState extends State<_FeedbackMessage> {
percent: _percent, percent: _percent,
lineWidth: 2, lineWidth: 2,
radius: 32, radius: 32,
backgroundColor: Theme.of(context).accentColor, // progress color is provided by the caller,
// because we cannot use the app context theme here
backgroundColor: widget.progressColor,
progressColor: Colors.grey, progressColor: Colors.grey,
animation: true, animation: true,
animationDuration: duration.inMilliseconds, animationDuration: duration.inMilliseconds,

View file

@ -63,7 +63,7 @@ class ReselectableRadioListTile<T> extends StatelessWidget {
} }
return MergeSemantics( return MergeSemantics(
child: ListTileTheme.merge( child: ListTileTheme.merge(
selectedColor: activeColor ?? Theme.of(context).accentColor, selectedColor: activeColor ?? Theme.of(context).colorScheme.secondary,
child: ListTile( child: ListTile(
leading: leading, leading: leading,
title: title, title: title,

View file

@ -42,10 +42,13 @@ class AvesExpansionTile extends StatelessWidget {
], ],
); );
} }
final theme = Theme.of(context);
return Theme( return Theme(
data: Theme.of(context).copyWith( data: theme.copyWith(
colorScheme: theme.colorScheme.copyWith(
// color used by the `ExpansionTileCard` for selected text and icons // color used by the `ExpansionTileCard` for selected text and icons
accentColor: Colors.white, secondary: theme.colorScheme.onBackground,
),
), ),
child: ExpansionTileCard( child: ExpansionTileCard(
// key is expected by test driver // key is expected by test driver
@ -58,7 +61,7 @@ class AvesExpansionTile extends StatelessWidget {
finalPadding: const EdgeInsets.symmetric(vertical: 6.0), finalPadding: const EdgeInsets.symmetric(vertical: 6.0),
baseColor: Colors.grey.shade900, baseColor: Colors.grey.shade900,
expandedColor: Colors.grey[850], expandedColor: Colors.grey[850],
shadowColor: Theme.of(context).shadowColor, shadowColor: theme.shadowColor,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [

View file

@ -264,7 +264,7 @@ class _AvesFilterChipState extends State<AvesFilterChip> {
child: Banner( child: Banner(
message: banner.toUpperCase(), message: banner.toUpperCase(),
location: BannerLocation.topStart, location: BannerLocation.topStart,
color: Theme.of(context).accentColor, color: Theme.of(context).colorScheme.secondary,
child: const SizedBox(), child: const SizedBox(),
), ),
), ),

View file

@ -56,8 +56,8 @@ class _MagnifierGestureDetectorState extends State<MagnifierGestureDetector> {
if (scope != null) { if (scope != null) {
gestures[MagnifierGestureRecognizer] = GestureRecognizerFactoryWithHandlers<MagnifierGestureRecognizer>( gestures[MagnifierGestureRecognizer] = GestureRecognizerFactoryWithHandlers<MagnifierGestureRecognizer>(
() => MagnifierGestureRecognizer( () => MagnifierGestureRecognizer(
hitDetector: widget.hitDetector,
debugOwner: this, debugOwner: this,
hitDetector: widget.hitDetector,
validateAxis: scope.axis, validateAxis: scope.axis,
touchSlopFactor: scope.touchSlopFactor, touchSlopFactor: scope.touchSlopFactor,
doubleTapDetails: doubleTapDetails, doubleTapDetails: doubleTapDetails,

View file

@ -12,12 +12,11 @@ class MagnifierGestureRecognizer extends ScaleGestureRecognizer {
MagnifierGestureRecognizer({ MagnifierGestureRecognizer({
Object? debugOwner, Object? debugOwner,
PointerDeviceKind? kind,
required this.hitDetector, required this.hitDetector,
required this.validateAxis, required this.validateAxis,
this.touchSlopFactor = 2, this.touchSlopFactor = 2,
required this.doubleTapDetails, required this.doubleTapDetails,
}) : super(debugOwner: debugOwner, kind: kind); }) : super(debugOwner: debugOwner);
Map<int, Offset> _pointerLocations = <int, Offset>{}; Map<int, Offset> _pointerLocations = <int, Offset>{};
@ -29,7 +28,7 @@ class MagnifierGestureRecognizer extends ScaleGestureRecognizer {
bool ready = true; bool ready = true;
@override @override
void addAllowedPointer(PointerEvent event) { void addAllowedPointer(PointerDownEvent event) {
if (ready) { if (ready) {
ready = false; ready = false;
_initialSpan = 0.0; _initialSpan = 0.0;

View file

@ -33,7 +33,7 @@ class Attribution extends StatelessWidget {
data: data, data: data,
selectable: true, selectable: true,
styleSheet: MarkdownStyleSheet( styleSheet: MarkdownStyleSheet(
a: TextStyle(color: Theme.of(context).accentColor), a: TextStyle(color: Theme.of(context).colorScheme.secondary),
p: const TextStyle(color: Colors.white70, fontSize: InfoRowGroup.fontSize), p: const TextStyle(color: Colors.white70, fontSize: InfoRowGroup.fontSize),
), ),
onTapLink: (text, href, title) async { onTapLink: (text, href, title) async {

View file

@ -51,7 +51,7 @@ class GeoMap extends StatefulWidget {
_GeoMapState createState() => _GeoMapState(); _GeoMapState createState() => _GeoMapState();
} }
class _GeoMapState extends State<GeoMap> with TickerProviderStateMixin { class _GeoMapState extends State<GeoMap> {
// as of google_maps_flutter v2.0.6, Google Maps initialization is blocking // as of google_maps_flutter v2.0.6, Google Maps initialization is blocking
// cf https://github.com/flutter/flutter/issues/28493 // cf https://github.com/flutter/flutter/issues/28493
// it is especially severe the first time, but still significant afterwards // it is especially severe the first time, but still significant afterwards
@ -179,7 +179,6 @@ class _GeoMapState extends State<GeoMap> with TickerProviderStateMixin {
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
curve: Curves.easeInOutCubic, curve: Curves.easeInOutCubic,
duration: Durations.mapStyleSwitchAnimation, duration: Durations.mapStyleSwitchAnimation,
vsync: this,
child: ValueListenableBuilder<bool>( child: ValueListenableBuilder<bool>(
valueListenable: widget.isAnimatingNotifier, valueListenable: widget.isAnimatingNotifier,
builder: (context, animating, child) { builder: (context, animating, child) {

View file

@ -82,7 +82,7 @@ class ImageMarker extends StatelessWidget {
Container( Container(
padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 2), padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 2),
decoration: ShapeDecoration( decoration: ShapeDecoration(
color: Theme.of(context).accentColor, color: Theme.of(context).colorScheme.secondary,
shape: const CustomRoundedRectangleBorder( shape: const CustomRoundedRectangleBorder(
leftSide: borderSide, leftSide: borderSide,
rightSide: borderSide, rightSide: borderSide,

View file

@ -70,7 +70,7 @@ class _ThumbnailHighlightOverlayState extends State<ThumbnailHighlightOverlay> {
builder: (context) => Container( builder: (context) => Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.fromBorderSide(BorderSide( border: Border.fromBorderSide(BorderSide(
color: Theme.of(context).accentColor, color: Theme.of(context).colorScheme.secondary,
width: context.select<GridThemeData, double>((t) => t.highlightBorderWidth), width: context.select<GridThemeData, double>((t) => t.highlightBorderWidth),
)), )),
), ),

View file

@ -14,6 +14,7 @@ class AvesDialog extends AlertDialog {
String? title, String? title,
ScrollController? scrollController, ScrollController? scrollController,
List<Widget>? scrollableContent, List<Widget>? scrollableContent,
bool hasScrollBar = true,
Widget? content, Widget? content,
required List<Widget> actions, required List<Widget> actions,
}) : assert((scrollableContent != null) ^ (content != null)), }) : assert((scrollableContent != null) ^ (content != null)),
@ -31,7 +32,7 @@ class AvesDialog extends AlertDialog {
// scroll both the title and the content together, // scroll both the title and the content together,
// and overflow feedback ignores the dialog shape, // and overflow feedback ignores the dialog shape,
// so we restrict scrolling to the content instead // so we restrict scrolling to the content instead
content: _buildContent(context, scrollController, scrollableContent, content), content: _buildContent(context, scrollController, scrollableContent, hasScrollBar, content),
contentPadding: scrollableContent != null ? EdgeInsets.zero : const EdgeInsets.fromLTRB(24, 20, 24, 0), contentPadding: scrollableContent != null ? EdgeInsets.zero : const EdgeInsets.fromLTRB(24, 20, 24, 0),
actions: actions, actions: actions,
actionsPadding: const EdgeInsets.symmetric(horizontal: 8), actionsPadding: const EdgeInsets.symmetric(horizontal: 8),
@ -45,6 +46,7 @@ class AvesDialog extends AlertDialog {
BuildContext context, BuildContext context,
ScrollController? scrollController, ScrollController? scrollController,
List<Widget>? scrollableContent, List<Widget>? scrollableContent,
bool hasScrollBar,
Widget? content, Widget? content,
) { ) {
if (content != null) { if (content != null) {
@ -53,6 +55,31 @@ class AvesDialog extends AlertDialog {
if (scrollableContent != null) { if (scrollableContent != null) {
scrollController ??= ScrollController(); scrollController ??= ScrollController();
Widget child = ListView(
controller: scrollController,
shrinkWrap: true,
children: scrollableContent,
);
if (hasScrollBar) {
child = Theme(
data: Theme.of(context).copyWith(
scrollbarTheme: const ScrollbarThemeData(
isAlwaysShown: true,
radius: Radius.circular(16),
crossAxisMargin: 4,
mainAxisMargin: 4,
interactive: true,
),
),
child: Scrollbar(
controller: scrollController,
child: child,
),
);
}
return Container( return Container(
// padding to avoid transparent border overlapping // padding to avoid transparent border overlapping
padding: const EdgeInsets.symmetric(horizontal: borderWidth), padding: const EdgeInsets.symmetric(horizontal: borderWidth),
@ -66,25 +93,7 @@ class AvesDialog extends AlertDialog {
bottom: Divider.createBorderSide(context, width: borderWidth), bottom: Divider.createBorderSide(context, width: borderWidth),
), ),
), ),
child: Theme( child: child,
data: Theme.of(context).copyWith(
scrollbarTheme: const ScrollbarThemeData(
isAlwaysShown: true,
radius: Radius.circular(16),
crossAxisMargin: 4,
mainAxisMargin: 4,
interactive: true,
),
),
child: Scrollbar(
controller: scrollController,
child: ListView(
controller: scrollController,
shrinkWrap: true,
children: scrollableContent,
),
),
),
), ),
); );
} }

View file

@ -324,6 +324,7 @@ class _TimeShiftDialogState extends State<TimeShiftDialog> {
), ),
), ),
], ],
hasScrollBar: false,
actions: [ actions: [
TextButton( TextButton(
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),

View file

@ -68,7 +68,7 @@ class _AppDrawerState extends State<AppDrawer> {
return Drawer( return Drawer(
child: ListTileTheme.merge( child: ListTileTheme.merge(
selectedColor: Theme.of(context).accentColor, selectedColor: Theme.of(context).colorScheme.secondary,
child: Selector<MediaQueryData, double>( child: Selector<MediaQueryData, double>(
selector: (c, mq) => mq.effectiveBottomPadding, selector: (c, mq) => mq.effectiveBottomPadding,
builder: (c, mqPaddingBottom, child) { builder: (c, mqPaddingBottom, child) {
@ -104,7 +104,7 @@ class _AppDrawerState extends State<AppDrawer> {
return Container( return Container(
padding: const EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), padding: const EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8),
color: Theme.of(context).accentColor, color: Theme.of(context).colorScheme.secondary,
child: SafeArea( child: SafeArea(
bottom: false, bottom: false,
child: Column( child: Column(
@ -147,6 +147,7 @@ class _AppDrawerState extends State<AppDrawer> {
onPressed: () => goTo(AboutPage.routeName, (_) => const AboutPage()), onPressed: () => goTo(AboutPage.routeName, (_) => const AboutPage()),
icon: const Icon(AIcons.info), icon: const Icon(AIcons.info),
label: Row( label: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(context.l10n.aboutPageTitle), Text(context.l10n.aboutPageTitle),

View file

@ -177,7 +177,7 @@ class AlbumChipSetActionDelegate extends ChipSetActionDelegate<AlbumFilter> {
final deletedCount = deletedUris.length; final deletedCount = deletedUris.length;
if (deletedCount < todoCount) { if (deletedCount < todoCount) {
final count = todoCount - deletedCount; final count = todoCount - deletedCount;
showFeedbackWithMessenger(messenger, l10n.collectionDeleteFailureFeedback(count)); showFeedbackWithMessenger(context, messenger, l10n.collectionDeleteFailureFeedback(count));
} }
// cleanup // cleanup
@ -236,9 +236,9 @@ class AlbumChipSetActionDelegate extends ChipSetActionDelegate<AlbumFilter> {
final movedCount = movedOps.length; final movedCount = movedOps.length;
if (movedCount < todoCount) { if (movedCount < todoCount) {
final count = todoCount - movedCount; final count = todoCount - movedCount;
showFeedbackWithMessenger(messenger, l10n.collectionMoveFailureFeedback(count)); showFeedbackWithMessenger(context, messenger, l10n.collectionMoveFailureFeedback(count));
} else { } else {
showFeedbackWithMessenger(messenger, l10n.genericSuccessFeedback); showFeedbackWithMessenger(context, messenger, l10n.genericSuccessFeedback);
} }
// cleanup // cleanup

View file

@ -35,7 +35,7 @@ class _ChipHighlightOverlayState extends State<ChipHighlightOverlay> {
builder: (context) => Container( builder: (context) => Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.fromBorderSide(BorderSide( border: Border.fromBorderSide(BorderSide(
color: Theme.of(context).accentColor, color: Theme.of(context).colorScheme.secondary,
width: widget.extent * .1, width: widget.extent * .1,
)), )),
borderRadius: widget.borderRadius, borderRadius: widget.borderRadius,

View file

@ -109,10 +109,6 @@ class _SearchPageState extends State<SearchPage> {
} }
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
backgroundColor: theme.primaryColor,
iconTheme: theme.primaryIconTheme,
textTheme: theme.primaryTextTheme,
brightness: theme.primaryColorBrightness,
leading: widget.delegate.buildLeading(context), leading: widget.delegate.buildLeading(context),
title: TextField( title: TextField(
controller: widget.delegate.queryTextController, controller: widget.delegate.queryTextController,

View file

@ -13,7 +13,7 @@ class ActionPanel extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final color = highlight ? Theme.of(context).accentColor : Colors.blueGrey; final color = highlight ? Theme.of(context).colorScheme.secondary : Colors.blueGrey;
return AnimatedContainer( return AnimatedContainer(
foregroundDecoration: BoxDecoration( foregroundDecoration: BoxDecoration(
color: color.withOpacity(.2), color: color.withOpacity(.2),

View file

@ -77,7 +77,7 @@ class _DrawerAlbumTabState extends State<DrawerAlbumTab> {
}); });
}, },
style: ButtonStyle( style: ButtonStyle(
side: MaterialStateProperty.all<BorderSide>(BorderSide(color: Theme.of(context).accentColor)), side: MaterialStateProperty.all<BorderSide>(BorderSide(color: Theme.of(context).colorScheme.secondary)),
foregroundColor: MaterialStateProperty.all<Color>(Colors.white), foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
), ),
icon: const Icon(AIcons.add), icon: const Icon(AIcons.add),

View file

@ -93,7 +93,7 @@ class StatsPage extends StatelessWidget {
percent: withGpsPercent, percent: withGpsPercent,
lineHeight: lineHeight, lineHeight: lineHeight,
backgroundColor: Colors.white24, backgroundColor: Colors.white24,
progressColor: Theme.of(context).accentColor, progressColor: Theme.of(context).colorScheme.secondary,
animation: true, animation: true,
leading: const Icon(AIcons.location), leading: const Icon(AIcons.location),
// right padding to match leading, so that inside label is aligned with outside label below // right padding to match leading, so that inside label is aligned with outside label below

View file

@ -524,9 +524,9 @@ class _EntryViewerStackState extends State<EntryViewerStack> with FeedbackMixin,
// system UI // system UI
static void _showSystemUI() => SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); static void _showSystemUI() => SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
static void _hideSystemUI() => SystemChrome.setEnabledSystemUIOverlays([]); static void _hideSystemUI() => SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
// overlay // overlay

View file

@ -140,9 +140,9 @@ class _PanoramaPageState extends State<PanoramaPage> {
// system UI // system UI
static void _showSystemUI() => SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); static void _showSystemUI() => SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
static void _hideSystemUI() => SystemChrome.setEnabledSystemUIOverlays([]); static void _hideSystemUI() => SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
// overlay // overlay

View file

@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "22.0.0" version: "25.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.1" version: "2.2.0"
archive: archive:
dependency: transitive dependency: transitive
description: description:
@ -35,7 +35,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.6.1" version: "2.8.1"
barcode: barcode:
dependency: transitive dependency: transitive
description: description:
@ -63,7 +63,7 @@ packages:
name: charcode name: charcode
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.3.1"
charts_common: charts_common:
dependency: transitive dependency: transitive
description: description:
@ -74,9 +74,11 @@ packages:
charts_flutter: charts_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
name: charts_flutter path: charts_flutter
url: "https://pub.dartlang.org" ref: HEAD
source: hosted resolved-ref: "30477090290b348ed3101bc13017aae465f59017"
url: "git://github.com/google/charts.git"
source: git
version: "0.11.0" version: "0.11.0"
cli_util: cli_util:
dependency: transitive dependency: transitive
@ -251,7 +253,7 @@ packages:
description: description:
path: "." path: "."
ref: HEAD ref: HEAD
resolved-ref: b80a0b322622f28bd783cccef3663aa7aa806e01 resolved-ref: e0380a550c4be0ef52a70f398c2211fc503094e8
url: "git://github.com/deckerst/expansion_tile_card.git" url: "git://github.com/deckerst/expansion_tile_card.git"
source: git source: git
version: "2.0.0" version: "2.0.0"
@ -284,7 +286,7 @@ packages:
name: file name: file
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.1.0" version: "6.1.2"
firebase_core: firebase_core:
dependency: "direct main" dependency: "direct main"
description: description:
@ -408,6 +410,13 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
frontend_server_client:
dependency: transitive
description:
name: frontend_server_client
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
fuchsia_remote_debug_protocol: fuchsia_remote_debug_protocol:
dependency: transitive dependency: transitive
description: flutter description: flutter
@ -517,7 +526,7 @@ packages:
name: json_annotation name: json_annotation
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.1" version: "4.1.0"
latlong2: latlong2:
dependency: "direct main" dependency: "direct main"
description: description:
@ -573,7 +582,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.7.0"
mgrs_dart: mgrs_dart:
dependency: transitive dependency: transitive
description: description:
@ -762,7 +771,7 @@ packages:
name: petitparser name: petitparser
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.1.0" version: "4.2.0"
platform: platform:
dependency: transitive dependency: transitive
description: description:
@ -804,7 +813,7 @@ packages:
name: process name: process
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.2.1" version: "4.2.3"
proj4dart: proj4dart:
dependency: transitive dependency: transitive
description: description:
@ -949,7 +958,7 @@ packages:
name: sqflite_common name: sqflite_common
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.0.1+1"
stack_trace: stack_trace:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1014,21 +1023,21 @@ packages:
name: test name: test
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.16.8" version: "1.17.10"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.0" version: "0.4.2"
test_core: test_core:
dependency: transitive dependency: transitive
description: description:
name: test_core name: test_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.19" version: "0.4.0"
transparent_image: transparent_image:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1119,7 +1128,7 @@ packages:
name: vm_service name: vm_service
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.2.0" version: "7.1.1"
watcher: watcher:
dependency: transitive dependency: transitive
description: description:
@ -1154,7 +1163,7 @@ packages:
name: win32 name: win32
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.8" version: "2.2.9"
wkt_parser: wkt_parser:
dependency: transitive dependency: transitive
description: description:
@ -1175,7 +1184,7 @@ packages:
name: xml name: xml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.1.2" version: "5.2.0"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:

View file

@ -12,7 +12,11 @@ dependencies:
sdk: flutter sdk: flutter
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
# TODO TLAD as of 2021/09/09, the released version is incompatible with Flutter v2.5
charts_flutter: charts_flutter:
git:
url: git://github.com/google/charts.git
path: charts_flutter
collection: collection:
connectivity_plus: connectivity_plus:
country_code: country_code:
@ -113,7 +117,7 @@ flutter:
# Test driver # Test driver
# run (any device): # run (any device):
# % flutter drive -t test_driver/app.dart # % flutter drive -t test_driver/app.dart --profile
# capture shaders in profile mode (real device only): # capture shaders in profile mode (real device only):
# % flutter drive -t test_driver/app.dart --profile --cache-sksl --write-sksl-on-exit shaders.sksl.json # % flutter drive -t test_driver/app.dart --profile --cache-sksl --write-sksl-on-exit shaders.sksl.json

1
shaders.sksl.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
shaders_2.5.0.sksl.json Normal file

File diff suppressed because one or more lines are too long

View file

@ -34,6 +34,7 @@ Future<void> configureAndLaunch() async {
await settings.init(); await settings.init();
settings.keepScreenOn = KeepScreenOn.always; settings.keepScreenOn = KeepScreenOn.always;
settings.hasAcceptedTerms = false; settings.hasAcceptedTerms = false;
settings.isCrashlyticsEnabled = false;
settings.locale = const Locale('en'); settings.locale = const Locale('en');
settings.homePage = HomePageSetting.collection; settings.homePage = HomePageSetting.collection;
settings.imageBackground = EntryBackground.checkered; settings.imageBackground = EntryBackground.checkered;