Files
app/lib/presentation/providers/navigation_provider.dart
2026-05-15 09:03:09 +08:00

15 lines
309 B
Dart

import 'package:flutter/foundation.dart';
class NavigationProvider extends ChangeNotifier {
int _currentIndex = 0; // 默认概览页
int get currentIndex => _currentIndex;
void setIndex(int index) {
if (_currentIndex != index) {
_currentIndex = index;
notifyListeners();
}
}
}