diff --git a/lib/about_page.dart b/lib/about_page.dart index cf793d2d..b704d064 100755 --- a/lib/about_page.dart +++ b/lib/about_page.dart @@ -3,7 +3,8 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:logging/logging.dart'; -import 'package:yubico_authenticator/core/state.dart'; + +import 'core/state.dart'; final log = Logger('about'); @@ -49,6 +50,21 @@ class AboutPage extends ConsumerWidget { ), ], ), + TextButton( + onPressed: () async { + log.info('Running diagnostics...'); + final response = + await ref.read(rpcProvider).command('diagnose', []); + log.info('Response', response['diagnostics']); + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text('Diagnostics done. See log for results...'), + duration: Duration(seconds: 2), + ), + ); + }, + child: const Text('Run diagnostics...'), + ), ], ), ),