fitbitter 2.0.6 copy "fitbitter: ^2.0.6" to clipboard
fitbitter: ^2.0.6 copied to clipboard

A Flutter package to make your life easier when dealing with Fitbit APIs.

2.0.6 - 2025-07-12 #

Updated android example, readme and changelog to reflect using flutter_web_auth_2.

2.0.5 - 2025-06-29 #

Breaking change: Migrated from flutter_web_auth to flutter_web_auth_2. Android users must update their AndroidManifest.xml according to the requirements in the README. For more details, see issue #36.

Updates dependencies and fixes minor bugs.

2.0.4 - 2024-01-24 #

Solves #19: Now, when using the method FitbitConnector.authorize, it is possible to specify a specific authorization scope (defined in https://dev.fitbit.com/build/reference/web-api/developer-guide/application-design/#Scopes) and token expiration time (defined in https://dev.fitbit.com/build/reference/web-api/authorization/authorize/). The new constructor is defined as:

static Future<FitbitCredentials?> authorize(
      {required String clientID,
      required String clientSecret,
      required String redirectUri,
      required String callbackUrlScheme,
      List<FitbitAuthScope> scopeList = const [FitbitAuthScope.ACTIVITY, FitbitAuthScope.CARDIO_FITNESS, FitbitAuthScope.HEART_RATE, FitbitAuthScope.LOCATION, FitbitAuthScope.NUTRITION, FitbitAuthScope.OXYGEN_SATURATION, FitbitAuthScope.PROFILE, FitbitAuthScope.RESPIRATORY_RATE, FitbitAuthScope.SETTINGS, FitbitAuthScope.SLEEP, FitbitAuthScope.SOCIAL, FitbitAuthScope.TEMPERATURE],
      int expiresIn = 28800  
        }) async {...}

Current available scopes are defined by the enumerator FitbitAuthScope:

enum FitbitAuthScope{
  ACTIVITY, // for `activity` scope
  CARDIO_FITNESS, // for `cardio_fitness` scope
  HEART_RATE, // for `heartrate` scope
  LOCATION, // for `location` scope
  NUTRITION, // for `nutrition` scope
  PROFILE, // for `profile` scope
  SETTINGS, // for `settings` scope
  SLEEP, // for `sleep` scope
  SOCIAL, // for `social` scope
  WEIGHT, // for `weight` scope
  OXYGEN_SATURATION, // for `oxygen_saturation` scope
  RESPIRATORY_RATE, // for `respiratory_rate` scope
  TEMPERATURE // for `temperature` scope
}

Available token expiration lifetimes are: 3600 (1 hour), 28800 (8 hours), 86400 (1 day), 604800 (1 week), 2592000 (30 days), or 31536000 (1 year).

Updates dependencies.

2.0.3 - 2024-01-03 #

Updates dependencies.

2.0.2 - 2023-06-30 #

Updates dependencies.

2.0.1 - 2022-09-06 #

Fixed some typos.

2.0.0 - 2022-09-06 #

Major release 2.0.0.

Breaking change:

Fitbit provided tokens are no longer managed by fitbitter. Now they are returned during the authorization process by the FitbitConnector.authorize() method:

FitbitCredentials? fitbitCredentials =
                    await FitbitConnector.authorize(
                        clientID: Strings.fitbitClientID,
                        clientSecret: Strings.fitbitClientSecret,
                        redirectUri: Strings.fitbitRedirectUri,
                        callbackUrlScheme: Strings.fitbitCallbackScheme);

As a consequence, to fetch data it is necessary to pass the credentials to each FitbitAPIURL constructor. For example:

See the docs for more info and examples.

New features:

  • Now it is possible to fetch breathing rate data (see FitbitBreathingRateData)
  • Now it is possible to fetch cardio score (VO2Max) data (see FitbitCardioScoreData)
  • Now it is possible to heart rate variability data (see FitbitHeartRateVariabilityData)
  • Now it is possible to fetch intraday Heart data (see FitbitHeartRateIntradayData)
  • Now it is possible to fetch SpO2 data (see FitbitSpO2Data)
  • Now it is possible to fetch intraday SpO2 data (see FitbitSpO2IntradayData)
  • Now it is possible to fetch skin temperature data (see FitbitTemperatureSkinData)

Minor changes:

  • FitbitHeartData is now FitbitHeartRateData
  • Removed WithUserId string from the name of APIURL related constructors
  • encodedId field in the Data classes is now called userID

1.1.1 - 2022-02-25 #

Formatted according to flutter format ..

1.0.0 - 2022-02-25 #

Release 1.0.0. Added docs at https://gcappon.github.com/fitbitter/ Updated dependencies.

1.0.0-dev.5 - 2021-04-06 #

Now compatible with null safety.

1.0.0-dev.4 - 2021-01-15 #

Formatted according to flutter format .. Added an example Flutter app.

1.0.0-dev.3 - 2021-01-15 #

Upgraded dependencies. Deleted initialization deprecation of List. Provide full API docs.

1.0.0-dev.2 - 2021-01-15 #

Fixed class exports.

1.0.0-dev.1 - 2021-01-15 #

Just the first release.

17
likes
150
points
270
downloads

Publisher

verified publishergcappon.com

Weekly Downloads

A Flutter package to make your life easier when dealing with Fitbit APIs.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dio, flutter, flutter_web_auth_2, intl, logger

More

Packages that depend on fitbitter