Skip to content

Commit

Permalink
chore: bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
evan361425 committed Sep 11, 2024
1 parent b6bb34e commit e38691f
Show file tree
Hide file tree
Showing 26 changed files with 461 additions and 448 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-playstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.x"
flutter-version: "3.24.x"
cache: true
channel: "stable"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.x"
flutter-version: "3.24.x"
cache: true
channel: "stable"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# Setup the flutter environment.
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.x"
flutter-version: "3.24.x"
cache: true
channel: "stable"

Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"cupertino",
"firestore",
"Formattable",
"fullscreen",
"googleapis",
"Ingr",
"Linkify",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bump: ## Bump beta version
##@ Tools
.PHONY: mock
mock: ## Mock dependencies
flutter pub run build_runner build --delete-conflicting-outputs
dart run build_runner build --delete-conflicting-outputs

.PHONY: build-l10n
build-l10n: ## Build localization
Expand Down
98 changes: 0 additions & 98 deletions lib/components/router_pop_scope.dart

This file was deleted.

2 changes: 1 addition & 1 deletion lib/components/scrollable_draggable_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class _ScrollableDraggableSheetState extends State<ScrollableDraggableSheet> {
}
return PopScope(
canPop: controller.snapIndex.value == 0,
onPopInvoked: (popped) {
onPopInvokedWithResult: (popped, _) {
if (!popped) {
controller.reset();
}
Expand Down
6 changes: 3 additions & 3 deletions lib/components/style/snackbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Future<T?> showSnackbarWhenFailed<T>(
String code,
) {
return future.catchError((err) {
// print(err);
// print((err as Error).stackTrace);
showSnackBar(context, '${S.actError}:$err');
if (context.mounted) {
showSnackBar(context, '${S.actError}:$err');
}
Log.err(err, code, err is Error ? err.stackTrace : null);
return null;
});
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@@locale": "en",
"@@last_modified": "2024-09-11T07:30:16.339769Z",
"@@last_modified": "2024-09-11T08:15:55.169432Z",
"@@author": "Lu Shueh Chou",
"settingTab": "Settings",
"settingVersion": "Version: {version}",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@@locale": "zh",
"@@last_modified": "2024-09-11T07:30:16.362623Z",
"@@last_modified": "2024-09-11T08:15:55.195501Z",
"@@author": "Lu Shueh Chou",
"settingTab": "設定",
"settingVersion": "版本:{version}",
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/image_gallery_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ImageGalleryPageState extends State<ImageGalleryPage> {
primary: false,
leading: IconButton(
key: const Key('image_gallery.cancel'),
onPressed: () => onPopInvoked(false),
onPressed: () => onPopInvoked(false, null),
icon: const Icon(Icons.cancel),
),
actions: [
Expand Down Expand Up @@ -77,7 +77,7 @@ class ImageGalleryPageState extends State<ImageGalleryPage> {

return PopScope(
canPop: !selecting,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvoked,
child: fullScreen
? Dialog.fullscreen(child: body)
: AlertDialog(
Expand Down Expand Up @@ -248,7 +248,7 @@ class ImageGalleryPageState extends State<ImageGalleryPage> {
}
}

void onPopInvoked(bool didPop) {
void onPopInvoked(bool didPop, dynamic result) {
if (!didPop) {
cancelSelecting();
}
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/menu/menu_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class _MenuPageState extends State<MenuPage> {
return PopScope(
key: const Key('menu_page'),
canPop: selected == null,
onPopInvoked: _onPopInvoked,
onPopInvokedWithResult: _onPopInvoked,
child: Scaffold(
appBar: AppBar(
title: Text(selected?.name ?? S.menuTitle),
Expand Down Expand Up @@ -181,12 +181,12 @@ class _MenuPageState extends State<MenuPage> {
}

void _handlePop() {
if (_onPopInvoked(selected == null)) {
if (_onPopInvoked(selected == null, null)) {
PopButton.safePop(context, path: '${Routes.base}/_');
}
}

bool _onPopInvoked(bool didPop) {
bool _onPopInvoked(bool didPop, dynamic result) {
if (!didPop) {
_pageSlideTo(0).then((_) => setState(() => selected = null));
return false;
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/stock/widgets/stock_ingredient_list_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class _RestockDialogState extends State<_RestockDialog> {
style: Theme.of(context).textTheme.bodyLarge!,
child: PopScope(
canPop: true,
onPopInvoked: (popped) async {
onPopInvokedWithResult: (popped, _) async {
if (popped && widget.currentValue.value != null) {
final price = num.tryParse(controller.text);
if (price != null) {
Expand Down
6 changes: 5 additions & 1 deletion lib/ui/transit/plain_text/export_basic_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ class _ExportBasicViewState extends State<ExportBasicView> with SingleTickerProv
widget.exporter.export(able),
context,
'pt_export_failed',
).then((value) => showSnackBar(context, S.transitPTCopySuccess));
).then((value) {
if (mounted) {
showSnackBar(context, S.transitPTCopySuccess);
}
});
}
}
6 changes: 5 additions & 1 deletion lib/ui/transit/plain_text/export_order_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ class ExportOrderView extends StatelessWidget {
export(),
context,
'pt_export_failed',
).then((value) => showSnackBar(context, S.transitPTCopySuccess));
).then((value) {
if (context.mounted) {
showSnackBar(context, S.transitPTCopySuccess);
}
});
},
),
),
Expand Down
Loading

0 comments on commit e38691f

Please sign in to comment.