Code Monkey home page Code Monkey logo

Comments (11)

afhslll avatar afhslll commented on August 15, 2024 2

I got same issue. For me, I edited the library directly. In flutter_datetime_picker.dart, add 'as' in the 'import'.

library flutter_datetime_picker;
import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart' as dpt;

Then, change DatePickerTheme to dpt.DatePickerTheme.

from flutter_datetime_picker.

 avatar commented on August 15, 2024

Same. getting this:
Performing hot restart... Syncing files to device iPhone 15 Pro Max... ../../.pub-cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:6: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'. import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'; ^^^^^^^^^^^^^^^ ../../.pub-cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:199:31: Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'. this.theme = theme ?? DatePickerTheme(), ^^^^^^^^^^^^^^^ Restarted application in 1,034ms.

from flutter_datetime_picker.

hz0571 avatar hz0571 commented on August 15, 2024

Same. getting this:
Could not build the precompiled application for the device.
Error (Xcode): ../../.pub-cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:6: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'.

from flutter_datetime_picker.

awiprayitno avatar awiprayitno commented on August 15, 2024

same here

: Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'.
flutter_datetime_picker.dart:6
import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart';
datetime_picker_theme.dart: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'.
flutter_datetime_picker.dart:199
        this.theme = theme ?? DatePickerTheme(),

from flutter_datetime_picker.

Jephtha avatar Jephtha commented on August 15, 2024

anyone gotten a fix for this?

from flutter_datetime_picker.

AndOs-03 avatar AndOs-03 commented on August 15, 2024

The best solution currently would be to directly edit flutter_datetime_picker.dart by adding an alias. I saw a merge request to fix this problem but it seems to me that the repository admins abandoned it. I moved to another library

from flutter_datetime_picker.

ringonotts avatar ringonotts commented on August 15, 2024

@AndOs-03 which lib did you choose please ?

So can we assume this library is dead then ? Real shame if it is....

from flutter_datetime_picker.

AndOs-03 avatar AndOs-03 commented on August 15, 2024

@AndOs-03 which lib did you choose please ?

So can we assume this library is dead then ? Real shame if it is....

@ringonotts I used flutter_datetime_picker_plus

from flutter_datetime_picker.

zwwhappy avatar zwwhappy commented on August 15, 2024

I got same issue. For me, I edited the library directly. In flutter_datetime_picker.dart, add 'as' in the 'import'.

library flutter_datetime_picker; import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart' as dpt;

Then, change DatePickerTheme to dpt.DatePickerTheme.

or Edited the library directly. In flutter_datetime_picker.dart, hide DatePickerTheme in the 'import'.
imported 'package:flutter/src/material/date_picker_theme.dart' hide DatePickerTheme;

from flutter_datetime_picker.

2000zua avatar 2000zua commented on August 15, 2024

../../../../../.pub-cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:6: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'.
import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart';
^^^^^^^^^^^^^^^
../../../../../.pub-cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:199:31: Error: 'DatePickerTheme' is imported
from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'.
this.theme = theme ?? DatePickerTheme(),

from flutter_datetime_picker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.