Skip to content

Commit

Permalink
Merge branch 'dev' into feat/new-reader
Browse files Browse the repository at this point in the history
  • Loading branch information
appdevelpo committed Feb 7, 2024
2 parents defb36b + bab32d1 commit 663ba34
Showing 1 changed file with 40 additions and 31 deletions.
71 changes: 40 additions & 31 deletions lib/views/widgets/detail/detail_episodes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,47 @@ class _DetailEpisodesState extends State<DetailEpisodes> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// select 选择框
if (episodes.isNotEmpty) ...[
Container(
margin: const EdgeInsets.only(left: 8, top: 5, right: 8),
padding:
const EdgeInsets.only(left: 20, right: 20, top: 5, bottom: 5),
decoration: BoxDecoration(
// 背景颜色为 primaryContainer
color: Theme.of(context).colorScheme.primaryContainer,
borderRadius: const BorderRadius.all(
Radius.circular(10),
),
),
child: DropdownButton<int>(
// 内容为 primary 颜色
style: TextStyle(color: Theme.of(context).colorScheme.primary),
isExpanded: true,
underline: const SizedBox(),
value: c.selectEpGroup.value,
items: dropdownItems,
onChanged: (value) {
if (episodes.isNotEmpty)
SizedBox(
child: Row(children: [
IconButton(
onPressed: () {
setState(() {
c.selectEpGroup.value = value!;
isRevered = !isRevered;
});
},
)),
icon: isRevered
? const Icon(Icons.keyboard_double_arrow_up_rounded)
: const Icon(Icons.keyboard_double_arrow_down_rounded)),
Expanded(
flex: 1,
child: Container(
margin: const EdgeInsets.only(left: 8, top: 5, right: 8),
padding: const EdgeInsets.only(
left: 20, right: 20, top: 5, bottom: 5),
decoration: BoxDecoration(
// 背景颜色为 primaryContainer
color: Theme.of(context).colorScheme.primaryContainer,
borderRadius:
const BorderRadius.all(Radius.circular(10))),
child: DropdownButton<int>(
// 内容为 primary 颜色
style: TextStyle(
color: Theme.of(context).colorScheme.primary),
isExpanded: true,
underline: const SizedBox(),
value: c.selectEpGroup.value,
items: dropdownItems,
onChanged: (value) {
setState(() {
c.selectEpGroup.value = value!;
});
},
)))
])),
if (episodes.isNotEmpty)
Container(
margin: const EdgeInsets.only(left: 16, top: 10),
margin: const EdgeInsets.only(left: 16, top: 10, bottom: 10),
child: Row(children: [
Text(
FlutterI18n.translate(
Expand All @@ -74,20 +88,15 @@ class _DetailEpisodesState extends State<DetailEpisodes> {
fontSize: 18,
),
),
Transform.flip(
flipY: isRevered,
child: IconButton(
IconButton(
onPressed: () {
setState(() {
isRevered = !isRevered;
});
},
icon: const Icon(Icons.sort_rounded),
),
)
icon: const Icon(Icons.sort_rounded))
]),
)
],
),
Expanded(
child: ListView.builder(
padding: const EdgeInsets.all(0),
Expand Down

0 comments on commit 663ba34

Please sign in to comment.