Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
d-reader-luka committed May 29, 2024
1 parent 9a2bf55 commit 2044297
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,118 +34,60 @@ class DiscoverScrollView extends ConsumerWidget {
required bool isDetailedView,
required WidgetRef ref,
}) {
// return switch (scrollListType) {
// ScrollListType.comicList => isDetailedView
// ? ComicList(
// provider: ref.read(
// paginatedComicsProvider(
// query,
// ),
// ),
// )
// : ComicGallery(
// provider: ref.read(
// paginatedComicsProvider(
// query,
// ),
// ),
// ),
// ScrollListType.issueList => isDetailedView
// ? IssuesList(
// provider: ref.read(
// paginatedIssuesProvider(
// query,
// ),
// ),
// )
// : IssuesGallery(
// provider: ref.read(
// paginatedIssuesProvider(
// query,
// ),
// ),
// ),
// ScrollListType.creatorList => isDetailedView
// ? CreatorsList(
// provider: ref.read(
// paginatedCreatorsProvider(
// query,
// ),
// ),
// )
// : CreatorsGallery(
// provider: ref.read(
// paginatedCreatorsProvider(
// query,
// ),
// ),
// ),
// ScrollListType.collectiblesList => ComicList(
// provider: ref.read(
// paginatedComicsProvider(
// query,
// ),
// ),
// ),
// };
switch (scrollListType) {
case ScrollListType.comicList:
return isDetailedView
? ComicList(
provider: ref.read(
paginatedComicsProvider(
query,
),
return switch (scrollListType) {
ScrollListType.comicList => isDetailedView
? ComicList(
provider: ref.read(
paginatedComicsProvider(
query,
),
)
: ComicGallery(
provider: ref.read(
paginatedComicsProvider(
query,
),
),
)
: ComicGallery(
provider: ref.read(
paginatedComicsProvider(
query,
),
);
case ScrollListType.issueList:
return isDetailedView
? IssuesList(
provider: ref.read(
paginatedIssuesProvider(
query,
),
),
),
ScrollListType.issueList => isDetailedView
? IssuesList(
provider: ref.read(
paginatedIssuesProvider(
query,
),
)
: IssuesGallery(
provider: ref.read(
paginatedIssuesProvider(
query,
),
),
)
: IssuesGallery(
provider: ref.read(
paginatedIssuesProvider(
query,
),
);
case ScrollListType.creatorList:
return isDetailedView
? CreatorsList(
provider: ref.read(
paginatedCreatorsProvider(
query,
),
),
),
ScrollListType.creatorList => isDetailedView
? CreatorsList(
provider: ref.read(
paginatedCreatorsProvider(
query,
),
)
: CreatorsGallery(
provider: ref.read(
paginatedCreatorsProvider(
query,
),
),
)
: CreatorsGallery(
provider: ref.read(
paginatedCreatorsProvider(
query,
),
);
case ScrollListType.collectiblesList:
return ComicList(
),
),
ScrollListType.collectiblesList => ComicList(
provider: ref.read(
paginatedComicsProvider(
query,
),
),
);
}
),
};
}

@override
Expand Down
16 changes: 8 additions & 8 deletions lib/features/home/presentation/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,14 @@ class HomeView extends ConsumerWidget {
),
),
SliverList(
delegate: SliverChildListDelegate(
[
Container(
color: Colors.transparent,
padding: const EdgeInsets.only(
delegate: SliverChildBuilderDelegate(
(context, index) {
return const Padding(
padding: EdgeInsets.only(
left: 16,
top: 8.0,
),
child: const Column(
child: Column(
children: [
SizedBox(
height: 24,
Expand Down Expand Up @@ -146,8 +145,9 @@ class HomeView extends ConsumerWidget {
),
],
),
),
],
);
},
childCount: 1,
),
),
],
Expand Down
1 change: 1 addition & 0 deletions lib/features/library/presentation/screens/library.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class NewLibraryViewState extends ConsumerState<NewLibraryView>
),
),
floatHeaderSlivers: true,
physics: const BouncingScrollPhysics(),
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return [
SliverToBoxAdapter(
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/widgets/scaffolds/d_reader_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:d_reader_flutter/shared/theme/app_colors.dart';
import 'package:d_reader_flutter/features/discover/root/presentation/screens/discover.dart';
import 'package:d_reader_flutter/features/home/presentation/screens/home.dart';
import 'package:d_reader_flutter/features/library/presentation/screens/library.dart';
import 'package:d_reader_flutter/features/settings/presentation/screens/root.dart';
import 'package:d_reader_flutter/features/settings/presentation/screens/settings.dart';
import 'package:d_reader_flutter/shared/widgets/layout/custom_bottom_navigation_bar.dart';
import 'package:d_reader_flutter/shared/widgets/unsorted/test_mode_widget.dart';
import 'package:d_reader_flutter/features/settings/presentation/widgets/referrals/bottom_navigation.dart';
Expand Down

0 comments on commit 2044297

Please sign in to comment.