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

Conflict of DatePickerTheme Import Names Causing Build Errors #338

Open
cguarchaj opened this issue Apr 14, 2024 · 2 comments
Open

Conflict of DatePickerTheme Import Names Causing Build Errors #338

cguarchaj opened this issue Apr 14, 2024 · 2 comments

Comments

@cguarchaj
Copy link

I am experiencing build errors related to the DatePickerTheme import in the flutter_datetime_picker package. It seems there's a conflict because DatePickerTheme is imported from both package:flutter/src/material/date_picker_theme.dart and package:flutter_datetime_picker/src/datetime_picker_theme.dart. This conflict prevents the package from being used as it generates an error on build. Here are the error messages I receive:

  1. Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'.

Could a resolution involve modifying the internal imports within the package or is there an alternative fix available?

@AnasYounus
Copy link

AnasYounus commented May 24, 2024

This is because of a conflict where we use flutter_datetime_picker: ^1.5.1 (since it has an analysis issue as well).
See https://pub.dev/packages/flutter_datetime_picker/versions
Remove flutter_datetime_picker:^1.5.1 from your pubspec.yaml and use Flutter builti-n DateTime Package which is given below.
showTimePicker(context: context,
initialTime: TimeOfDay.now(),);

Please Support Flutter

@arthurshir
Copy link

arthurshir commented Aug 5, 2024

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

3 participants