Flutter: Wave clipper animation

Nhan Cao
2 min readApr 22, 2018

How to do this.

First, implement with single wave.

What clipper: https://docs.flutter.io/flutter/rendering/CustomClipper-class.html

Clip view

Define wave:

wave

In here I using sin function to generate wave value.

Source: https://betterexplained.com/articles/intuitive-understanding-of-sine-waves/

Each point behavior:

  • x will be fixed with width of view
  • y will be generated by sin function depend on time, value in 2 x hight of wave
Wave moving: http://oto-kata.jp/img/yokonami_en.png
Wave moving animation: https://de.wikibooks.org/wiki/Physik_Oberstufe/_Schwingungen_und_Wellen/_Mechanische_Wellen

--

--

Responses (3)