at_onboarding_flutter 1.0.0+3 copy "at_onboarding_flutter: ^1.0.0+3" to clipboard
at_onboarding_flutter: ^1.0.0+3 copied to clipboard

outdated

A flutter plugin project for onboarding any @sign in @protocol apps with ease. Provides QRscanner and upload key file option to authenticate.

example/lib/main.dart

import 'package:at_onboarding_flutter_example/dashboard.dart';
import 'package:at_onboarding_flutter_example/services/at_service.dart';
import 'package:at_onboarding_flutter_example/utils/app_constants.dart';
import 'package:at_onboarding_flutter_example/utils/app_strings.dart';
import 'package:flutter/material.dart';

import 'package:at_onboarding_flutter/at_onboarding_flutter.dart';
import 'package:at_utils/at_logger.dart';

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

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

class _MyAppState extends State<MyApp> {
  var atClientPrefernce;
  var _logger = AtSignLogger('Plugin example app');
  @override
  void initState() {
    AtService.getInstance()
        .getAtClientPreference()
        .then((value) => atClientPrefernce = value);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Builder(
          builder: (context) => Center(
            child: RaisedButton(
                onPressed: () async {
                  Onboarding(
                    context: context,
                    atClientPreference: atClientPrefernce,
                    domain: AppConstants.rootDomain,
                    appColor: Color.fromARGB(255, 240, 94, 62),
                    onboard: (value, atsign) {
                      AtService.getInstance().atClientServiceMap = value;
                      _logger.finer('Successfully onboarded $atsign');
                    },
                    onError: (error) {
                      _logger.severe('Onboarding throws $error error');
                    },
                    nextScreen: DashBoard(),
                  );
                },
                child: Text(AppStrings.scan_qr)),
          ),
        ),
      ),
    );
  }
}
16
likes
0
pub points
69%
popularity

Publisher

verified publisheratsign.org

A flutter plugin project for onboarding any @sign in @protocol apps with ease. Provides QRscanner and upload key file option to authenticate.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

archive, at_backupkey_flutter, at_client, at_client_mobile, at_commons, at_server_status, at_utils, file_picker, flutter, flutter_qr_reader, path_provider, permission_handler, url_launcher, webview_flutter

More

Packages that depend on at_onboarding_flutter