fix(flutter): drop redundant const in nested const contexts
Making the outer FabledSwordTheme(...) and HomeData(...) constructors const made every inner const redundant — Dart's analyzer fires unnecessary_const for each. Strip the inner consts so the outer context owns the const inference.
This commit is contained in:
@@ -45,9 +45,9 @@ class FabledSwordTheme extends ThemeExtension<FabledSwordTheme> {
|
|||||||
warning: FabledSwordTokens.warning,
|
warning: FabledSwordTokens.warning,
|
||||||
error: FabledSwordTokens.error,
|
error: FabledSwordTokens.error,
|
||||||
info: FabledSwordTokens.info,
|
info: FabledSwordTokens.info,
|
||||||
display: const TextStyle(fontFamily: FabledSwordTokens.fontDisplay),
|
display: TextStyle(fontFamily: FabledSwordTokens.fontDisplay),
|
||||||
body: const TextStyle(fontFamily: FabledSwordTokens.fontBody),
|
body: TextStyle(fontFamily: FabledSwordTokens.fontBody),
|
||||||
mono: const TextStyle(fontFamily: FabledSwordTokens.fontMono),
|
mono: TextStyle(fontFamily: FabledSwordTokens.fontMono),
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -12,15 +12,15 @@ import 'package:minstrel/theme/theme_data.dart';
|
|||||||
void main() {
|
void main() {
|
||||||
testWidgets('home renders sections with rows', (tester) async {
|
testWidgets('home renders sections with rows', (tester) async {
|
||||||
const fixture = HomeData(
|
const fixture = HomeData(
|
||||||
recentlyAddedAlbums: const [
|
recentlyAddedAlbums: [
|
||||||
AlbumRef(id: 'a', title: 'Geogaddi', artistId: 'x', artistName: 'BoC'),
|
AlbumRef(id: 'a', title: 'Geogaddi', artistId: 'x', artistName: 'BoC'),
|
||||||
],
|
],
|
||||||
rediscoverAlbums: const [],
|
rediscoverAlbums: [],
|
||||||
rediscoverArtists: const [
|
rediscoverArtists: [
|
||||||
ArtistRef(id: 'r', name: 'Aphex Twin'),
|
ArtistRef(id: 'r', name: 'Aphex Twin'),
|
||||||
],
|
],
|
||||||
mostPlayedTracks: const [],
|
mostPlayedTracks: [],
|
||||||
lastPlayedArtists: const [],
|
lastPlayedArtists: [],
|
||||||
);
|
);
|
||||||
await tester.pumpWidget(ProviderScope(
|
await tester.pumpWidget(ProviderScope(
|
||||||
overrides: [
|
overrides: [
|
||||||
|
|||||||
Reference in New Issue
Block a user