@@ -24,75 +24,32 @@ import 'package:flutter/material.dart';
24
24
import '../../showcaseview.dart' ;
25
25
26
26
class TooltipActionButton {
27
- /// To Provide Background color to the action
28
- final Color ? backgroundColor;
29
-
30
- /// To Provide borderRadius to the action
31
- ///
32
- /// Defaults to const BorderRadius.all(Radius.circular(50)),
33
- final BorderRadius ? borderRadius;
34
-
35
- /// To Provide textStyle to the action text
36
- final TextStyle ? textStyle;
37
-
38
- /// To Provide padding to the action widget
39
- ///
40
- /// Defaults to const EdgeInsets.symmetric(horizontal: 15,vertical: 4,)
41
- final EdgeInsets ? padding;
42
-
43
- /// To Provide a custom widget for the action in [TooltipActionButton.custom]
44
- final Widget ? button;
45
-
46
- /// To Provide a leading icon for the action
47
- final ActionButtonIcon ? leadIcon;
48
-
49
- /// To Provide a tail icon for the action
50
- final ActionButtonIcon ? tailIcon;
51
-
52
- /// To Provide a action type
53
- final TooltipDefaultActionType ? type;
54
-
55
- /// To Provide a text for action
56
- ///
57
- /// If type is provided then it will take type name
58
- final String ? name;
59
-
60
- /// To Provide a onTap for action
61
- ///
62
- /// If type is provided then it will take type's OnTap
63
- final VoidCallback ? onTap;
64
-
65
- /// To Provide a border for action
66
- final Border ? border;
67
-
68
- /// Hides action widgets for the showcase. Add key of particular showcase
69
- /// in this list.
70
- /// This only works for the global action widgets
71
- /// Defaults to []
72
- final List <GlobalKey > hideActionWidgetForShowcase;
73
-
74
- /// A configuration for a tooltip action button or Provide a custom tooltip action.
27
+ /// A configuration for a tooltip action button or Provide a custom tooltip
28
+ /// action.
75
29
///
76
30
/// This class allows you to define predefined actions like "Next,"
77
31
/// "Previous," and "Close," or specify a custom action widget.
78
32
///
79
33
/// **Required arguments:**
80
34
///
81
- /// - `type` : The type of the action button (e.g., `TooltipDefaultActionType.next` ).
35
+ /// - `type` : The type of the action button (e.g.,
36
+ /// `TooltipDefaultActionType.next` ).
82
37
///
83
38
/// **Optional arguments:**
84
39
///
85
40
/// - `backgroundColor` : The background color of the button
86
41
/// - `textStyle` : The text style for the button label.
87
- /// - `borderRadius` : The border radius of the button. Defaults to a rounded shape.
42
+ /// - `borderRadius` : The border radius of the button. Defaults to a
43
+ /// rounded shape.
88
44
/// - `padding` : The padding around the button content.
89
45
/// - `leadIcon` : An optional leading icon for the button.
90
46
/// - `tailIcon` : An optional trailing icon for the button.
91
47
/// - `name` : The text for the button label (ignored if `type` is provided).
92
48
/// - `onTap` : A callback function triggered when the button is tapped.
93
49
/// - `border` : A border to draw around the button.
94
- /// - `hideActionWidgetForShowcase` : A list of `GlobalKey` s of showcases where this
95
- /// action widget should be hidden. This only works for global action widgets.
50
+ /// - `hideActionWidgetForShowcase` : A list of `GlobalKey` s of showcases
51
+ /// where this action widget should be hidden. This only works for global
52
+ /// action widgets.
96
53
const TooltipActionButton ({
97
54
required this .type,
98
55
this .backgroundColor,
@@ -125,4 +82,51 @@ class TooltipActionButton {
125
82
name = null ,
126
83
onTap = null ,
127
84
border = null ;
85
+
86
+ /// To Provide Background color to the action
87
+ final Color ? backgroundColor;
88
+
89
+ /// To Provide borderRadius to the action
90
+ ///
91
+ /// Defaults to const BorderRadius.all(Radius.circular(50)),
92
+ final BorderRadius ? borderRadius;
93
+
94
+ /// To Provide textStyle to the action text
95
+ final TextStyle ? textStyle;
96
+
97
+ /// To Provide padding to the action widget
98
+ ///
99
+ /// Defaults to const EdgeInsets.symmetric(horizontal: 15,vertical: 4,)
100
+ final EdgeInsets ? padding;
101
+
102
+ /// To Provide a custom widget for the action in [TooltipActionButton.custom]
103
+ final Widget ? button;
104
+
105
+ /// To Provide a leading icon for the action
106
+ final ActionButtonIcon ? leadIcon;
107
+
108
+ /// To Provide a tail icon for the action
109
+ final ActionButtonIcon ? tailIcon;
110
+
111
+ /// To Provide a action type
112
+ final TooltipDefaultActionType ? type;
113
+
114
+ /// To Provide a text for action
115
+ ///
116
+ /// If type is provided then it will take type name
117
+ final String ? name;
118
+
119
+ /// To Provide a onTap for action
120
+ ///
121
+ /// If type is provided then it will take type's OnTap
122
+ final VoidCallback ? onTap;
123
+
124
+ /// To Provide a border for action
125
+ final Border ? border;
126
+
127
+ /// Hides action widgets for the showcase. Add key of particular showcase
128
+ /// in this list.
129
+ /// This only works for the global action widgets
130
+ /// Defaults to []
131
+ final List <GlobalKey > hideActionWidgetForShowcase;
128
132
}
0 commit comments