16 lines
299 B
Dart
16 lines
299 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
|
|
class CarouselIndexProvider extends ChangeNotifier {
|
|
int _currentIndex = 0;
|
|
|
|
int get currentIndex => _currentIndex;
|
|
|
|
void updateIndex(int index) {
|
|
if (_currentIndex != index) {
|
|
_currentIndex = index;
|
|
notifyListeners();
|
|
}
|
|
}
|
|
}
|