Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The method 'withValues' isn't defined for the class 'Color' #45

Open
TechSchuppen-SH opened this issue Dec 20, 2024 · 4 comments
Open

Comments

@TechSchuppen-SH
Copy link

i have installed the package and integrate it in my code:
EasyDateTimeLinePicker.itemBuilder(
firstDate: DateTime(2025, 1, 1),
lastDate: DateTime(2030, 3, 18),
focusedDate: DateTime.now(),
itemExtent: 64.0,
itemBuilder:
(context, date, isSelected, isDisabled, isToday, onTap) {
return InkResponse(
onTap: onTap,
child: CircleAvatar(
backgroundColor: isSelected ? Colors.blue : null,
child: Text(date.day.toString()),
),
);
},
onDateChange: (date) {
// setState(() {
// _selectedDate = date;
// });
},
),

Now i get following error message:
Error (Xcode): ../../.pub-cache/hosted/pub.dev/easy_date_timeline-2.0.6/lib/src/easy_date_time_line_picker/picker/picker_button/picker_button.dart:62:54: Error: The method 'withValues' isn't defined for the class 'Color'.

Could not build the application for the simulator.
Error launching application on iPhone 16 Pro.

Can you help me?

@TechSchuppen-SH
Copy link
Author

TechSchuppen-SH commented Dec 20, 2024

i get the error only after the installing and restart my app. (version: easy_date_timeline: ^2.0.0)

@ZontarZon
Copy link

Just ran into this issue as well. Try 2.0.4. The two most recent updates seem to have this bug.

@kewitschka
Copy link

kewitschka commented Dec 21, 2024

Same happens here since updating from v1 to v2 (2.0.6) with flutter 27.0.1 With flutter 2.24.5 it seems to work.

@FadyFayezYounan
Copy link
Owner

@TechSchuppen-SH @ZontarZon @kewitschka
Hi, this issue occurs because withValues is compatible only with the latest Flutter version (27.0.1). If you're not using this version, you can use easy_date_timeline 2.0.4, which should work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants