Skip to content

Commit e1fd43c

Browse files
chrisbobbegnprice
authored andcommitted
color [nfc]: Use library prefix for flutter_color_models import
`ColorSpace`, which we'd like to use soon, is a conflicting identifier between this and dart:ui. Give this one the prefix.
1 parent 2046667 commit e1fd43c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/widgets/color.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'dart:ui';
22

3-
import 'package:flutter_color_models/flutter_color_models.dart';
3+
import 'package:flutter_color_models/flutter_color_models.dart' as flutter_color_models;
44

55
// This function promises to deal with "LCH" lightness, not "LAB" lightness,
66
// but it's not yet true. We haven't found a Dart libary that can work with LCH:
@@ -11,7 +11,7 @@ import 'package:flutter_color_models/flutter_color_models.dart';
1111
//
1212
// TODO try LCH; see linked discussion
1313
Color clampLchLightness(Color color, num lowerLimit, num upperLimit) {
14-
final asLab = LabColor.fromColor(color);
14+
final asLab = flutter_color_models.LabColor.fromColor(color);
1515
return asLab
1616
.copyWith(lightness: asLab.lightness.clamp(lowerLimit, upperLimit))
1717
.toColor();

0 commit comments

Comments
 (0)