2024-04-19 16:01:48 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:solian/models/channel.dart';
|
|
|
|
import 'package:solian/router.dart';
|
|
|
|
|
|
|
|
class ChannelAction extends StatelessWidget {
|
|
|
|
final Channel channel;
|
|
|
|
final Function onUpdate;
|
|
|
|
|
|
|
|
ChannelAction({super.key, required this.channel, required this.onUpdate});
|
|
|
|
|
|
|
|
final FocusNode _focusNode = FocusNode();
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2024-04-25 13:33:53 +00:00
|
|
|
return IconButton(
|
|
|
|
onPressed: () {
|
|
|
|
router.pushNamed(
|
|
|
|
'chat.channel.manage',
|
|
|
|
extra: channel,
|
|
|
|
pathParameters: {'channel': channel.alias},
|
|
|
|
);
|
|
|
|
},
|
|
|
|
focusNode: _focusNode,
|
|
|
|
style: TextButton.styleFrom(shape: const CircleBorder()),
|
|
|
|
icon: const Icon(Icons.more_horiz),
|
2024-04-19 16:01:48 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|