coolbus 0.0.1
coolbus: ^0.0.1 copied to clipboard

CoolBus Plugin

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

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

class _MyAppState extends State<MyApp> {
  String result = 'Unknown';

  @override
  void initState() {
    CoolBusAuth0.login().then((value) {
      print("Login Success $value");
      setState(() {
        result = value.toString();
      });
    }).catchError((onError) {
      print("Login error $onError");
      setState(() {
        result = onError.toString();
      });
    });
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Result: $result\n'),
        ),
      ),
    );
  }
}
0
likes
70
pub points
0%
popularity

CoolBus Plugin

Homepage

Documentation

API reference

License

LICENSE

Dependencies

flutter

More

Packages that depend on coolbus