Skip to content

Commit

Permalink
Almost ready for build
Browse files Browse the repository at this point in the history
  • Loading branch information
femalemonkeyman committed May 21, 2023
1 parent 9d9e7e3 commit 4cf2592
Show file tree
Hide file tree
Showing 21 changed files with 1,019 additions and 912 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install project dependencies
run: flutter pub get
- name: Build artifacts
run: flutter build linux --release -v
run: flutter build linux --release -v --split-debug-info=''
- uses: actions/upload-artifact@v3
with:
name: Linux
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Install project dependencies
run: flutter pub get
- name: Build artifacts
run: flutter build windows --release
run: flutter build windows --release --split-debug-info=''
- uses: actions/upload-artifact@v3
with:
name: Windows
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- name: Install dependencies
run: flutter pub get

- run: flutter build apk --release
- run: flutter build apk --release --split-debug-info=''
- uses: actions/upload-artifact@v3
with:
name: android
Expand All @@ -116,7 +116,7 @@ jobs:
- name: Install project dependencies
run: flutter pub get
- name: Build artifacts
run: flutter build macos --release
run: flutter build macos --release --split-debug-info=''
- uses: actions/upload-artifact@v3
with:
name: MacOS
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
- name: Install project dependencies
run: flutter pub get
- name: Build artifacts
run: flutter build ios --no-codesign
run: flutter build ios --no-codesign --split-debug-info=''
- run: mkdir build/ios/iphoneos/Payload
- run: mv build/ios/iphoneos/Runner.app build/ios/iphoneos/Payload/Runner.app
- name: Archive Release
Expand Down
82 changes: 47 additions & 35 deletions lib/info_page.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import 'package:anicross/anime/anime_videos.dart';
import 'package:anicross/manga/manga_reader.dart';
import 'package:anicross/providers/anime_providers.dart';
import 'package:anicross/media/providers/anime_providers.dart';
import 'package:anicross/models/info_models.dart';
import 'package:anicross/providers/manga_providers.dart';
import 'package:anicross/media/providers/manga_providers.dart';
import 'package:expandable_text/expandable_text.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:isar/isar.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'widgets/image.dart';
Expand All @@ -19,19 +18,24 @@ class InfoPage extends StatefulWidget {
}

class InfoPageState extends State<InfoPage> {
List content = [];
final List<MediaProv> content = [];
final Isar isar = Isar.getInstance('later')!;

@override
void initState() {
Future.microtask(
() async {
content = (widget.data.type == "anime")
? await mediaList(widget.data.malid) ??
await haniList(widget.data.title) ??
[]
: await dexReader(widget.data.mediaId);
setState(() {});
content.addAll(
switch (widget.data.type) {
'anime' => await zoroList(widget.data.mediaId),
'manga' => await dexReader(widget.data.mediaId),
_ => [],
},
);

if (mounted) {
setState(() {});
}
},
);
super.initState();
Expand Down Expand Up @@ -59,15 +63,31 @@ class InfoPageState extends State<InfoPage> {
height: 15,
),
Wrap(
spacing: 7,
runSpacing: 5,
spacing: 3,
runSpacing: 7,
children: List.generate(
widget.data.tags!.length.clamp(0, 20),
widget.data.tags!.length.clamp(0, 15),
(index) {
return Chip(
return ActionChip(
backgroundColor: Colors.blueGrey[800],
side: BorderSide.none,
padding: EdgeInsets.zero,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
label: Text(
widget.data.tags![index],
),
onPressed: () => switch (widget.data.type) {
'anime' => context.go(
'/media/anime',
extra: widget.data.tags![index],
),
'manga' => context.go(
'/media/manga',
extra: widget.data.tags![index],
),
_ => '',
},
);
},
),
Expand Down Expand Up @@ -177,29 +197,21 @@ class InfoPageState extends State<InfoPage> {
crossAxisSpacing: 6,
maxCrossAxisExtent: 400,
mainAxisExtent: 100,
//childAspectRatio: 4 / 1,
),
delegate: SliverChildBuilderDelegate(
childCount: content.length,
(context, index) {
return GestureDetector(
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Scaffold(
body: (widget.data.type == "anime")
? AniViewer(
episodes: content,
episode: content[index],
)
: MangaReader(
chapter: content[index],
chapters: content,
),
);
},
),
onTap: () => context.push(
switch (widget.data.type) {
'anime' => '/media/anime/info/viewer',
'manga' => '/media/manga/info/viewer',
_ => '',
},
extra: {
'content': content[index],
'contents': content,
},
),
child: IntrinsicHeight(
child: Card(
Expand All @@ -212,14 +224,14 @@ class InfoPageState extends State<InfoPage> {
children: [
Flexible(
child: Text(
content[index]['title'],
content[index].title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Flexible(
child: Text(
content[index]['number'],
content[index].number,
),
),
],
Expand Down
2 changes: 0 additions & 2 deletions lib/later_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ class LaterPageState extends State<LaterPage> {
slivers: [
Grid(
data: animeData,
paginate: () {},
keep: false,
length: animeData.length,
),
Grid(
data: mangaData,
paginate: () {},
keep: false,
length: mangaData.length,
),
Expand Down
Loading

0 comments on commit 4cf2592

Please sign in to comment.