Skip to content

Commit d17e9a2

Browse files
committed
Fix build error due to merged changes
1 parent 24bd197 commit d17e9a2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/flutter_html.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ class SelectableHtml extends StatelessWidget {
190190
/// **onLinkTap** This function is called whenever a link (`<a href>`)
191191
/// is tapped.
192192
///
193+
/// **onAnchorTap** This function is called whenever an anchor (#anchor-id)
194+
/// is tapped.
195+
///
193196
/// **tagsList** Tag names in this array will be the only tags rendered. By default all tags that support selectable content are rendered.
194197
///
195198
/// **style** Pass in the style information for the Html here.
@@ -212,6 +215,7 @@ class SelectableHtml extends StatelessWidget {
212215
Key? key,
213216
required this.data,
214217
this.onLinkTap,
218+
this.onAnchorTap,
215219
this.onCssParseError,
216220
this.shrinkWrap = false,
217221
this.style = const {},
@@ -223,6 +227,7 @@ class SelectableHtml extends StatelessWidget {
223227
Key? key,
224228
required this.document,
225229
this.onLinkTap,
230+
this.onAnchorTap,
226231
this.onCssParseError,
227232
this.shrinkWrap = false,
228233
this.style = const {},
@@ -239,6 +244,10 @@ class SelectableHtml extends StatelessWidget {
239244
/// A function that defines what to do when a link is tapped
240245
final OnTap? onLinkTap;
241246

247+
/// A function that defines what to do when an anchor link is tapped. When this value is set,
248+
/// the default anchor behaviour is overwritten.
249+
final OnTap? onAnchorTap;
250+
242251
/// A function that defines what to do when CSS fails to parse
243252
final OnCssParseError? onCssParseError;
244253

@@ -265,6 +274,7 @@ class SelectableHtml extends StatelessWidget {
265274
key: null,
266275
htmlData: doc,
267276
onLinkTap: onLinkTap,
277+
onAnchorTap: onAnchorTap,
268278
onImageTap: null,
269279
onCssParseError: onCssParseError,
270280
onImageError: null,

0 commit comments

Comments
 (0)