import 'package:flutter/material.dart'; class RouteState extends ChangeNotifier { String currentPathName = ''; Map query = {}; bool isVisible = true; void changeRoute(String newPath, {Map? newQuery}) { currentPathName = newPath; if (newQuery != null) { query.clear(); query = newQuery; } else { query = {}; } notifyListeners(); } void changeVisibility(bool visible) { isVisible = visible; } void clear() { currentPathName = ''; isVisible = true; query.clear(); } }