ibrierley / flutter_map_line_editor

A basic line/poly editor that works with flutter_map and dragmarkers.
MIT License
44 stars 25 forks source link

Make icons be widgets? #9

Closed moovida closed 3 years ago

moovida commented 3 years ago

Hi, would it be possible to let the handler icons be widgets? That would make it possible to have better visible effects for example by stacking 2 different color icons.

ibrierley commented 3 years ago

I think that seems reasonable...I'm not sure if it's as simple as changing the icon an pointIcon type from an Icon to a Widget. Feel free to see if that works in the meantime (not quite sure atm when I'll get chance to test).

moovida commented 3 years ago

@ibrierley , yes it should be that simple. They are wrapped in a container anyways so they are handled as widgets.

Also tested to be sure:

class PolyEditor {
  final List points;
  final Widget pointIcon;
  final Widget intermediateIcon;
ibrierley commented 3 years ago

Great, thanks. Feel free to make a pull request (pretty new to git repos, so will give me practice!), otherwise I'll update over the weekend.

moovida commented 3 years ago

Oh, ok, will be happy to do so. Didn't want to dirty your repo with two lines of code. :-) Will do right away, thanks

moovida commented 3 years ago

Here it is: #10 Thank you