Initial commit
This commit is contained in:
parent
32e425f961
commit
e94d583b8b
67 changed files with 2516 additions and 698 deletions
13
lib/providers/home_sections_provider.dart
Normal file
13
lib/providers/home_sections_provider.dart
Normal file
|
@ -0,0 +1,13 @@
|
|||
import 'package:canal/providers/ytmusic_provider.dart';
|
||||
import 'package:dart_ytmusic_api/dart_ytmusic_api.dart';
|
||||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
part "home_sections_provider.g.dart";
|
||||
|
||||
@riverpod
|
||||
Future<IList<HomeSection>> homeSections(Ref ref) async {
|
||||
final yt = await ytmusic(ref);
|
||||
|
||||
return IList(await yt.getHomeSections());
|
||||
}
|
Reference in a new issue