Skip to content

Commit

Permalink
added space shortcut and fixed dioexception
Browse files Browse the repository at this point in the history
  • Loading branch information
DattatreyaReddy committed Nov 11, 2023
1 parent 5a639d9 commit 6e7ae98
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 51 deletions.
3 changes: 3 additions & 0 deletions lib/src/constants/reader_keyboard_shortcuts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class HideQuickOpenIntent extends Intent {}

ShortcutManager readerShortcutManager(Axis scrollDirection) => ShortcutManager(
shortcuts: {
const SingleActivator(LogicalKeyboardKey.space): NextScrollIntent(),
const SingleActivator(LogicalKeyboardKey.space, shift: true):
PreviousScrollIntent(),
const SingleActivator(LogicalKeyboardKey.arrowLeft):
scrollDirection == Axis.horizontal
? PreviousScrollIntent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class AboutScreen extends HookConsumerWidget {
useEffect(() {
aboutAsync.showToastOnError(toast, withMicrotask: true);
return;
}, [aboutAsync.value]);
}, [aboutAsync.valueOrNull]);

return Scaffold(
appBar: AppBar(title: Text(context.l10n!.about)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ExtensionScreen extends HookConsumerWidget {
withMicrotask: true,
);
return;
}, [extensionMapData.value]);
}, [extensionMapData.valueOrNull]);

return extensionMapData.showUiWhenData(
context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SourceScreen extends HookConsumerWidget {
withMicrotask: true,
);
return;
}, [sourceMapData.value]);
}, [sourceMapData.valueOrNull]);

return sourceMapData.showUiWhenData(
context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class EditCategoryScreen extends HookConsumerWidget {
withMicrotask: true,
);
return;
}, [categoryList.value]);
}, [categoryList.valueOrNull]);

return Scaffold(
appBar: AppBar(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class LibraryScreen extends HookConsumerWidget {
useEffect(() {
categoryList.showToastOnError(toast, withMicrotask: true);
return;
}, [categoryList.value]);
}, [categoryList.valueOrNull]);

return categoryList.showUiWhenData(
context,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ReaderScreen extends HookConsumerWidget {
),
),
);
}, [chapter.value]);
}, [chapter.valueOrNull]);

final onPageChanged = useCallback<AsyncValueSetter<int>>(
(int index) async {
Expand Down
3 changes: 2 additions & 1 deletion lib/src/routes/router_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ class LibraryRoute extends GoRouteData {
@override
Page<void> buildPage(BuildContext context, GoRouterState state) =>
NoTransitionPage(
child: LibraryScreen(initialCategoryOrder: initialCategoryOrder));
child: LibraryScreen(initialCategoryOrder: initialCategoryOrder),
);
}

class UpdatesRoute extends GoRouteData {
Expand Down
80 changes: 40 additions & 40 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ packages:
dependency: transitive
description:
name: archive
sha256: "7e0d52067d05f2e0324268097ba723b71cb41ac8a6a2b24d1edf9c536b987b03"
sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b"
url: "https://pub.dev"
source: hosted
version: "3.4.6"
version: "3.4.9"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -77,10 +77,10 @@ packages:
dependency: transitive
description:
name: build_daemon
sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65"
sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "4.0.1"
build_resolvers:
dependency: transitive
description:
Expand Down Expand Up @@ -117,10 +117,10 @@ packages:
dependency: transitive
description:
name: built_value
sha256: a8de5955205b4d1dbbbc267daddf2178bd737e4bab8987c04a500478c9651e74
sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e"
url: "https://pub.dev"
source: hosted
version: "8.6.3"
version: "8.7.0"
cached_network_image:
dependency: "direct main"
description:
Expand Down Expand Up @@ -245,18 +245,18 @@ packages:
dependency: transitive
description:
name: custom_lint
sha256: "32ca92485d52095d1296c99c8ab922d112a99f190dac1568aa369fe701038a33"
sha256: f9a828b696930cf8307f9a3617b2b65c9b370e484dc845d69100cadb77506778
url: "https://pub.dev"
source: hosted
version: "0.5.4"
version: "0.5.6"
custom_lint_core:
dependency: transitive
description:
name: custom_lint_core
sha256: c7399ebeb235a9d4025c68aa9475ddeee30782af331c406313c63fcc2c33cb03
sha256: e20a67737adcf0cf2465e734dd624af535add11f9edd1f2d444909b5b0749650
url: "https://pub.dev"
source: hosted
version: "0.5.4"
version: "0.5.6"
dart_style:
dependency: transitive
description:
Expand Down Expand Up @@ -333,10 +333,10 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: "903dd4ba13eae7cef64acc480e91bf54c3ddd23b5b90b639c170f3911e489620"
sha256: "4e42aacde3b993c5947467ab640882c56947d9d27342a5b6f2895b23956954a6"
url: "https://pub.dev"
source: hosted
version: "6.0.0"
version: "6.1.1"
fixnum:
dependency: transitive
description:
Expand Down Expand Up @@ -402,10 +402,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256: ad76540d21c066228ee3f9d1dad64a9f7e46530e8bb7c85011a88bc1fd874bc5
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
url: "https://pub.dev"
source: hosted
version: "3.0.0"
version: "3.0.1"
flutter_localizations:
dependency: "direct main"
description: flutter
Expand All @@ -415,18 +415,18 @@ packages:
dependency: "direct main"
description:
name: flutter_markdown
sha256: "8afc9a6aa6d8e8063523192ba837149dbf3d377a37c0b0fc579149a1fbd4a619"
sha256: "35108526a233cc0755664d445f8a6b4b61e6f8fe993b3658b80b4a26827fc196"
url: "https://pub.dev"
source: hosted
version: "0.6.18"
version: "0.6.18+2"
flutter_native_splash:
dependency: "direct dev"
description:
name: flutter_native_splash
sha256: "5bf4c3e5e5a0426c1e2fc8ca3555a9e617e76369c3442e1dae8385c7767ba97a"
sha256: d93394f22f73e810bda59e11ebe83329c5511d6460b6b7509c4e1f3c92d6d625
url: "https://pub.dev"
source: hosted
version: "2.3.4"
version: "2.3.5"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
Expand All @@ -439,10 +439,10 @@ packages:
dependency: transitive
description:
name: flutter_riverpod
sha256: bdba94be666ecb1beeb0f5a748d96cdd6a37215f27e6b48c7673b95cecb800c8
sha256: "305203d1578f6857675f9730568548b03900ce53afd319f4aa9d2fa943334dbe"
url: "https://pub.dev"
source: hosted
version: "2.4.4"
version: "2.4.5"
flutter_staggered_grid_view:
dependency: transitive
description:
Expand All @@ -465,10 +465,10 @@ packages:
dependency: "direct main"
description:
name: fluttertoast
sha256: "474f7d506230897a3cd28c965ec21c5328ae5605fc9c400cd330e9e9d6ac175c"
sha256: "69a5c4fcfe9a163bc927ff386c0dedd62575913bba942d0ce80c1fd092885255"
url: "https://pub.dev"
source: hosted
version: "8.2.2"
version: "8.2.3"
font_awesome_flutter:
dependency: "direct main"
description:
Expand Down Expand Up @@ -513,18 +513,18 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: a206cc4621a644531a2e05e7774616ab4d9d85eab1f3b0e255f3102937fccab1
sha256: c247a4f76071c3b97bb5ae8912968870d5565644801c5e09f3bc961b4d874895
url: "https://pub.dev"
source: hosted
version: "12.0.0"
version: "12.1.1"
go_router_builder:
dependency: "direct dev"
description:
name: go_router_builder
sha256: b004ed761578fd1326054ff9c97daaf7b94f109b24cad843ca8bd349a810f947
sha256: a4820cf40c647d674aa9305cdac2eaa6d03a795bb8f6b30c0469939417f7c4d8
url: "https://pub.dev"
source: hosted
version: "2.3.3"
version: "2.3.4"
graphs:
dependency: transitive
description:
Expand All @@ -545,10 +545,10 @@ packages:
dependency: "direct main"
description:
name: hooks_riverpod
sha256: "0e02037e6fd3511a06ab4770b1a766d2d9bb576f85780d5bb452ca53e3311044"
sha256: "2827136ecc0c2abffc3a58e575db6d5b84d159977fa1edc223c97bf566aa8c73"
url: "https://pub.dev"
source: hosted
version: "2.4.4"
version: "2.4.5"
html:
dependency: transitive
description:
Expand Down Expand Up @@ -913,26 +913,26 @@ packages:
dependency: transitive
description:
name: riverpod
sha256: "2af3d127a6e4e34b89b8f1f018086f5ded04b8e538174f0510bba3e4c0d878b1"
sha256: "2e84315036e64c59affaff7443dea51247bc2fe704461a32f26a27986fb63d55"
url: "https://pub.dev"
source: hosted
version: "2.4.4"
version: "2.4.5"
riverpod_analyzer_utils:
dependency: transitive
description:
name: riverpod_analyzer_utils
sha256: "70e556220b6563a8cd4e392f73c543d9f6999dadea2428f31bda2bbc3a2675bd"
sha256: "22a089135785f27e601075023f93c6622c43ef28c3ba1bef303cfbc314028e64"
url: "https://pub.dev"
source: hosted
version: "0.4.2"
version: "0.4.3"
riverpod_annotation:
dependency: "direct main"
description:
name: riverpod_annotation
sha256: "388b03ed91b8f5126318fa43221fe078ebc20c81523dec9fcb5237cb5431d4dd"
sha256: "9330309e4400f40e39a2a1d1c340e775d0fd23451cf2dd2286e03c7896fd2bd5"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
version: "2.3.0"
riverpod_generator:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -1094,10 +1094,10 @@ packages:
dependency: transitive
description:
name: sqflite_common
sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a"
sha256: "8ed044102f3135add97be8653662052838859f5400075ef227f8ad72ae320803"
url: "https://pub.dev"
source: hosted
version: "2.5.0"
version: "2.5.0+1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -1198,10 +1198,10 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256: fa6675dc49dea33b0f228bca6f9ad5445c25b51284ca5f88c0d49ab770a0450a
sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba
url: "https://pub.dev"
source: hosted
version: "6.2.0"
version: "6.2.1"
url_launcher_android:
dependency: transitive
description:
Expand Down Expand Up @@ -1262,10 +1262,10 @@ packages:
dependency: transitive
description:
name: uuid
sha256: b715b8d3858b6fa9f68f87d20d98830283628014750c2b09b6f516c1da4af2a7
sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921
url: "https://pub.dev"
source: hosted
version: "4.1.0"
version: "4.2.1"
vector_math:
dependency: transitive
description:
Expand Down

0 comments on commit 6e7ae98

Please sign in to comment.