Realm basis

This commit is contained in:
2024-05-05 23:01:08 +08:00
parent cf0d473a40
commit 384d861d56
26 changed files with 851 additions and 147 deletions

View File

@@ -4,8 +4,9 @@ import 'package:solian/router.dart';
class ChatNewAction extends StatelessWidget {
final Function onUpdate;
final String? realm;
const ChatNewAction({super.key, required this.onUpdate});
const ChatNewAction({super.key, required this.onUpdate, this.realm});
@override
Widget build(BuildContext context) {
@@ -29,7 +30,10 @@ class ChatNewAction extends StatelessWidget {
leading: const Icon(Icons.add),
title: Text(AppLocalizations.of(context)!.chatNewCreate),
onTap: () {
SolianRouter.router.pushNamed('chat.channel.editor').then((did) {
SolianRouter.router.pushNamed(
'chat.channel.editor',
queryParameters: {'realm': realm},
).then((did) {
if (did == true) {
onUpdate();
if (Navigator.canPop(context)) {