mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: rank page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -30,52 +30,59 @@ class _RankPageState extends State<RankPage>
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 18,
|
flex: 18,
|
||||||
child: ListView.builder(
|
child: SingleChildScrollView(
|
||||||
physics: const AlwaysScrollableScrollPhysics(
|
padding: EdgeInsets.only(
|
||||||
parent: BouncingScrollPhysics(),
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
itemCount: _rankController.tabs.length,
|
child: Column(
|
||||||
itemBuilder: (context, index) => IntrinsicHeight(
|
children: List.generate(
|
||||||
child: Obx(
|
_rankController.tabs.length,
|
||||||
() => InkWell(
|
(index) => Obx(
|
||||||
onTap: () {
|
() => IntrinsicHeight(
|
||||||
_rankController.initialIndex.value = index;
|
child: InkWell(
|
||||||
_rankController.tabController.animateTo(index);
|
onTap: () {
|
||||||
},
|
_rankController.initialIndex.value = index;
|
||||||
child: Container(
|
_rankController.tabController.animateTo(index);
|
||||||
color: index == _rankController.initialIndex.value
|
},
|
||||||
? Theme.of(context).colorScheme.onInverseSurface
|
child: ColoredBox(
|
||||||
: Colors.transparent,
|
color: index == _rankController.initialIndex.value
|
||||||
child: Row(
|
? Theme.of(context).colorScheme.onInverseSurface
|
||||||
mainAxisSize: MainAxisSize.min,
|
: Theme.of(context).colorScheme.surface,
|
||||||
children: [
|
child: Row(
|
||||||
Container(
|
mainAxisSize: MainAxisSize.min,
|
||||||
height: double.infinity,
|
children: [
|
||||||
width: 3,
|
Container(
|
||||||
color: index == _rankController.initialIndex.value
|
height: double.infinity,
|
||||||
? Theme.of(context).colorScheme.primary
|
width: 3,
|
||||||
: Colors.transparent,
|
color: index == _rankController.initialIndex.value
|
||||||
),
|
? Theme.of(context).colorScheme.primary
|
||||||
Expanded(
|
: Colors.transparent,
|
||||||
flex: 1,
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
|
||||||
child: Text(
|
|
||||||
_rankController.tabs[index]['label'],
|
|
||||||
style: TextStyle(
|
|
||||||
color: index ==
|
|
||||||
_rankController.initialIndex.value
|
|
||||||
? Theme.of(context).colorScheme.primary
|
|
||||||
: Theme.of(context).colorScheme.onSurface,
|
|
||||||
fontSize: 15,
|
|
||||||
),
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
),
|
||||||
),
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(vertical: 10),
|
||||||
|
child: Text(
|
||||||
|
_rankController.tabs[index]['label'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: index ==
|
||||||
|
_rankController.initialIndex.value
|
||||||
|
? Theme.of(context).colorScheme.primary
|
||||||
|
: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onSurface,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user