二次开发源码提交
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user