@@ -681,7 +681,7 @@ class Actions extends StatefulWidget {
681681 // getElementForInheritedWidgetOfExactType. Returns true if the visitor found
682682 // what it was looking for.
683683 static bool _visitActionsAncestors (BuildContext context, bool Function (InheritedElement element) visitor) {
684- InheritedElement ? actionsElement = context.getElementForInheritedWidgetOfExactType <_ActionsMarker >();
684+ InheritedElement ? actionsElement = context.getElementForInheritedWidgetOfExactType <_ActionsScope >();
685685 while (actionsElement != null ) {
686686 if (visitor (actionsElement) == true ) {
687687 break ;
@@ -690,7 +690,7 @@ class Actions extends StatefulWidget {
690690 // context.getElementForInheritedWidgetOfExactType will return itself if it
691691 // happens to be of the correct type.
692692 final BuildContext parent = _getParent (actionsElement);
693- actionsElement = parent.getElementForInheritedWidgetOfExactType <_ActionsMarker >();
693+ actionsElement = parent.getElementForInheritedWidgetOfExactType <_ActionsScope >();
694694 }
695695 return actionsElement != null ;
696696 }
@@ -700,7 +700,7 @@ class Actions extends StatefulWidget {
700700 static ActionDispatcher _findDispatcher (BuildContext context) {
701701 ActionDispatcher ? dispatcher;
702702 _visitActionsAncestors (context, (InheritedElement element) {
703- final ActionDispatcher ? found = (element.widget as _ActionsMarker ).dispatcher;
703+ final ActionDispatcher ? found = (element.widget as _ActionsScope ).dispatcher;
704704 if (found != null ) {
705705 dispatcher = found;
706706 return true ;
@@ -807,7 +807,7 @@ class Actions extends StatefulWidget {
807807 );
808808
809809 _visitActionsAncestors (context, (InheritedElement element) {
810- final _ActionsMarker actions = element.widget as _ActionsMarker ;
810+ final _ActionsScope actions = element.widget as _ActionsScope ;
811811 final Action <T >? result = _castAction (actions, intent: intent);
812812 if (result != null ) {
813813 context.dependOnInheritedElement (element);
@@ -836,7 +836,7 @@ class Actions extends StatefulWidget {
836836 );
837837
838838 _visitActionsAncestors (context, (InheritedElement element) {
839- final _ActionsMarker actions = element.widget as _ActionsMarker ;
839+ final _ActionsScope actions = element.widget as _ActionsScope ;
840840 final Action <T >? result = _castAction (actions, intent: intent);
841841 if (result != null ) {
842842 action = result;
@@ -849,8 +849,8 @@ class Actions extends StatefulWidget {
849849 }
850850
851851 // Find the [Action] that handles the given `intent` in the given
852- // `_ActionsMarker `, and verify it has the right type parameter.
853- static Action <T >? _castAction <T extends Intent >(_ActionsMarker actionsMarker, { T ? intent }) {
852+ // `_ActionsScope `, and verify it has the right type parameter.
853+ static Action <T >? _castAction <T extends Intent >(_ActionsScope actionsMarker, { T ? intent }) {
854854 final Action <Intent >? mappedAction = actionsMarker.actions[intent? .runtimeType ?? T ];
855855 if (mappedAction is Action <T >? ) {
856856 return mappedAction;
@@ -870,7 +870,7 @@ class Actions extends StatefulWidget {
870870 /// widget is found.
871871 static ActionDispatcher of (BuildContext context) {
872872 assert (context != null );
873- final _ActionsMarker ? marker = context.dependOnInheritedWidgetOfExactType <_ActionsMarker >();
873+ final _ActionsScope ? marker = context.dependOnInheritedWidgetOfExactType <_ActionsScope >();
874874 return marker? .dispatcher ?? _findDispatcher (context);
875875 }
876876
@@ -897,7 +897,7 @@ class Actions extends StatefulWidget {
897897 Object ? returnValue;
898898
899899 final bool actionFound = _visitActionsAncestors (context, (InheritedElement element) {
900- final _ActionsMarker actions = element.widget as _ActionsMarker ;
900+ final _ActionsScope actions = element.widget as _ActionsScope ;
901901 final Action <T >? result = _castAction (actions, intent: intent);
902902 if (result != null && result.isEnabled (intent)) {
903903 // Invoke the action we found using the relevant dispatcher from the Actions
@@ -950,7 +950,7 @@ class Actions extends StatefulWidget {
950950 Object ? returnValue;
951951
952952 _visitActionsAncestors (context, (InheritedElement element) {
953- final _ActionsMarker actions = element.widget as _ActionsMarker ;
953+ final _ActionsScope actions = element.widget as _ActionsScope ;
954954 final Action <T >? result = _castAction (actions, intent: intent);
955955 if (result != null && result.isEnabled (intent)) {
956956 // Invoke the action we found using the relevant dispatcher from the Actions
@@ -1024,7 +1024,7 @@ class _ActionsState extends State<Actions> {
10241024
10251025 @override
10261026 Widget build (BuildContext context) {
1027- return _ActionsMarker (
1027+ return _ActionsScope (
10281028 actions: widget.actions,
10291029 dispatcher: widget.dispatcher,
10301030 rebuildKey: rebuildKey,
@@ -1035,8 +1035,8 @@ class _ActionsState extends State<Actions> {
10351035
10361036// An inherited widget used by Actions widget for fast lookup of the Actions
10371037// widget information.
1038- class _ActionsMarker extends InheritedWidget {
1039- const _ActionsMarker ({
1038+ class _ActionsScope extends InheritedWidget {
1039+ const _ActionsScope ({
10401040 required this .dispatcher,
10411041 required this .actions,
10421042 required this .rebuildKey,
@@ -1049,7 +1049,7 @@ class _ActionsMarker extends InheritedWidget {
10491049 final Object rebuildKey;
10501050
10511051 @override
1052- bool updateShouldNotify (_ActionsMarker oldWidget) {
1052+ bool updateShouldNotify (_ActionsScope oldWidget) {
10531053 return rebuildKey != oldWidget.rebuildKey
10541054 || oldWidget.dispatcher != dispatcher
10551055 || ! mapEquals <Type , Action <Intent >>(oldWidget.actions, actions);
0 commit comments