Frontend first draft
This commit is contained in:
15
frontend/pweb/lib/providers/carousel.dart
Normal file
15
frontend/pweb/lib/providers/carousel.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user