Skip to content

Commit

Permalink
fix erroneous import and ensure confetti doesn't show if it doesn't n…
Browse files Browse the repository at this point in the history
…eed to
  • Loading branch information
dylandhall committed Jun 24, 2024
1 parent ded1895 commit 9287fc0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions lib/main_game_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

import 'dart:ffi';
import 'dart:math';

import 'package:confetti/confetti.dart';
Expand Down Expand Up @@ -208,16 +207,18 @@ class _MainGamePageState extends State<MainGamePage> with SingleTickerProviderSt
? 20
: 0;

yield ConfettiWidget(
confettiController: _confettiController,
blastDirectionality: BlastDirectionality.directional,
blastDirection: pi / 2,
maxBlastForce: 5,
minBlastForce: 2,
emissionFrequency: 0.05,
numberOfParticles: numParticles,
gravity: 0.1,
);
if (numParticles>0) {
yield ConfettiWidget(
confettiController: _confettiController,
blastDirectionality: BlastDirectionality.directional,
blastDirection: pi / 2,
maxBlastForce: 5,
minBlastForce: 2,
emissionFrequency: 0.05,
numberOfParticles: numParticles,
gravity: 0.1,
);
}

const bold = TextStyle(fontWeight: FontWeight.bold);
const big = TextStyle(fontSize: 22);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.23+1
version: 1.0.24+1

environment:
sdk: '>=3.4.1 <4.0.0'
Expand Down

0 comments on commit 9287fc0

Please sign in to comment.