Giter VIP home page Giter VIP logo

Comments (6)

shwetavish avatar shwetavish commented on August 24, 2024 3

Thanks @lohanidamodar.

I achieved it using the same star_clipper.dart file of your repo by applying some minor changes.

   double outerCurveRadius = width / 2.08;
   double innerCurveRadius = width / 2.42;
    for (double step = 0; step < max + 1; step += degreesPerStep) {
      if (counter % 2 == 0) {
        path.quadraticBezierTo(
          halfWidth + outerCurveRadius * math.cos(step),
          halfWidth + outerCurveRadius * math.sin(step),
          halfWidth + radius * math.cos(step + halfDegreesPerStep),
          halfWidth + radius * math.sin(step + halfDegreesPerStep),
        );
      } else {
        path.quadraticBezierTo(
          halfWidth + innerCurveRadius * math.cos(step),
          halfWidth + innerCurveRadius * math.sin(step),
          halfWidth + radius * math.cos(step + halfDegreesPerStep),
          halfWidth + radius * math.sin(step + halfDegreesPerStep),
        );
      }

      counter++;
    }

Output:
Screenshot 2022-12-16 at 3 57 34 PM (3)

from flutter_custom_clippers.

lohanidamodar avatar lohanidamodar commented on August 24, 2024

Hey, may be this package might be more suitable for you, it provides more dynamic options, you may be able to tweak the border on this package to to your needs. Check at the bottom gif for inspiration
https://pub.dev/packages/morphable_shape

from flutter_custom_clippers.

lohanidamodar avatar lohanidamodar commented on August 24, 2024

Awesome. Would love a PR if you wish to.

from flutter_custom_clippers.

shwetavish avatar shwetavish commented on August 24, 2024

Thank you sir 😍
Receiving this compliment from you means a lot to me.

Sure, I have already begun it. 😀

from flutter_custom_clippers.

shwetavish avatar shwetavish commented on August 24, 2024

PR sent. #27

from flutter_custom_clippers.

lohanidamodar avatar lohanidamodar commented on August 24, 2024

Merged!

from flutter_custom_clippers.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.