heka_health 0.0.11
heka_health: ^0.0.11 copied to clipboard
Just 4 lines of code to integrate with Google Fit, Apple HealthKit and other fitness devices.
import 'package:flutter/material.dart';
import 'package:heka_health/heka_health.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'HekaHealth Demo',
home: HomePage(),
);
}
}
class HomePage extends StatefulWidget {
const HomePage({
super.key,
});
@override
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
static const _apiKey = '7368bad8-aadd-4624-a58c-7e8af2b3cfb7';
final _userUuid = '7895pulkit@test.com';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('HekaHealth Demo'),
),
body: Center(
child: HekaHealthWidget(
apiKey: _apiKey,
userUuid: _userUuid,
),
),
);
}
}