You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58-3Lines changed: 58 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -276,11 +276,66 @@ Jump to the given page.
276
276
277
277
Animate to the given page.
278
278
279
-
## Custom Slide Indicators
280
279
281
-
The `flutter_carousel_widget` package comes with a few [predefined slide indicators](https://github.com/nixrajput/flutter_carousel_widget/tree/master/lib/src/indicators) with their own unique behaviors. This helps drastically and brings focus towards the actual implementation of your carousel widget.
280
+
## Predefined Slide Indicators
281
+
282
+
The `flutter_carousel_widget` package comes with a few [predefined slide indicators](https://github.com/nixrajput/flutter_carousel_widget/tree/master/lib/src/indicators) each with its own distinct behavior. To customize the slide indicators, you can pass an instance of `SlideIndicatorOptions` to the indicator you're using.
283
+
284
+
### Slide Indicator Options Customization
285
+
286
+
``` dart
287
+
FlutterCarousel(
288
+
...
289
+
options: CarouselOptions(
290
+
...
291
+
slideIndicator: CircularSlideIndicator(
292
+
slideIndicatorOptions: SlideIndicatorOptions(
293
+
/// The alignment of the indicator.
294
+
alignment: Alignment.bottomCenter,
295
+
296
+
/// The color of the currently active item indicator.
297
+
currentIndicatorColor: Colors.white,
298
+
299
+
/// The background color of all inactive item indicators.
/// Whether to enable the animation. Only used in [CircularStaticIndicator] and [SequentialFillIndicator].
329
+
enableAnimation: true),
330
+
),
331
+
332
+
),
333
+
);
334
+
```
335
+
336
+
## Custom Slide Indicators
282
337
283
-
However, there might be cases where you want to control the look or behavior of the slide indicator or implement a totally new one. You can do that by implementing the `SlideIndicator` contract.
338
+
There might be cases where you want to control the look or behavior of the slide indicator or implement a totally new one. You can do that by implementing the `SlideIndicator` contract.
284
339
285
340
The following example implements an indicator which tells the percentage of the slide the user is on:
0 commit comments