Skip to content

Add example of protecting a route with subscription #81

@matthewwong525

Description

@matthewwong525

Before i do this i probably need to add a pricing page within the app. And before i do that i probably need to #55

To protect a route:

  1. In route_notifier.dart, I need to make the redirect, data function async
  2. add the route i want to protect in an if statement
  3. add a await ref.read(metadataProvider.future) to retrieve the latest metadata data in the if statement (should be cached so it should be relatively fast)
  4. Check the subscription in the if statement to protect the route.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions