fix(flutter): analyze errors after Plan C provider migrations
- cache_first.dart: backtick-fence List<T> doc comment to dodge unintended_html_in_doc_comment. - library_providers.dart:163: switch single-row insert to insertAllOnConflictUpdate; Batch only exposes the *AllOnConflict* variant. - 5 test files: StreamProvider.overrideWith takes Create<Stream<T>>, not Create<Future<T>>. Wrap data emissions in Stream.value(...). - artist_detail_screen_test: add models/album.dart import for AlbumRef type annotation. - track_actions_sheet_test: drop _StubLiked extends LikedIdsController (notifier no longer exists post-migration); override with Stream.value(LikedIds(...)) instead. - like_button_test: rollback assertion now requires drift writes via LikesController. Skip under _skipDrift until libsqlite3-dev lands on the runner image (Fable #399). Replace stale .notifier reference with likesControllerProvider for completeness. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -39,7 +39,7 @@ const _systemPlaylist = Playlist(
|
||||
Widget _harness(PlaylistsList lists) {
|
||||
return ProviderScope(
|
||||
overrides: [
|
||||
playlistsListProvider('user').overrideWith((ref) async => lists),
|
||||
playlistsListProvider('user').overrideWith((ref) => Stream.value(lists)),
|
||||
],
|
||||
child: MaterialApp(
|
||||
theme: buildThemeData(),
|
||||
@@ -85,8 +85,8 @@ void main() {
|
||||
await t.pumpWidget(ProviderScope(
|
||||
overrides: [
|
||||
playlistsListProvider('user').overrideWith(
|
||||
(ref) async =>
|
||||
const PlaylistsList(owned: [_userPlaylist], public: []),
|
||||
(ref) => Stream.value(
|
||||
const PlaylistsList(owned: [_userPlaylist], public: [])),
|
||||
),
|
||||
],
|
||||
child: MaterialApp(
|
||||
|
||||
@@ -21,14 +21,6 @@ const _track = TrackRef(
|
||||
streamUrl: '',
|
||||
);
|
||||
|
||||
class _StubLiked extends LikedIdsController {
|
||||
_StubLiked({this.trackIds = const <String>{}});
|
||||
final Set<String> trackIds;
|
||||
@override
|
||||
Future<LikedIds> build() async =>
|
||||
LikedIds(artists: const {}, albums: const {}, tracks: trackIds);
|
||||
}
|
||||
|
||||
class _StubQuarantine extends MyQuarantineController {
|
||||
@override
|
||||
Future<List<QuarantineMineRow>> build() async => const [];
|
||||
@@ -37,8 +29,11 @@ class _StubQuarantine extends MyQuarantineController {
|
||||
Widget _harness({bool hideQueueActions = false, Set<String>? likedTracks}) {
|
||||
return ProviderScope(
|
||||
overrides: [
|
||||
likedIdsProvider
|
||||
.overrideWith(() => _StubLiked(trackIds: likedTracks ?? const {})),
|
||||
likedIdsProvider.overrideWith((ref) => Stream.value(LikedIds(
|
||||
artists: const {},
|
||||
albums: const {},
|
||||
tracks: likedTracks ?? const {},
|
||||
))),
|
||||
myQuarantineProvider.overrideWith(() => _StubQuarantine()),
|
||||
],
|
||||
child: MaterialApp(
|
||||
|
||||
Reference in New Issue
Block a user