diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart index c885ae0ade..9da5253da1 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart @@ -306,14 +306,16 @@ class LocalHistoryEntry { } } -/// A mixin used by routes to handle back navigations internally by popping a list. +/// A route that can handle back navigations internally by popping a list. /// /// When a [Navigator] is instructed to pop, the current route is given an -/// opportunity to handle the pop internally. A `LocalHistoryRoute` handles the +/// opportunity to handle the pop internally. A LocalHistoryRoute handles the /// pop internally if its list of local history entries is non-empty. Rather /// than being removed as the current route, the most recent [LocalHistoryEntry] /// is removed from the list and its [LocalHistoryEntry.onRemove] is called. -mixin LocalHistoryRoute on Route { +/// +/// This class is typically used as a mixin. +abstract class LocalHistoryRoute extends Route { List _localHistory; /// Adds a local history entry to this route. diff --git a/packages/flutter/test/widgets/routes_test.dart b/packages/flutter/test/widgets/routes_test.dart index 2d8e784a60..14d3e11ee1 100644 --- a/packages/flutter/test/widgets/routes_test.dart +++ b/packages/flutter/test/widgets/routes_test.dart @@ -12,7 +12,7 @@ final List results = []; Set routes = HashSet(); -class TestRoute extends Route with LocalHistoryRoute { +class TestRoute extends LocalHistoryRoute { TestRoute(this.name); final String name;