Skip to content
pubscout

strava_client

2.4.0, released 3 months ago by an unverified publisher

An unofficial Flutter client for the Strava V3 API with OAuth2 and repository-based endpoints.

Unverified publisher
$ flutter pub add strava_client
Source repository

What it does

Provides a client for the Strava V3 API, handling OAuth2 authentication with automatic token refresh, structured error handling, and typed request/response models for activities, athletes, segments, and more.

AI-written summary of version 2.4.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to integrate Strava data into your Flutter application.
  • You want built-in OAuth2 flow with automatic token refreshing and storage.

Skip it when

  • You are building a web application (web platform is not supported).
  • You only need generic HTTP networking without Strava-specific models.

Strengths

  • Handles complex OAuth2 flows and automatic token refresh out of the box.
  • Provides repository-per-domain API structure covering athletes, activities, segments, etc.
  • Typed models generated with json_serializable and structured error handling via Fault.

Weaknesses

  • Web platform is not supported.
  • It is an unofficial third-party API client.

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
7

Requires adding custom redirect URL scheme configuration in AndroidManifest.xml and Info.plist, and setting up an API client in Strava settings.

final stravaClient = StravaClient(
  clientId: "YOUR_CLIENT_ID",
  secret: "YOUR_CLIENT_SECRET",
);

final token = await stravaClient.authentication.authenticate(
  scopes: [AuthenticationScope.activity_read_all],
  redirectUrl: "stravaflutter://redirect",
  callbackUrlScheme: "stravaflutter",
);

final athlete = await stravaClient.athletes.getAuthenticatedAthlete();

Alternatives

Packages that do the same job and could replace strava_client.

  • cronet_http

    An Android Flutter plugin providing access to the Cronet HTTP client.

  • vmodal_sdk_flutter

    Typed VModal API client for Flutter to upload videos and search moments by meaning.

  • http2

    An HTTP/2 implementation in Dart for low-level transport and pooled HTTP/2 requests.

  • fresh_dio

    A dio interceptor for automatic token refresh and authentication management.

Works with

Packages commonly used together with strava_client: ones it builds on, ones built on it, and its own family.