atsign_authentication_helper 1.0.0 copy "atsign_authentication_helper: ^1.0.0" to clipboard
atsign_authentication_helper: ^1.0.0 copied to clipboard

discontinuedreplaced by: at_onboarding_flutter

A flutter plugin project to provide authentication for atsign apps. It provides both QR scanner and feature to upload file.

example/lib/main.dart

import 'package:atsign_authentication_helper_example/client_sdk_service.dart';
import 'package:flutter/material.dart';
import 'package:atsign_authentication_helper/atsign_authentication_helper.dart';
import 'package:atsign_authentication_helper_example/second_screen.dart';

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

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

class _MyAppState extends State<MyApp> {
  ClientSdkService clientSdkService = ClientSdkService.getInstance();
  @override
  void initState() {
    clientSdkService.onboard();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.dark(),
      home: Scaffold(
          appBar: AppBar(
            title: const Text('Plugin example app'),
          ),
          body: Builder(
            builder: (context) => Column(
              children: [
                Container(
                    padding: EdgeInsets.all(10.0),
                    child: Center(
                      child: Text(
                          'A client service should create an atClient instance and call onboard method before navigating to QR scanner screen',
                          textAlign: TextAlign.center),
                    )),
                Center(
                    child: FlatButton(
                        color: Colors.black12,
                        onPressed: () async {
                          await Navigator.pushReplacement(
                              context,
                              MaterialPageRoute(
                                  builder: (context) => ScanQrScreen(
                                      atClientServiceInstance: clientSdkService
                                          .atClientServiceInstance,
                                      atClientPreference:
                                          clientSdkService.atClientPreference,
                                      nextScreen: SecondScreen())));
                        },
                        child: Text('Show QR scanner screen'))),
              ],
            ),
          )),
    );
  }
}
1
likes
30
pub points
0%
popularity

Publisher

verified publisheratsign.org

A flutter plugin project to provide authentication for atsign apps. It provides both QR scanner and feature to upload file.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

archive, at_client, at_client_mobile, at_commons, at_utils, file_picker, flutter, flutter_qr_reader, path_provider, pedantic, permission_handler, qr_flutter, share, webview_flutter

More

Packages that depend on atsign_authentication_helper