flulm_auth 0.1.2 flulm_auth: ^0.1.2 copied to clipboard
The version of the flutter SDK licensed by lemapay is currently only available for the Android system, to be added to the iOS system call.
import 'package:flulm_auth/flulm_auth.dart' as flulmAuth;
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _code = 'Unknown';
String _appId = "1912162006335888480";
@override
void initState() {
super.initState();
flulmAuth.register(appId: _appId);
flulmAuth.responseFromAuth.listen((data) {
setState(() {
_code = data.code;
});
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('callback code= $_code\n'),
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: () {
flulmAuth.sendAuth(scope: "login");
}),
),
);
}
}