Skip to content

Commit

Permalink
feat: remove box positions
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekAbdelouahed committed Oct 8, 2023
1 parent 4ebe83d commit f642b43
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 32 deletions.
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MyApp extends StatelessWidget {
),
boxColor: Colors.black.withOpacity(0.5),
boxRadius: 10,
boxReactionSpacing: 20,
itemSpacing: 20,
itemSize: const Size(40, 60),
),
);
Expand Down
1 change: 0 additions & 1 deletion lib/flutter_reaction_button.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
library flutter_reaction_button;

export 'src/enums/box_position.dart';
export 'src/models/reaction.dart';
export 'src/widgets/reaction_button.dart';
11 changes: 0 additions & 11 deletions lib/src/enums/box_position.dart

This file was deleted.

16 changes: 3 additions & 13 deletions lib/src/widgets/reaction_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ class ReactionButton<T> extends StatefulWidget {
this.placeholder,
this.selectedReaction,
this.boxOffset = Offset.zero,
this.boxPosition = VerticalPosition.top,
this.boxHorizontalPosition = HorizontalPosition.start,
this.boxColor = Colors.white,
this.boxElevation = 5,
this.boxRadius = 50,
this.isChecked = false,
this.boxReactionSpacing = 8,
this.itemSpacing = 8,
this.itemScale = .3,
required this.itemSize,
this.animateBox = true,
Expand All @@ -45,12 +43,6 @@ class ReactionButton<T> extends StatefulWidget {
/// Offset to add to the placement of the box
final Offset boxOffset;

/// Vertical position of the reactions box relative to the button [default = VerticalPosition.TOP]
final VerticalPosition boxPosition;

/// Horizontal position of the reactions box relative to the button [default = HorizontalPosition.START]
final HorizontalPosition boxHorizontalPosition;

/// Reactions box color [default = white]
final Color boxColor;

Expand All @@ -71,7 +63,7 @@ class ReactionButton<T> extends StatefulWidget {
final EdgeInsetsGeometry boxPadding;

/// Spacing between the reaction icons in the box
final double boxReactionSpacing;
final double itemSpacing;

/// Scale ratio when item hovered [default = 0.3]
final double itemScale;
Expand Down Expand Up @@ -135,15 +127,13 @@ class _ReactionButtonState<T> extends State<ReactionButton<T>> {
buttonOffset: offset ?? _globalKey.offset,
itemSize: widget.itemSize,
reactions: widget.reactions,
verticalPosition: widget.boxPosition,
horizontalPosition: widget.boxHorizontalPosition,
color: widget.boxColor,
elevation: widget.boxElevation,
radius: widget.boxRadius,
offset: widget.boxOffset,
boxDuration: widget.boxAnimationDuration,
boxPadding: widget.boxPadding,
itemSpace: widget.boxReactionSpacing,
itemSpace: widget.itemSpacing,
itemScale: widget.itemScale,
itemScaleDuration: widget.itemAnimationDuration,
animateBox: widget.animateBox,
Expand Down
6 changes: 0 additions & 6 deletions lib/src/widgets/reactions_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class ReactionsBox<T> extends StatefulWidget {
required this.buttonOffset,
required this.itemSize,
required this.reactions,
required this.verticalPosition,
required this.horizontalPosition,
required this.color,
required this.elevation,
required this.radius,
Expand All @@ -32,10 +30,6 @@ class ReactionsBox<T> extends StatefulWidget {

final List<Reaction<T>?> reactions;

final VerticalPosition verticalPosition;

final HorizontalPosition horizontalPosition;

final Color color;

final double elevation;
Expand Down

0 comments on commit f642b43

Please sign in to comment.