feat: Switch to VRouter
This commit is contained in:
parent
ab4ea74d00
commit
c2fce64494
57 changed files with 678 additions and 617 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import 'package:adaptive_page_layout/adaptive_page_layout.dart';
|
||||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/pages/views/homeserver_picker_view.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
|
|
@ -7,6 +6,7 @@ import 'package:fluffychat/config/setting_keys.dart';
|
|||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../utils/localized_exception_extension.dart';
|
||||
import 'package:vrouter/vrouter.dart';
|
||||
|
||||
class HomeserverPicker extends StatefulWidget {
|
||||
@override
|
||||
|
|
@ -51,10 +51,11 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||
AppConfig.jitsiInstance = jitsi;
|
||||
}
|
||||
|
||||
await AdaptivePageLayout.of(context)
|
||||
.pushNamed(AppConfig.enableRegistration ? '/signup' : '/login');
|
||||
VRouter.of(context).push(
|
||||
AppConfig.enableRegistration ? '/signup' : '/login',
|
||||
historyState: {'/home': '/signup'});
|
||||
} catch (e) {
|
||||
AdaptivePageLayout.of(context).showSnackBar(
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text((e as Object).toLocalizedString(context))));
|
||||
} finally {
|
||||
if (mounted) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue