Skip to content

Commit ec33337

Browse files
committed
Expose and document SlideIndicator contract
1 parent 79626a2 commit ec33337

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lib/flutter_carousel_widget.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ export 'package:flutter_carousel_widget/src/indicators/circular_slide_indicator.
99
export 'package:flutter_carousel_widget/src/indicators/circular_static_indicator.dart';
1010
export 'package:flutter_carousel_widget/src/indicators/circular_wave_slide_indicator.dart';
1111
export 'package:flutter_carousel_widget/src/indicators/sequential_fill_indicator.dart';
12+
export 'package:flutter_carousel_widget/src/indicators/slide_indicator.dart';
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
import 'package:flutter/material.dart';
22

3+
/// Abstraction used as a contract for building a slide indicator widget.
4+
///
5+
/// See also:
6+
///
7+
/// * [CircularSlideIndicator]
8+
/// * [CircularStaticIndicator]
9+
/// * [CircularWaveSlideIndicator]
10+
/// * [SequentialFillIndicator]
311
abstract class SlideIndicator {
12+
/// Builder method returning the slide indicator widget.
13+
///
14+
/// The method accepts the [currentPage] on which the carousel currently
15+
/// resides, the [pageDelta] or the difference between the current page and
16+
/// its resting position and [itemCount] which is the total number of items.
417
Widget build(int currentPage, double pageDelta, int itemCount);
518
}

0 commit comments

Comments
 (0)