import 'package:flutter/cupertino.dart'; class BottomNavigatorIndex extends ChangeNotifier{ int index=0; static final BottomNavigatorIndex _index=new BottomNavigatorIndex._internal(); BottomNavigatorIndex._internal(); factory BottomNavigatorIndex(){ return _index; } setIndex(nextIndex){ index=nextIndex; notifyListeners(); } } final bottomNavigatorIndex= BottomNavigatorIndex();