Skip to content

Commit

Permalink
version 1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Predidit committed Apr 7, 2024
1 parent 5ff7f62 commit d1d0a10
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 41 deletions.
134 changes: 95 additions & 39 deletions lib/bean/anime/anime_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,104 @@ class _BangumiPanelState extends State<BangumiPanel> {
return Observer(builder: (context) {
return Column(
children: [
Platform.isWindows ? Column(
children: [
const SizedBox(height: 7),
SizedBox(height: 0, child: Text(' 正在播放:${videoController.title}'))
],
) : Padding(
padding: const EdgeInsets.only(top: 10, bottom: 6),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text('合集 '),
Expanded(
child: Text(
' 正在播放:${videoController.title}',
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12,
color: Theme.of(context).colorScheme.outline,
),
),
),
const SizedBox(width: 10),
SizedBox(
height: 34,
child: TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
Platform.isWindows
? Column(
children: [
const SizedBox(height: 7),
SizedBox(
height: 0,
child: Text(' 正在播放:${videoController.title}'))
],
)
: Padding(
padding: const EdgeInsets.only(top: 10, bottom: 6),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text('合集 '),
Expanded(
child: Text(
' 正在播放:${videoController.title}',
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12,
color: Theme.of(context).colorScheme.outline,
),
),
),
const SizedBox(width: 10),
SizedBox(
height: 34,
child: TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
),

// Todo 展示更多
onPressed: () => {},
child: Text(
'全${videoController.token.length}话',
style: const TextStyle(fontSize: 13),
),
// Todo 展示更多
onPressed: () {
if (MediaQuery.sizeOf(context).height <
MediaQuery.sizeOf(context).width) {
SmartDialog.show(
useAnimation: false,
builder: (context) {
return AlertDialog(
title: const Text('切换选集'),
content: StatefulBuilder(builder:
(BuildContext context,
StateSetter setState) {
return Wrap(
spacing: 8,
runSpacing: 2,
children: [
for (int i = 1;
i <=
videoController
.token.length;
i++) ...<Widget>[
if (i ==
videoController
.episode) ...<Widget>[
FilledButton(
onPressed: () async {
SmartDialog.dismiss();
},
child:
Text('第${i.toString()}话'),
),
] else ...[
FilledButton.tonal(
onPressed: () async {
videoController
.changeEpisode(i);
SmartDialog.dismiss();
},
child:
Text('第${i.toString()}话'),
),
]
]
],
);
}),
);
});
}
},
child: Text(
'全${videoController.token.length}话',
style: const TextStyle(fontSize: 13),
),
),
),
],
),
),
],
),
),
SizedBox(
height: Platform.isWindows ? 72 : (MediaQuery.of(context).size.height - (MediaQuery.of(context).size.width * 9 /16 ) - 100),
height: Platform.isWindows
? 72
: (MediaQuery.of(context).size.height -
(MediaQuery.of(context).size.width * 9 / 16) -
100),
// width: Platform.isWindows ? 300: null,
child: GridView.builder(
controller: listViewScrollCtr,
Expand All @@ -93,7 +149,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
clipBehavior: Clip.hardEdge,
child: InkWell(
onTap: () {
changeFucCall(i + 1);
changeFucCall(i + 1);
},
child: Padding(
padding: const EdgeInsets.symmetric(
Expand Down
2 changes: 1 addition & 1 deletion lib/request/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Api {
static const String domain = HttpString.baseUrl + '/';
static const String animeList = 'https://d1zquzjgwo9yb.cloudfront.net/';
static const String videoAPI = 'https://v.anime1.me/api';
static const String version = '1.1.4';
static const String version = '1.1.5';
static const String sourceUrl = "https://github.com/Predidit/oneAnime";
static const String aniDanmakuAPI = "https://ani.gamer.com.tw/ajax/danmuGet.php";
static const String aniSearch = "https://ani.gamer.com.tw/search.php";
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.1.4+1
version: 1.1.5+1

environment:
sdk: '>=3.2.6 <4.0.0'
Expand Down

0 comments on commit d1d0a10

Please sign in to comment.