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

'DateUtils' is imported from both #43

Open
UjjawalPanchal opened this issue Jan 5, 2021 · 1 comment
Open

'DateUtils' is imported from both #43

UjjawalPanchal opened this issue Jan 5, 2021 · 1 comment

Comments

@UjjawalPanchal
Copy link

I am getting this error,

Error: 'DateUtils' is imported from both 'package:calendarro/date_utils.dart' and 'package:flutter/src/material/date.dart'.
startDate = DateUtils.getFirstDayOfCurrentMonth();

Error: 'DateUtils' is imported from both 'package:calendarro/date_utils.dart' and 'package:flutter/src/material/date.dart'.
endDate = DateUtils.toMidnight(endDate);

Error: 'DateUtils' is imported from both 'package:calendarro/date_utils.dart' and 'package:flutter/src/material/date.dart'.
return DateUtils.isSameDay(selectedSingleDate, date);

Error: 'DateUtils' is imported from both 'package:calendarro/date_utils.dart' and 'package:flutter/src/material/date.dart'.
var lastDayOfMonth = DateUtils.getLastDayOfMonth(widget.startDate);

Error: 'DateUtils' is imported from both 'package:calendarro/date_utils.dart' and 'package:flutter/src/material/date.dart'.
bool isToday = DateUtils.isToday(date);

Error: 'DateUtils' is imported from both 'package:calendarro/date_utils.dart' and 'package:flutter/src/material/date.dart'.
bool isToday = DateUtils.isToday(date);

Can anyone help me with this problem?

@berkson
Copy link

berkson commented Jan 12, 2021

Have you tryed to rename the imported library:

import 'package:calendarro/date_utils.dart' as dateUtils;

This error seems to me that you are trying to use dateutils from material and from calendarro in the same file with the same
reference name (DateUtils).

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

2 participants