This repository has been archived on 2025-03-26. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
brook/lib/providers/home_sections_provider.dart
2025-01-03 18:33:59 -05:00

13 lines
492 B
Dart

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());
}