Skip to content

fix How to add custom confetti image #67 #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shinriyo
Copy link
Contributor

For the issue.
How to add custom confetti image #67

====
Put your particle_image.png in your assets.

If you can open the example.
Write the image path here.

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Stack(
        children: <Widget>[
          //CENTER -- Blast
          Align(
            alignment: Alignment.center,
            child: ConfettiWidget(
              confettiController: _controllerCenter,
              blastDirectionality: BlastDirectionality
                  .explosive, // don't specify a direction, blast randomly
              shouldLoop:
                  true, // start again as soon as the animation is finished
              colors: const [
                Colors.green,
                Colors.blue,
                Colors.pink,
                Colors.orange,
                Colors.purple
              ], // manually specify the colors to be used
              createParticlePath: drawStar, // define a custom shape/path.
              // Add here
              imagePath: 'assets/particle_image.png',
            ),
          ),

Copy link

netlify bot commented Jun 30, 2024

Deploy Preview for dazzling-euclid-7da31e failed.

Name Link
🔨 Latest commit 9dcca25
🔍 Latest deploy log https://app.netlify.com/sites/dazzling-euclid-7da31e/deploys/668145b231a47600085a4eb4

@taqi92
Copy link

taqi92 commented Apr 5, 2025

@shinriyo can you tell how you have added imagePath: 'assets/particle_image.png' in there?

@shinriyo
Copy link
Contributor Author

shinriyo commented Apr 5, 2025

@taqi92
Copy link

taqi92 commented Apr 5, 2025

So the modified version take imagepath as param in confetti?

Copy link

netlify bot commented Apr 6, 2025

Deploy Preview for dazzling-euclid-7da31e failed.

Name Link
🔨 Latest commit eeddda7
🔍 Latest deploy log https://app.netlify.com/sites/dazzling-euclid-7da31e/deploys/67f1e49d92c77e000808be40

@shinriyo
Copy link
Contributor Author

shinriyo commented Apr 6, 2025

@taqi92
I added the image. Check it.

But I didn't fix the conflict yet.

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.

2 participants