From fa8227cec56f58446bd9efde7351a5364b5ee457 Mon Sep 17 00:00:00 2001 From: chenenyu Date: Sun, 23 Apr 2023 16:20:36 +0800 Subject: [PATCH] Update readme. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3f14be7..bedaa61 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Pub Version](https://img.shields.io/pub/v/lifecycle)](https://pub.dev/packages/lifecycle) -[![pub points](https://badges.bar/lifecycle/pub%20points)](https://pub.dev/packages/lifecycle/score) -[![likes](https://badges.bar/lifecycle/likes)](https://pub.dev/packages/lifecycle/score) +[![pub points](https://img.shields.io/pub/points/lifecycle)](https://pub.dev/packages/lifecycle) +[![likes](https://img.shields.io/pub/likes/lifecycle)](https://pub.dev/packages/lifecycle) ![PR](https://img.shields.io/badge/PRs-welcome-blue) # lifecycle @@ -332,16 +332,16 @@ Widget build(BuildContext context) { ### Other APIs -* Find a route according to a specific name. +* Iterates routes. ``` -Route route = defaultLifecycleObserver.findRoute('route_name'); +defaultLifecycleObserver.iterateRoutes(bool Function(route) callback); ``` -* Remove a route according to a specific name. +* Remove a route. ``` -defaultLifecycleObserver.removeNamed('route_name'); +defaultLifecycleObserver.removeRoute(Route route, [T? result]); ``` * Dispose a LifecycleObserver when it will never be used.