You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
404 B
Dart
18 lines
404 B
Dart
import 'package:flutter/cupertino.dart';
|
|
|
|
class PharmacyPagesViewModel with ChangeNotifier {
|
|
int currentTab = 0;
|
|
PageController? pageController;
|
|
|
|
PharmacyPagesViewModel() {
|
|
pageController = PageController(keepPage: true);
|
|
}
|
|
changeCurrentTab(int tab) {
|
|
if (pageController!.hasClients) {
|
|
currentTab = tab;
|
|
pageController!.jumpToPage(tab);
|
|
notifyListeners();
|
|
}
|
|
}
|
|
}
|