2021-12-02 13:44:17 +03:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
|
|
|
|
import '../theme.dart';
|
2022-06-10 14:49:02 +03:00
|
|
|
import 'logging.dart';
|
|
|
|
import 'shortcuts.dart';
|
2022-04-05 12:28:51 +03:00
|
|
|
import 'state.dart';
|
2021-12-02 13:44:17 +03:00
|
|
|
|
|
|
|
class YubicoAuthenticatorApp extends ConsumerWidget {
|
|
|
|
final Widget page;
|
2022-05-12 10:56:55 +03:00
|
|
|
const YubicoAuthenticatorApp({required this.page, super.key});
|
2021-12-02 13:44:17 +03:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
2022-04-29 14:13:42 +03:00
|
|
|
return LogWarningOverlay(
|
2022-06-10 14:49:02 +03:00
|
|
|
child: Shortcuts(
|
|
|
|
shortcuts: globalShortcuts,
|
|
|
|
child: MaterialApp(
|
|
|
|
title: 'Yubico Authenticator',
|
|
|
|
theme: AppTheme.lightTheme,
|
|
|
|
darkTheme: AppTheme.darkTheme,
|
|
|
|
themeMode: ref.watch(themeModeProvider),
|
|
|
|
home: page,
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
),
|
2022-04-29 14:13:42 +03:00
|
|
|
),
|
2021-12-02 13:44:17 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|