Flutter dynamic border radius as scrolled

169 views Asked by At

Is it possible to have a border radius change dynamically as scrolled? Let say the container / popup panel start with radius 50, then when expanded it's getting to zero, based on the scroll position. I'm not sure what keyword I'm looking for. In web, it works similar to this

$(window).scroll(function() {
  var scrollTop = $(window).scrollTop(),
      percent   = 50 - ((50*scrollTop)/height) * 2;
  $(".round").css("border-radius", percent + "%");
});
0

There are 0 answers