okru_oauth 1.0.2 okru_oauth: ^1.0.2 copied to clipboard
okru auth library
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:okru_oauth/okru_oauth.dart';
const String appId = 'appId';
const String appKey = 'appKey';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final String _platformVersion = 'Unknown';
@override
void initState() {
super.initState();
initPlatformState();
}
Future<void> initPlatformState() async {
try {
await OkruOauth.init(appId: appId, appKey: appKey);
final auth = await OkruOauth.login();
print(auth);
} on PlatformException {
rethrow;
}
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Running on: $_platformVersion\n'),
),
),
);
}
}