monorepo/dialer/lib/main.dart
stcb ecf4ea16d8
All checks were successful
/ mirror (push) Successful in 3s
KeyGeneration2 (#34)
Real P-256 key generation and handling in the Keystore

Reviewed-on: #34
2025-02-13 19:58:52 +00:00

44 lines
1.2 KiB
Dart

import 'package:dialer/features/home/home_page.dart';
import 'package:flutter/material.dart';
import 'package:dialer/features/contacts/contact_state.dart';
import 'globals.dart' as globals;
import 'package:dialer/services/cryptography/asymmetric_crypto_service.dart';
import 'package:provider/provider.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
const stealthFlag = String.fromEnvironment('STEALTH', defaultValue: 'false');
globals.isStealthMode = stealthFlag.toLowerCase() == 'true';
final AsymmetricCryptoService cryptoService = AsymmetricCryptoService();
await cryptoService.initializeDefaultKeyPair();
runApp(
MultiProvider(
providers: [
Provider<AsymmetricCryptoService>(
create: (_) => cryptoService,
),
// Add other providers here
],
child: Dialer(),
),
);
}
class Dialer extends StatelessWidget {
const Dialer({super.key});
@override
Widget build(BuildContext context) {
return ContactState(
child: MaterialApp(
theme: ThemeData(
brightness: Brightness.dark
),
home: SafeArea(child: MyHomePage()),
)
);
}
}