Skip to content

Commit ee63af9

Browse files
authored
Merge pull request #145 from Vito0912/feat/list
Feat/list
2 parents 0109160 + 49d0840 commit ee63af9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2506
-325
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ jobs:
113113
uses: subosito/flutter-action@v2
114114
with:
115115
channel: stable
116-
flutter-version: 3.27.1
117116

118117
- name: Install Flutter dependencies
119118
run: flutter pub get
@@ -180,7 +179,6 @@ jobs:
180179
uses: subosito/flutter-action@v2
181180
with:
182181
channel: stable
183-
flutter-version: 3.27.1
184182

185183
- name: Extract version from pubspec.yaml
186184
id: extract_version
@@ -252,7 +250,6 @@ jobs:
252250
uses: subosito/flutter-action@v2
253251
with:
254252
channel: stable
255-
flutter-version: 3.27.1
256253

257254
- name: Install Flutter dependencies
258255
run: flutter pub get

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ app.*.map.json
4545
/android/app/debug
4646
/android/app/profile
4747
/android/app/release
48+
49+
md/build/.last_build_id
50+
/android/app/.cxx/

android/app/src/main/res/values/styles.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
1515
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
1616
<item name="android:windowBackground">?android:colorBackground</item>
17+
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
1718
</style>
1819
</resources>

lib/api/library_items/audio_file.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ part 'audio_file.g.dart';
99
@freezed
1010
class AudioFile with _$AudioFile {
1111
const factory AudioFile({
12-
@JsonKey(name: "index") required int index,
12+
@JsonKey(name: "index") int? index,
1313
@JsonKey(name: "ino") required String ino,
1414
@JsonKey(name: "metadata") required LibraryFileMetadata metadata,
1515
@JsonKey(name: "addedAt") required int addedAt,

lib/api/library_items/audio_file.freezed.dart

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api/library_items/audio_file.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api/library_items/audio_track.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class AudioTrack with _$AudioTrack {
99
const AudioTrack._();
1010

1111
const factory AudioTrack({
12-
@JsonKey(name: "index") required int index,
12+
@JsonKey(name: "index") int? index,
1313
@JsonKey(name: "startOffset") required double startOffset,
1414
@JsonKey(name: "duration") required double duration,
1515
@JsonKey(name: "title") required String title,

lib/api/library_items/audio_track.freezed.dart

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api/library_items/audio_track.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api/list/collection.dart

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'package:abs_flutter/api/library_items/library_item.dart';
2+
import 'package:freezed_annotation/freezed_annotation.dart';
3+
4+
part 'collection.freezed.dart';
5+
part 'collection.g.dart';
6+
7+
@freezed
8+
class Collection with _$Collection {
9+
const factory Collection({
10+
@JsonKey(name: "id") required String id,
11+
@JsonKey(name: "libraryId") required String libraryId,
12+
@JsonKey(name: "userId") String? userId,
13+
@JsonKey(name: "name") required String name,
14+
@JsonKey(name: "description") String? description,
15+
@JsonKey(name: "coverPath") String? coverPath,
16+
@JsonKey(name: "books") List<LibraryItem>? items,
17+
@JsonKey(name: "lastUpdate") required int lastUpdate,
18+
@JsonKey(name: "createdAt") required int createdAt,
19+
}) = _Collection;
20+
21+
factory Collection.fromJson(Map<String, dynamic> json) =>
22+
_$CollectionFromJson(json);
23+
}

0 commit comments

Comments
 (0)