vital_flutter 0.3.6 copy "vital_flutter: ^0.3.6" to clipboard
vital_flutter: ^0.3.6 copied to clipboard

discontinued
PlatformAndroidiOS
outdated

The official Flutter package for Vital APIs allowing fitness apps linking with tryvital.io and with support for HealthKit.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:vital_flutter/vital_flutter.dart';
import 'package:vital_flutter_example/users_screen.dart';
import 'package:vital_flutter_example/vital_bloc.dart';
import 'package:fimber/fimber.dart';

const apiKey = 'sk_eu_S5LdXTS_CAtdFrkX9OYsiVq_jGHaIXtZyBPbBtPkzhA';
const region = Region.eu;

void main() {
  Fimber.plantTree(DebugTree());
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.grey,
        appBarTheme: AppBarTheme(backgroundColor: Colors.grey.shade300),
      ),
      home: Provider<VitalBloc>(
        create: (context) => VitalBloc(apiKey, region, Environment.sandbox),
        child: const UsersScreen(),
      ),
    );
  }
}
1
likes
105
points
2
downloads

Publisher

verified publishertryvital.io

Weekly Downloads

The official Flutter package for Vital APIs allowing fitness apps linking with tryvital.io and with support for HealthKit.

Documentation

API reference

License

unknown (license)

Dependencies

chopper, fimber, flutter, http, json_annotation, url_launcher

More

Packages that depend on vital_flutter

Packages that implement vital_flutter