✨ Realm basis
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user