Git Product home page Git Product logo

Comments (28)

ibrierley avatar ibrierley commented on July 17, 2024 1

I'm probably going to run out of time today to upgrade to null safety, there's quite a bit to do, but I will do it in time, hopefully by the end of the weekend.

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024 1

This is the bit that it depends on :D, so that will be done after.

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024

Let me take a quick look, as I think there's some other dependancies need updating now flutter_map has also, and I'll try and give some feedback how long it will be.

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

latlong > latlong2

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024

yes, it needs latlong2, which I'll be doing, but there are some other issues too...

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

Hopefully - but it's your project and you owe me nothing.

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024

Hah, no, but I've been putting it off for a while, and I have another plugin which depends on this one.

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

Oh, just found flutter_map_line_editor. Looks GREAT!

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024

Bit of a rush job, but I've created a branch nullsafety if you wanted to test it.

(I haven't had time to do the dragmarket_widget_layer.dart, but the dragmarker.dart normal layer like in the example should work)

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

I added this to my pubspec.yaml:

flutter_map_dragmarker:
  git:
    url: https://github.com/ibrierley/flutter_map_dragmarker
    ref: nullsafety

and got:

Because latlong >=0.6.1 depends on logging >=0.11.3 <1.0.0 and latlong <0.6.1 requires SDK version >=1.8.0 <2.0.0, every version of latlong requires logging >=0.11.3 <1.0.0.


And because build_runner >=2.0.0 depends on logging ^1.0.0 and every version of flutter_map_dragmarker from git depends on latlong any, build_runner >=2.0.0 is incompatible with flutter_map_dragmarker from git.
So, because capturing depends on both flutter_map_dragmarker from git and build_runner ^2.0.2, version solving failed.

pub get failed (1; So, because capturing depends on both flutter_map_dragmarker from git and build_runner ^2.0.2, version solving failed.)
exit code 1

So latlong needs to be replaced with latlong2.

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

Same result.

Seems that latlong still did not get updated: https://github.com/ibrierley/flutter_map_dragmarker/blob/nullsafety/pubspec.yaml#L30

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

actually, slightly different result:

[capturing] flutter pub get
Running "flutter pub get" in capturing...                       
Because every version of flutter_map_dragmarker from git depends on latlong 0.8.0 which doesn't match any versions, flutter_map_dragmarker from git is forbidden.

So, because capturing depends on flutter_map_dragmarker from git, version solving failed.
pub get failed (1; So, because capturing depends on flutter_map_dragmarker from git, version solving failed.)
exit code 1

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

Seems that you updated the version to 0.8.0 which is correct for latlong2 but forgot to change latlong to latlong2.

Also, don't forget to update the imports:

import 'package:latlong2/latlong.dart';

instead of:

import 'package:latlong/latlong.dart';

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

Oh, you did update the imports: https://github.com/ibrierley/flutter_map_dragmarker/blob/nullsafety/lib/dragmarker.dart#L4

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024

Yes, I think it's because I've got 2 slightly different versions I'm switching between...can you try again.

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

Installs now. I'll try to implement it and see if I get it to work now.

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

When launching the virtual device I get:

Launching lib\main.dart on sdk gphone x86 64 in debug mode...
lib\main.dart:1
../flutter/.pub-cache/git/flutter_map_dragmarker-e3747e9aa0594e2881ce2b3db197e1bdd9012bc9/lib/dragmarker.dart:65:67: Error: Null safety features are disabled for this library.
Try removing the package language version or setting the language version to 2.12 or higher.
  DragMarkerWidget({this.mapState, required this.marker, AnchorPos? anchorPos, this.stream, this.options }); //: anchor = Anchor.forPos(anchorPos, marker.width, marker.height);                                                          

I am really just guessing, but could this setting be meant? https://github.com/ibrierley/flutter_map_dragmarker/blob/nullsafety/pubspec.yaml#L17

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

Yes: https://dart.dev/tools/pub/pubspec#sdk-constraints

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

More to the point: https://dart.dev/guides/language/evolution

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024

Ok, I've started with a fresh git version pulled from here, so hopefully it will track better. See if this does it.

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024

Btw there should be a null safety branch for flutter_map_line_editor, couple of examples and demo gifs on readme if you wanted to try that as well. Thanks for patience.

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

Ok, I've started with a fresh git version pulled from here, so hopefully it will track better. See if this does it.

Works fine!

from flutter_map_dragmarker.

barbalex avatar barbalex commented on July 17, 2024

Btw there should be a null safety branch for flutter_map_line_editor, couple of examples and demo gifs on readme if you wanted to try that as well. Thanks for patience.

I'll leave that for the weekend.

from flutter_map_dragmarker.

Mmisiek avatar Mmisiek commented on July 17, 2024

Can you upadate cupertino_icons to 1.0.3 or any on nullsafe branch ?

from flutter_map_dragmarker.

ibrierley avatar ibrierley commented on July 17, 2024

I'm just testing a new branch panfix as there was another issue with flutter_map 0.14 if you wanted to test that.

from flutter_map_dragmarker.

Mmisiek avatar Mmisiek commented on July 17, 2024

from flutter_map_dragmarker.

pablojimpas avatar pablojimpas commented on July 17, 2024

This is not a problem any more. This package is compatible with full sound null safety, and therefore Dart 3 and Flutter 3.10. Closing…

from flutter_map_dragmarker.

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.