d86c694cde
1. lib/app.dart + lib/shared/routing.dart — buildRouter takes a Ref but was being called from a ConsumerWidget's build() with a WidgetRef. Add a routerProvider; the widget watches it instead of constructing the router from its own ref. Real bug — would have crashed compile in slice 1, just never compiled until CI ran. 2. lib/player/audio_handler.dart — override of AudioHandler.seek used `p` for the Duration; rename to `position` to match the base class (avoid_renaming_method_parameters lint). 3. lib/theme/theme_extension.dart — fromTokens() returned a non-const constructor; all inputs are const so make the call const too (prefer_const_constructors). 4. test/library/home_screen_test.dart — same const-constructor lint on the HomeData test fixture. 5. test/smoke_test.dart — drop the unused `import 'package:flutter/material.dart'`. These are exactly the kind of issues the no-in-task-tests rule shifted to CI; this is the first run that actually exercises the analyzer against the slice 1 code.
20 lines
479 B
Dart
20 lines
479 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import 'shared/routing.dart';
|
|
import 'theme/theme_data.dart';
|
|
|
|
class MinstrelApp extends ConsumerWidget {
|
|
const MinstrelApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final router = ref.watch(routerProvider);
|
|
return MaterialApp.router(
|
|
title: 'Minstrel',
|
|
theme: buildThemeData(),
|
|
routerConfig: router,
|
|
);
|
|
}
|
|
}
|