asan_login_flutter 2.0.0 copy "asan_login_flutter: ^2.0.0" to clipboard
asan_login_flutter: ^2.0.0 copied to clipboard

discontinued
PlatformAndroidiOS

ASAN Login implementation for Flutter (maintained by community)

example/lib/main.dart

import 'dart:developer';

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

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

class MyApp extends StatelessWidget {
  const MyApp({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'ASAN Login Example',
      home: AsanLoginDemoScreen(),
    );
  }
}

class AsanLoginDemoScreen extends StatelessWidget {
  const AsanLoginDemoScreen({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('ASAN Login Flutter'),
        backgroundColor: Colors.blueGrey.shade900,
      ),
      body: AsanLoginView(
        config: const AsanLoginConfig(
          mobileKeyAndroid: 'com.example.example',
          mobileKeyIos: 'com.example.example',
          environment: AsanLoginEnvironment.preProd,
          clearCookies: true,
        ),
        loadingWidgetBuilder: (double progress) {
          return Padding(
            padding: const EdgeInsets.symmetric(horizontal: 80.0),
            child: LinearProgressIndicator(
              value: progress / 100,
            ),
          );
        },
        onLogin: (String token) {
          log('logged in with token: $token');
        },
      ),
    );
  }
}
18
likes
130
pub points
44%
popularity

Publisher

verified publisherporelarte.tech

ASAN Login implementation for Flutter (maintained by community)

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, flutter_inappwebview

More

Packages that depend on asan_login_flutter