fhir_auth 0.0.2
fhir_auth: ^0.0.2 copied to clipboard
A Dart/Flutter package for authorization & authentication, includes SMART on FHIR and Google sign-in
example/main.dart
import 'package:flutter/material.dart';
import 'server_calls.dart';
Future main() async {
WidgetsFlutterBinding.ensureInitialized();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomeView(),
);
}
}
class HomeView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 48.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
RaisedButton(
child: const Text('Press me!'),
onPressed: () async {
/// need to authorize app online before logging in via app
await aidbox();
/// have to ensure google play is up to date
await gcs();
/// good to go
await hapi();
/// for testing
await local();
/// good to go
await logica();
/// good to go
await mihin();
},
),
],
),
),
),
);
}
}