fluqq 0.0.2 copy "fluqq: ^0.0.2" to clipboard
fluqq: ^0.0.2 copied to clipboard

A new Flutter plugin.

example/lib/main.dart

import 'dart:convert';

import 'package:fluqq/fluqq.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  Tencent tencent;
  String json = '';

  @override
  Widget build(BuildContext context) {
    Fluqq.register('1105851298', '1105851298');
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Fluqq'),
        ),
        body: Column(
          children: <Widget>[
            MaterialButton(
              onPressed: login,
              child: Text('Login'),
              color: Colors.blueAccent,
            ),
            Text(json),
          ],
        ),
      ),
    );
  }

  void login() async {
    var login = await Fluqq.login();
    tencent = Tencent.fromJson(login.msg);
    var userInfo = await Fluqq.userInfo(tencent);
    setState(() {
      json = userInfo.msg;
    });
    var map = JsonDecoder().convert(userInfo.msg);
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter plugin.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on fluqq