Skip to content

feat(*): widget layers#619

Merged
johnpryan merged 1 commit into
fleaflet:masterfrom
ruizalexandre:feature/widget-layers
Jul 8, 2020
Merged

feat(*): widget layers#619
johnpryan merged 1 commit into
fleaflet:masterfrom
ruizalexandre:feature/widget-layers

Conversation

@ruizalexandre

@ruizalexandre ruizalexandre commented May 16, 2020

Copy link
Copy Markdown

@johnpryan

I rewrite all my last PR
Compatible with plugins and can combine last way to use layers (with LayerOptions).


🎸 No breaking changes


🤖 What's inside?

  • Adding MapState.of(context) to get the current MapState
  • Adding forceRebuild method on MapState for rebuild all map
  • Can use simple widget with FlutterMap now with the new property children
  • Fix initState/dispose lifecyle -> called after TileLayer code

📜 More explanation

What the sort in stack with children and layers?
children property is before layers property in stack of Widget.

I want create a simple plugin, how?
Use simple Flutter Widget, example Text("I'm a simple plugin now")

I want create a plugin who can access to mapState, how?
Create a Flutter Widget with MapState.of(context) to get the current mapState.

🆘 Linked issues
Close #535
Close #459
Close #482

Comment thread example/lib/pages/widgets.dart Outdated
Layer widgets with children property
Fix initState/dispose issues on TileLayer
@fryette

fryette commented May 27, 2020

Copy link
Copy Markdown

Any news on it?

@johnpryan

Copy link
Copy Markdown
Collaborator

Looks good to me, The next step would be to make the options classes go away eventually. For example, MarkerLayerWidget could just have the parameters in MarkerLayerOptions in it's constructor.

@johnpryan johnpryan merged commit 2805d3e into fleaflet:master Jul 8, 2020
@ruizalexandre ruizalexandre deleted the feature/widget-layers branch August 4, 2020 06:55
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

Successfully merging this pull request may close these issues.

Performance issue when using setState() Trigger rebuilds from MapState in plugins How to rebuild a layer

4 participants