flutter_echarts icon indicating copy to clipboard operation
flutter_echarts copied to clipboard

Re-render after orientation change

Open tnusraddinov opened this issue 4 years ago • 4 comments

Hello, have a problem with echarts not re-render/expand after orientation change to landscape and vice versa?

portrate

landscape

tnusraddinov avatar Feb 12 '21 10:02 tnusraddinov

This should solve the problem, but how to access the webview controller?

await _controller.reload();

tnusraddinov avatar Feb 12 '21 13:02 tnusraddinov

@tnusraddinov Try specifying the GlobalKey.

OrientationBuilder(
  builder: (_, __) => Echarts(
    key: GlobalObjectKey(MediaQuery.of(context).orientation),
    option: option,
  ),
);

KoheiKanagu avatar Feb 22 '21 10:02 KoheiKanagu

Please update to v2.1.0. Now you can get contorller in the onLoad function.

entronad avatar Apr 26 '21 03:04 entronad

Since based on webview, this library has some inextirpable unstability and performance issues. We recommand the Flutter charting library Graphic as alternative.

entronad avatar Oct 27 '21 14:10 entronad