diff --git a/lib/features/comic_issue/data/datasource/comic_issue_data_source.dart b/lib/features/comic_issue/data/datasource/comic_issue_data_source.dart index e7d3a702..4d3cfd79 100644 --- a/lib/features/comic_issue/data/datasource/comic_issue_data_source.dart +++ b/lib/features/comic_issue/data/datasource/comic_issue_data_source.dart @@ -8,7 +8,7 @@ import 'package:d_reader_flutter/shared/exceptions/exceptions.dart'; abstract class ComicIssueDataSource { Future>> getComicIssues( {String? queryString}); - Future> getComicIssue(int id); + Future> getComicIssue(String id); Future> getComicIssuePages(int id); Future favouritiseIssue(int id); Future rateIssue({ @@ -32,7 +32,7 @@ class ComicIssueRemoteDataSource implements ComicIssueDataSource { } @override - Future> getComicIssue(int id) async { + Future> getComicIssue(String id) async { try { final response = await networkService.get('/comic-issue/get/$id'); return response.fold( diff --git a/lib/features/comic_issue/data/repositories/comic_issue_repository_impl.dart b/lib/features/comic_issue/data/repositories/comic_issue_repository_impl.dart index 90b60a07..0b1ddb47 100644 --- a/lib/features/comic_issue/data/repositories/comic_issue_repository_impl.dart +++ b/lib/features/comic_issue/data/repositories/comic_issue_repository_impl.dart @@ -17,7 +17,7 @@ class ComicIssueRepositoryImpl implements ComicIssueRepository { } @override - Future> getComicIssue(int id) { + Future> getComicIssue(String id) { return dataSource.getComicIssue(id); } diff --git a/lib/features/comic_issue/domain/repositories/comic_issue_repository.dart b/lib/features/comic_issue/domain/repositories/comic_issue_repository.dart index 19742caa..d05977c0 100644 --- a/lib/features/comic_issue/domain/repositories/comic_issue_repository.dart +++ b/lib/features/comic_issue/domain/repositories/comic_issue_repository.dart @@ -7,7 +7,7 @@ import 'package:d_reader_flutter/shared/exceptions/exceptions.dart'; abstract class ComicIssueRepository { Future>> getComicIssues( {String? queryString}); - Future> getComicIssue(int id); + Future> getComicIssue(String id); Future> getComicIssuePages(int id); Future favouritiseIssue(int id); Future rateIssue({ diff --git a/lib/features/comic_issue/presentation/providers/comic_issue_providers.dart b/lib/features/comic_issue/presentation/providers/comic_issue_providers.dart index 9be88928..acd1f9e5 100644 --- a/lib/features/comic_issue/presentation/providers/comic_issue_providers.dart +++ b/lib/features/comic_issue/presentation/providers/comic_issue_providers.dart @@ -16,7 +16,7 @@ part 'comic_issue_providers.g.dart'; @riverpod Future comicIssueDetails( - ComicIssueDetailsRef ref, int id) async { + ComicIssueDetailsRef ref, String id) async { final response = await ref.read(comicIssueRepositoryProvider).getComicIssue(id); return response.fold((exception) { diff --git a/lib/features/comic_issue/presentation/providers/comic_issue_providers.g.dart b/lib/features/comic_issue/presentation/providers/comic_issue_providers.g.dart index 2808286e..dec290f8 100644 --- a/lib/features/comic_issue/presentation/providers/comic_issue_providers.g.dart +++ b/lib/features/comic_issue/presentation/providers/comic_issue_providers.g.dart @@ -6,7 +6,7 @@ part of 'comic_issue_providers.dart'; // RiverpodGenerator // ************************************************************************** -String _$comicIssueDetailsHash() => r'94f3f85cd8e50f9e0fd73f801861846fcb838e4e'; +String _$comicIssueDetailsHash() => r'850ab351782b6d72c9bd5ac6ed34ddb6d9ead34c'; /// Copied from Dart SDK class _SystemHash { @@ -40,7 +40,7 @@ class ComicIssueDetailsFamily extends Family> { /// See also [comicIssueDetails]. ComicIssueDetailsProvider call( - int id, + String id, ) { return ComicIssueDetailsProvider( id, @@ -76,7 +76,7 @@ class ComicIssueDetailsProvider extends AutoDisposeFutureProvider { /// See also [comicIssueDetails]. ComicIssueDetailsProvider( - int id, + String id, ) : this._internal( (ref) => comicIssueDetails( ref as ComicIssueDetailsRef, @@ -104,7 +104,7 @@ class ComicIssueDetailsProvider required this.id, }) : super.internal(); - final int id; + final String id; @override Override overrideWith( @@ -145,7 +145,7 @@ class ComicIssueDetailsProvider mixin ComicIssueDetailsRef on AutoDisposeFutureProviderRef { /// The parameter `id` of this provider. - int get id; + String get id; } class _ComicIssueDetailsProviderElement @@ -154,7 +154,7 @@ class _ComicIssueDetailsProviderElement _ComicIssueDetailsProviderElement(super.provider); @override - int get id => (origin as ComicIssueDetailsProvider).id; + String get id => (origin as ComicIssueDetailsProvider).id; } String _$ownedIssuesHash() => r'833c572384821b22a8c5e23b2e55228f9a713613'; diff --git a/lib/features/comic_issue/presentation/providers/controller/comic_issue_controller.g.dart b/lib/features/comic_issue/presentation/providers/controller/comic_issue_controller.g.dart index d69363d1..2609953f 100644 --- a/lib/features/comic_issue/presentation/providers/controller/comic_issue_controller.g.dart +++ b/lib/features/comic_issue/presentation/providers/controller/comic_issue_controller.g.dart @@ -7,7 +7,7 @@ part of 'comic_issue_controller.dart'; // ************************************************************************** String _$comicIssueControllerHash() => - r'fdca2fd256604bb3ac9bc323d9ada0b9b4a939e0'; + r'39691badb1ba2ec469ebae1412ebcb8a6f8eb435'; /// See also [ComicIssueController]. @ProviderFor(ComicIssueController) diff --git a/lib/features/comic_issue/presentation/screens/comic_issue_details.dart b/lib/features/comic_issue/presentation/screens/comic_issue_details.dart index 7ac5b538..449ea007 100644 --- a/lib/features/comic_issue/presentation/screens/comic_issue_details.dart +++ b/lib/features/comic_issue/presentation/screens/comic_issue_details.dart @@ -31,7 +31,7 @@ import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; class ComicIssueDetails extends ConsumerStatefulWidget { - final int id; + final String id; const ComicIssueDetails({ super.key, required this.id, diff --git a/lib/features/e_reader/presentation/screens/e_reader.dart b/lib/features/e_reader/presentation/screens/e_reader.dart index a88f910f..443e088b 100644 --- a/lib/features/e_reader/presentation/screens/e_reader.dart +++ b/lib/features/e_reader/presentation/screens/e_reader.dart @@ -69,7 +69,7 @@ class _EReaderViewState extends ConsumerState AsyncValue> pagesProvider = ref.watch(comicIssuePagesProvider(widget.issueId)); AsyncValue issueProvider = - ref.watch(comicIssueDetailsProvider(widget.issueId)); + ref.watch(comicIssueDetailsProvider('${widget.issueId}')); final notifier = ref.read(isAppBarVisibleProvider.notifier); return NotificationListener( onNotification: (notification) { diff --git a/lib/features/e_reader/presentation/widgets/bottom_navigation.dart b/lib/features/e_reader/presentation/widgets/bottom_navigation.dart index 578d2455..ca2b5e39 100644 --- a/lib/features/e_reader/presentation/widgets/bottom_navigation.dart +++ b/lib/features/e_reader/presentation/widgets/bottom_navigation.dart @@ -23,7 +23,7 @@ class EReaderBottomNavigation extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final provider = ref.watch(comicIssueDetailsProvider(issueId)); + final provider = ref.watch(comicIssueDetailsProvider('$issueId')); return provider.maybeWhen( orElse: () { diff --git a/lib/features/library/presentation/providers/owned/owned_controller.dart b/lib/features/library/presentation/providers/owned/owned_controller.dart index c4771e1c..74912c17 100644 --- a/lib/features/library/presentation/providers/owned/owned_controller.dart +++ b/lib/features/library/presentation/providers/owned/owned_controller.dart @@ -37,7 +37,7 @@ class OwnedController extends _$OwnedController { goToNftDetails(ownedNfts.elementAt(properIndex).address); } final ComicIssueModel? comicIssue = await ref.read( - comicIssueDetailsProvider(comicIssueId).future, + comicIssueDetailsProvider('$comicIssueId').future, ); ref.read(selectedIssueInfoProvider.notifier).update((state) => comicIssue); } diff --git a/lib/features/library/presentation/providers/owned/owned_controller.g.dart b/lib/features/library/presentation/providers/owned/owned_controller.g.dart index 8dde0f57..d4d83e34 100644 --- a/lib/features/library/presentation/providers/owned/owned_controller.g.dart +++ b/lib/features/library/presentation/providers/owned/owned_controller.g.dart @@ -6,7 +6,7 @@ part of 'owned_controller.dart'; // RiverpodGenerator // ************************************************************************** -String _$ownedControllerHash() => r'49143879fa9ddc4ab670a93718844c5c2e31b76b'; +String _$ownedControllerHash() => r'811c297009c054b9061ce7b833e5103d346ea6bb'; /// See also [OwnedController]. @ProviderFor(OwnedController) diff --git a/lib/features/wallet/presentation/providers/wallet_notifier.g.dart b/lib/features/wallet/presentation/providers/wallet_notifier.g.dart index a0585861..8094059f 100644 --- a/lib/features/wallet/presentation/providers/wallet_notifier.g.dart +++ b/lib/features/wallet/presentation/providers/wallet_notifier.g.dart @@ -6,7 +6,7 @@ part of 'wallet_notifier.dart'; // RiverpodGenerator // ************************************************************************** -String _$walletControllerHash() => r'fc26270e77e16d3ee66fa526f668f98a6586f296'; +String _$walletControllerHash() => r'a391d7d792f2cf6c4098cae9502e01c54695c861'; /// See also [WalletController]. @ProviderFor(WalletController) diff --git a/lib/main_dev.dart b/lib/main_dev.dart index ef240e45..88550da3 100644 --- a/lib/main_dev.dart +++ b/lib/main_dev.dart @@ -83,12 +83,14 @@ class MyApp extends ConsumerWidget { ), navigationBarTheme: NavigationBarThemeData( height: 48, - labelTextStyle: MaterialStateProperty.all( - const TextStyle( - color: Colors.white, + labelTextStyle: MaterialStateProperty.resolveWith( + (Set states) => TextStyle( + color: states.contains(MaterialState.selected) + ? ColorPalette.dReaderYellow100 + : Colors.white, fontSize: 12, fontWeight: FontWeight.w500, - letterSpacing: 0.2, + letterSpacing: .2, ), ), ), diff --git a/lib/main_prod.dart b/lib/main_prod.dart index 0df6fd94..334c8050 100644 --- a/lib/main_prod.dart +++ b/lib/main_prod.dart @@ -93,12 +93,14 @@ class MyApp extends ConsumerWidget { ), navigationBarTheme: NavigationBarThemeData( height: 48, - labelTextStyle: MaterialStateProperty.all( - const TextStyle( - color: Colors.white, + labelTextStyle: MaterialStateProperty.resolveWith( + (Set states) => TextStyle( + color: states.contains(MaterialState.selected) + ? ColorPalette.dReaderYellow100 + : Colors.white, fontSize: 12, fontWeight: FontWeight.w500, - letterSpacing: 0.2, + letterSpacing: .2, ), ), ), diff --git a/lib/routing/router.dart b/lib/routing/router.dart index 2d89782b..2d07a814 100644 --- a/lib/routing/router.dart +++ b/lib/routing/router.dart @@ -151,7 +151,7 @@ final List homeRoutes = [ path: '${RoutePath.comicIssueDetails}/:id', builder: (context, state) { final id = state.pathParameters['id'] ?? ''; - return ComicIssueDetails(id: int.parse(id)); + return ComicIssueDetails(id: id); }, ), GoRoute( diff --git a/lib/shared/data/remote/notification_service.dart b/lib/shared/data/remote/notification_service.dart index 70863fed..04257517 100644 --- a/lib/shared/data/remote/notification_service.dart +++ b/lib/shared/data/remote/notification_service.dart @@ -19,9 +19,7 @@ handleNotificationAction(Map payload) { return routerNavigatorKey.currentState!.push( MaterialPageRoute( builder: (context) => ComicIssueDetails( - id: int.parse( - payload[NotificationDataKey.comicIssueId.stringValue], - ), + id: payload[NotificationDataKey.comicIssueId.stringValue], ), ), ); diff --git a/lib/shared/domain/providers/solana/solana_notifier.g.dart b/lib/shared/domain/providers/solana/solana_notifier.g.dart index aa3945d2..8e733fac 100644 --- a/lib/shared/domain/providers/solana/solana_notifier.g.dart +++ b/lib/shared/domain/providers/solana/solana_notifier.g.dart @@ -6,7 +6,7 @@ part of 'solana_notifier.dart'; // RiverpodGenerator // ************************************************************************** -String _$solanaNotifierHash() => r'be5ac9aa72c86665bf57477d913f6efc5ad8a333'; +String _$solanaNotifierHash() => r'19f67bb82a70f0c46b5fc61f7a3443e9699e6dc7'; /// See also [SolanaNotifier]. @ProviderFor(SolanaNotifier) diff --git a/lib/shared/domain/providers/solana/solana_transaction_notifier.g.dart b/lib/shared/domain/providers/solana/solana_transaction_notifier.g.dart index c677691b..801f08c5 100644 --- a/lib/shared/domain/providers/solana/solana_transaction_notifier.g.dart +++ b/lib/shared/domain/providers/solana/solana_transaction_notifier.g.dart @@ -7,7 +7,7 @@ part of 'solana_transaction_notifier.dart'; // ************************************************************************** String _$solanaTransactionNotifierHash() => - r'3719032e80671400f375615e2399b39d2736e7ed'; + r'0a21a02d926677b7f07988d92dc6ce3dbc55a2da'; /// See also [SolanaTransactionNotifier]. @ProviderFor(SolanaTransactionNotifier) diff --git a/lib/shared/widgets/layout/bottom_navigation_item_icon.dart b/lib/shared/widgets/layout/bottom_navigation_item_icon.dart index 8c75e1e4..c540031b 100644 --- a/lib/shared/widgets/layout/bottom_navigation_item_icon.dart +++ b/lib/shared/widgets/layout/bottom_navigation_item_icon.dart @@ -1,3 +1,4 @@ +import 'package:d_reader_flutter/shared/theme/app_colors.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -18,7 +19,7 @@ class BottomNavigationItemIcon extends StatelessWidget { imagePath, colorFilter: isActive ? const ColorFilter.mode( - Colors.white, + ColorPalette.dReaderYellow100, BlendMode.srcIn, ) : null, diff --git a/lib/shared/widgets/layout/custom_bottom_navigation_bar.dart b/lib/shared/widgets/layout/custom_bottom_navigation_bar.dart index bcdda63e..ec474550 100644 --- a/lib/shared/widgets/layout/custom_bottom_navigation_bar.dart +++ b/lib/shared/widgets/layout/custom_bottom_navigation_bar.dart @@ -2,7 +2,6 @@ import 'dart:ui'; import 'package:d_reader_flutter/config/config.dart'; import 'package:d_reader_flutter/shared/presentations/providers/global/scaffold_provider.dart'; -import 'package:d_reader_flutter/shared/theme/app_colors.dart'; import 'package:d_reader_flutter/shared/widgets/layout/bottom_navigation_item_icon.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -32,10 +31,10 @@ class CustomBottomNavigationBar extends ConsumerWidget { }, selectedIndex: ref.watch(scaffoldNavigationIndexProvider), backgroundColor: Colors.transparent, - indicatorColor: ColorPalette.dReaderYellow100, + indicatorColor: Colors.transparent, elevation: 0, - labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected, - animationDuration: const Duration(milliseconds: 700), + labelBehavior: NavigationDestinationLabelBehavior.alwaysShow, + overlayColor: const MaterialStatePropertyAll(Colors.transparent), destinations: const [ NavigationDestination( icon: BottomNavigationItemIcon( diff --git a/lib/shared/widgets/scaffolds/d_reader_scaffold.dart b/lib/shared/widgets/scaffolds/d_reader_scaffold.dart index d096ceb4..28011782 100644 --- a/lib/shared/widgets/scaffolds/d_reader_scaffold.dart +++ b/lib/shared/widgets/scaffolds/d_reader_scaffold.dart @@ -64,7 +64,8 @@ class _DReaderScaffoldState extends ConsumerState { AppBar( backgroundColor: Colors.transparent, shadowColor: Colors.transparent, - toolbarHeight: 40, + toolbarHeight: 42, + titleSpacing: 12, title: const Text( 'Settings', style: TextStyle(