Skip to content

Commit 7e9658d

Browse files
refactor(shared): update widget FeedbackPage
1 parent 25cf191 commit 7e9658d

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

libs/flutter/shared/lib/src/widgets/feedback_page_widget.dart

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,20 @@ import 'package:flutter_svg/flutter_svg.dart';
44
class FeedbackPageWidget extends StatelessWidget {
55
final String illustration;
66
final String message;
7+
final String? description;
8+
final String? textButton;
9+
final bool enabledAction;
10+
final VoidCallback? onPressed;
711

8-
const FeedbackPageWidget({Key? key, required this.message, required this.illustration}) : super(key: key);
12+
const FeedbackPageWidget({
13+
Key? key,
14+
required this.message,
15+
required this.illustration,
16+
this.description,
17+
this.onPressed,
18+
this.enabledAction = false,
19+
this.textButton
20+
}) : super(key: key);
921

1022
@override
1123
Widget build(BuildContext context) {
@@ -28,7 +40,21 @@ class FeedbackPageWidget extends StatelessWidget {
2840
fontSize: 18,
2941
fontWeight: FontWeight.w700,
3042
),
31-
)
43+
),
44+
description != null ? Padding(
45+
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 6),
46+
child: Text(
47+
description!,
48+
textAlign: TextAlign.center,
49+
style: const TextStyle(
50+
fontSize: 14,
51+
),
52+
),
53+
) : Container(),
54+
enabledAction ? TextButton(
55+
onPressed: () => onPressed!(),
56+
child: Text(textButton!, style: const TextStyle(color: Colors.red),)
57+
) : Container(),
3258
],
3359
),
3460
),

0 commit comments

Comments
 (0)