@@ -2,15 +2,16 @@ import 'package:flutter/material.dart';
22import 'package:flutter_it/flutter_it.dart' ;
33
44import '../../app/view/splash_page.dart' ;
5+ import '../../common/view/build_context_x.dart' ;
56import '../../l10n/l10n.dart' ;
67import '../encryption_manager.dart' ;
78import 'chat_global_handlers.dart' ;
89import 'encryption_setup_error_page.dart' ;
910import 'new_key_created_page.dart' ;
1011
11- class InitCryptoIdentifyProgressPage extends StatelessWidget
12+ class InitCryptoIdentityProgressPage extends StatelessWidget
1213 with WatchItMixin , ChatGlobalHandlerMixin {
13- const InitCryptoIdentifyProgressPage ({super .key});
14+ const InitCryptoIdentityProgressPage ({super .key});
1415
1516 @override
1617 Widget build (BuildContext context) {
@@ -20,21 +21,12 @@ class InitCryptoIdentifyProgressPage extends StatelessWidget
2021 select: (EncryptionManager m) => m.initCryptoIdentityCommand.results,
2122 handler: (context, results, cancel) {
2223 if (results.error != null ) {
23- Navigator .of (context).pushAndRemoveUntil (
24- MaterialPageRoute (
25- builder: (context) =>
26- EncryptionSetupErrorPage (error: results.error! ),
27- ),
28- (route) => false ,
24+ context.teleport (
25+ (context) => EncryptionSetupErrorPage (error: results.error! ),
2926 );
3027 } else if (results.data != null ) {
31- final newSsssKey = results.data! ;
32- Navigator .of (context).pushAndRemoveUntil (
33- MaterialPageRoute (
34- builder: (context) =>
35- NewKeyCreatedPage (encryptionKey: newSsssKey),
36- ),
37- (route) => false ,
28+ context.teleport (
29+ (context) => NewKeyCreatedPage (encryptionKey: results.data! ),
3830 );
3931 }
4032 },
0 commit comments