@@ -3,10 +3,9 @@ library introduction_screen;
33import 'dart:async' ;
44import 'dart:math' ;
55
6- import 'package:flutter/material.dart' ;
7-
86import 'package:collection/collection.dart' ;
97import 'package:dots_indicator/dots_indicator.dart' ;
8+ import 'package:flutter/material.dart' ;
109import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart' ;
1110
1211import '/src/helper.dart' ;
@@ -199,6 +198,9 @@ class IntroductionScreen extends StatefulWidget {
199198 /// Back button semantic label
200199 final String ? backSemantic;
201200
201+ /// Progress indicator semantic label
202+ final String Function (int , int )? progressSemantic;
203+
202204 /// Enable or disable content resizing for bottom inset (e.g. keyboard)
203205 ///
204206 /// @Default `true`
@@ -324,6 +326,7 @@ class IntroductionScreen extends StatefulWidget {
324326 this .nextSemantic,
325327 this .doneSemantic,
326328 this .backSemantic,
329+ this .progressSemantic,
327330 this .resizeToAvoidBottomInset = true ,
328331 this .controlsPosition = const Position (left: 0 , right: 0 , bottom: 0 ),
329332 this .controlsMargin = EdgeInsets .zero,
@@ -680,7 +683,9 @@ class IntroductionScreenState extends State<IntroductionScreen> {
680683 child: widget.isProgress
681684 ? widget.customProgress ??
682685 Semantics (
683- label:
686+ label: widget.progressSemantic? .call (
687+ getCurrentPage () + 1 ,
688+ getPagesLength ()) ??
684689 "Page ${getCurrentPage () + 1 } of ${getPagesLength ()}" ,
685690 excludeSemantics: true ,
686691 child: DotsIndicator (
0 commit comments