Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Because no versions of charts_flutter match >0.9.0 <0.10.0 and charts_flutter 0.9.0 depends on intl >=0.15.2 <0.17.0, charts_flutter ^0.9.0 requires intl >=0.15.2 <0.17.0. #566

Closed
CNMathon opened this issue Dec 3, 2020 · 8 comments

Comments

@CNMathon
Copy link

CNMathon commented Dec 3, 2020

Description

When I run flutter pub get, I got this.

Because no versions of charts_flutter match >0.9.0 <0.10.0 and charts_flutter 0.9.0 depends on intl >=0.15.2 <0.17.0, charts_flutter ^0.9.0 requires intl >=0.15.2 <0.17.0.
And because every version of flutter_localizations from sdk depends on intl 0.17.0-nullsafety.2, charts_flutter ^0.9.0 is incompatible with flutter_localizations from sdk.
So, because bee_bdapp depends on both flutter_localizations any from sdk and charts_flutter ^0.9.0, version solving failed.
pub get failed (1; So, because bee_bdapp depends on both flutter_localizations any from sdk and charts_flutter ^0.9.0, version solving failed.)

Flutter Doctor

[√] Flutter (Channel dev, 1.25.0-4.0.pre, on Microsoft Windows [Version 10.0.19042.630], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Android Studio (version 4.1.0)
[√] Connected device (1 available)

Charts_flutter Version

charts_flutter: ^0.9.0
@relufi
Copy link

relufi commented Dec 6, 2020

make the following changes to the app’s pubspec.yaml file:

dependency_overrides:
 intl: '>=0.15.2 <= 0.17.0-nullsafety.2'

@elansys-kc
Copy link

elansys-kc commented Dec 7, 2020

I get

Warning: You are using these overridden dependencies:
! intl 0.16.1

I still get a build failure

../../../flutter/packages/flutter_localizations/lib/src/material_localizations.dart:413:7: Error: Method 'replaceFirst' cannot be called on 'String?' because it is potentially null.
Try calling using ?. instead.
).replaceFirst(r'$selectedRowCount', formatDecimal(selectedRowCount));
^^^^^^^^^^^^
../../../flutter/packages/flutter_localizations/lib/src/material_localizations.dart:550:7: Error: Method 'replaceFirst' cannot be called on 'String?' because it is potentially null.
Try calling using ?. instead.
).replaceFirst(r'$licenseCount', formatDecimal(licenseCount));
^^^^^^^^^^^^
../../../flutter/packages/flutter_localizations/lib/src/material_localizations.dart:659:7: Error: Method 'replaceFirst' cannot be called on 'String?' because it is potentially null.
Try calling using ?. instead.
).replaceFirst(r'$remainingCount', formatDecimal(remainingCount));
^^^^^^^^^^^^
Failed to compile application.




and if I use 0.15.2 then I get:

../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/src/intl/bidi_formatter.dart:100:25: Error: The getter 'HTML_ESCAPE' isn't defined for the class 'BidiFormatter'.

  • 'BidiFormatter' is from 'package:intl/intl.dart' ('../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/intl.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'HTML_ESCAPE'.
    if (!isHtml) text = HTML_ESCAPE.convert(text);
    ^^^^^^^^^^^
    ../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/src/intl/number_format.dart:100:45: Error: The getter 'LN10' isn't defined for the class 'NumberFormat'.
  • 'NumberFormat' is from 'package:intl/intl.dart' ('../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/intl.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'LN10'.
    _multiplierDigits = (log(_multiplier) / LN10).round();
    ^^^^
    ../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/src/intl/number_format.dart:595:35: Error: The getter 'LN10' isn't defined for the class 'NumberFormat'.
  • 'NumberFormat' is from 'package:intl/intl.dart' ('../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/intl.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'LN10'.
    var exponent = (log(number) / LN10).floor();
    ^^^^
    ../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/src/intl/number_format.dart:698:40: Error: Getter not found: 'LN10'.
    return max(1, (log(simpleNumber) / LN10).ceil());
    ^^^^
    ../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/src/intl/number_format.dart:789:53: Error: The getter 'LN10' isn't defined for the class 'NumberFormat'.
  • 'NumberFormat' is from 'package:intl/intl.dart' ('../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/intl.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'LN10'.
    var howManyDigitsTooBig = (log(integerPart) / LN10).ceil() - 16;
    ^^^^
    ../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/src/intl/number_format.dart:1129:44: Error: Getter not found: 'NAN'.
    if (text == symbols.NAN) return double.NAN;
    ^^^
    ../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/src/intl/number_format.dart:1131:21: Error: Getter not found: 'INFINITY'.
    return double.INFINITY;
    ^^^^^^^^
    ../../../../.pub-cache/hosted/pub.dartlang.org/intl-0.15.2/lib/src/intl/number_format.dart:1134:21: Error: Getter not found: 'NEGATIVE_INFINITY'.
    return double.NEGATIVE_INFINITY;
    ^^^^^^^^^^^^^^^^^
    Failed to compile application.

@elansys-kc
Copy link

elansys-kc commented Dec 7, 2020

I found the following enabled the build to continue. I kept it as an override to show a warning during pub get.

dependency_overrides:
  intl: '>=0.17.0-nullsafety.2 <= 0.17.0-nullsafety.2'

@CNMathon
Copy link
Author

I found the following enabled the build to continue. I kept it as an override to show a warning during pub get.

dependency_overrides:
intl: '>=0.17.0-nullsafety.2 <= 0.17.0-nullsafety.2'

I haven't tried this yet, but I think it is a hark way.
I think a better approach would be for Charts to release an update for its dependent versions.

@ghenry
Copy link

ghenry commented Jan 7, 2021

Please release an update :-)

@LAPPIT
Copy link

LAPPIT commented Feb 5, 2021

Get the same problem as well:

Because charts_flutter 0.9.0 depends on intl >=0.15.2 <0.17.0 and no versions of charts_flutter match >0.9.0 <0.10.0, charts_flutter ^0.9.0 requires intl >=0.15.2 <0.17.0.
So, because minsockerbit depends on both charts_flutter ^0.9.0 and intl ^0.17.0, version solving failed.
pub get failed (1; So, because minsockerbit depends on both charts_flutter ^0.9.0 and intl ^0.17.0, version solving failed.)

Please release an update! Really hope to be able to continue using the package ...

@hdavidmb
Copy link

hdavidmb commented Mar 5, 2021

Facing same issue. I tried downgrading intl to intl: ^0.16.0, but as my app also depends on flutter_localizations it needs intl: ^0.17.0 so I cannot run my app.
I also hope charts gets updated to continue using the package.

@mit-mit
Copy link
Member

mit-mit commented Mar 9, 2021

Fixed in #605

@mit-mit mit-mit closed this as completed Mar 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants