-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed as not planned
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: annoyanceRepeatedly frustrating issues with non-experimental functionalityRepeatedly frustrating issues with non-experimental functionalityc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)fyi-designFor the attention of Design Languages teamFor the attention of Design Languages teamteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Use case
I'd like to make sure a widget only rebuilds when colorScheme.primary changes.
Test
import 'dart:ui';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('Color can lerp and maintain equality with itself', () {
const color = Color(0xFF123456);
expect(Color.lerp(color, color, 0.0), color);
expect(Color.lerp(color, color, 0.1), color);
expect(Color.lerp(color, color, 0.2), color);
expect(Color.lerp(color, color, 0.3), color);
expect(Color.lerp(color, color, 0.4), color);
expect(Color.lerp(color, color, 0.5), color);
expect(Color.lerp(color, color, 0.6), color);
expect(Color.lerp(color, color, 0.7), color);
expect(Color.lerp(color, color, 0.8), color);
expect(Color.lerp(color, color, 0.9), color);
});
}The test fails due to tiny floating point rounding errors 😃 😃
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: annoyanceRepeatedly frustrating issues with non-experimental functionalityRepeatedly frustrating issues with non-experimental functionalityc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)fyi-designFor the attention of Design Languages teamFor the attention of Design Languages teamteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team