mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
chore: Lots of bug fixes and navigation improvements
This commit is contained in:
parent
9bb5e81812
commit
92d5391b93
35 changed files with 513 additions and 455 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
|
@ -19,6 +21,7 @@ class HorizontalList<T> extends ConsumerStatefulWidget {
|
|||
final Widget Function(BuildContext context, int index) itemBuilder;
|
||||
final bool scrollToEnd;
|
||||
final EdgeInsets contentPadding;
|
||||
final double? dominantRatio;
|
||||
final double? height;
|
||||
final bool shrinkWrap;
|
||||
const HorizontalList({
|
||||
|
|
@ -33,6 +36,7 @@ class HorizontalList<T> extends ConsumerStatefulWidget {
|
|||
this.contentPadding = const EdgeInsets.symmetric(horizontal: 16),
|
||||
this.subtext,
|
||||
this.shrinkWrap = false,
|
||||
this.dominantRatio,
|
||||
super.key,
|
||||
});
|
||||
|
||||
|
|
@ -201,9 +205,11 @@ class _HorizontalListState extends ConsumerState<HorizontalList> {
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
SizedBox(
|
||||
height: (widget.height ??
|
||||
AdaptiveLayout.poster(context).size *
|
||||
ref.watch(clientSettingsProvider.select((value) => value.posterSize))),
|
||||
height: widget.height ??
|
||||
((AdaptiveLayout.poster(context).size *
|
||||
ref.watch(clientSettingsProvider.select((value) => value.posterSize))) /
|
||||
pow((widget.dominantRatio ?? 1.0), 0.55)) *
|
||||
0.72,
|
||||
child: ListView.separated(
|
||||
controller: _scrollController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue