Skip to content

Commit 76ba0f7

Browse files
Merge pull request #3 from ebabhi/fixes/snackbar
Fix : Utilize unused parameter in function signature
2 parents 175cfa6 + 2bba540 commit 76ba0f7

File tree

3 files changed

+45
-5
lines changed

3 files changed

+45
-5
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 3.1.4
2+
3+
- Utilize unused parameter in FPSnackBar
4+
15
# 3.1.3
26

37
- update dependencies

Diff for: lib/src/snackbars/fp_snackbar.dart

+40-4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ class FpSnackbar {
7979
bool autoDismiss = true,
8080
Duration animationDuration = _defaultAnimationDuration,
8181
Curve? animationCurve,
82+
String? title,
83+
TextStyle? textStyle,
84+
TextStyle? titleTextStyle,
85+
Widget? action,
86+
int? contentMaxLines,
87+
bool centerText = false,
8288
}) {
8389
FpSnackbar._(
8490
snackbarDuration: snackbarDuration,
@@ -87,7 +93,12 @@ class FpSnackbar {
8793
builder: (context) => SnackbarWidget(
8894
message: message,
8995
backgroundColor: Colors.green,
90-
centerText: false,
96+
centerText: centerText,
97+
title: title,
98+
textStyle: textStyle,
99+
titleTextStyle: titleTextStyle,
100+
action: action,
101+
contentMaxLines: contentMaxLines,
91102
),
92103
animationDuration: animationDuration,
93104
animationCurve: animationCurve,
@@ -103,6 +114,12 @@ class FpSnackbar {
103114
bool autoDismiss = true,
104115
Duration animationDuration = _defaultAnimationDuration,
105116
Curve? animationCurve,
117+
String? title,
118+
TextStyle? textStyle,
119+
TextStyle? titleTextStyle,
120+
Widget? action,
121+
int? contentMaxLines,
122+
bool centerText = false,
106123
}) {
107124
FpSnackbar._(
108125
snackbarDuration: snackbarDuration,
@@ -111,7 +128,12 @@ class FpSnackbar {
111128
builder: (context) => SnackbarWidget(
112129
message: message,
113130
backgroundColor: Colors.red,
114-
centerText: false,
131+
centerText: centerText,
132+
title: title,
133+
textStyle: textStyle,
134+
titleTextStyle: titleTextStyle,
135+
action: action,
136+
contentMaxLines: contentMaxLines,
115137
),
116138
animationDuration: animationDuration,
117139
animationCurve: animationCurve,
@@ -127,6 +149,12 @@ class FpSnackbar {
127149
bool autoDismiss = true,
128150
Duration animationDuration = _defaultAnimationDuration,
129151
Curve? animationCurve,
152+
String? title,
153+
TextStyle? textStyle,
154+
TextStyle? titleTextStyle,
155+
Widget? action,
156+
int? contentMaxLines,
157+
bool centerText = false,
130158
}) {
131159
FpSnackbar._(
132160
snackbarDuration: snackbarDuration,
@@ -135,7 +163,12 @@ class FpSnackbar {
135163
builder: (context) => SnackbarWidget(
136164
message: message,
137165
backgroundColor: Colors.orange,
138-
centerText: false,
166+
centerText: centerText,
167+
title: title,
168+
textStyle: textStyle,
169+
titleTextStyle: titleTextStyle,
170+
action: action,
171+
contentMaxLines: contentMaxLines,
139172
),
140173
animationDuration: animationDuration,
141174
animationCurve: animationCurve,
@@ -237,7 +270,10 @@ class SnackbarInfo {
237270
bool operator ==(Object other) {
238271
if (identical(this, other)) return true;
239272

240-
return other is SnackbarInfo && other.key == key && other.createdAt == createdAt && other.entry == entry;
273+
return other is SnackbarInfo &&
274+
other.key == key &&
275+
other.createdAt == createdAt &&
276+
other.entry == entry;
241277
}
242278

243279
@override

Diff for: pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: fp_util
22
description: Utilities and Extensions for num,BuildContext,EdgeInsets,File,String. constants for horizontal and vertical spacing.
3-
version: 3.1.3
3+
version: 3.1.4
44
homepage: https://docs.kishormainali.com/
55
repository: https://github.com/kishormainali/fp_util
66
issue_tracker: https://github.com/kishormainali/fp_util/issues

0 commit comments

Comments
 (0)