modify condition

This commit is contained in:
Salvatore Giordano
2020-10-28 11:42:09 +01:00
parent bb46710f24
commit d5f23549f4
2 changed files with 20 additions and 9 deletions
+4 -1
View File
@@ -224,7 +224,10 @@ class MessageActionsModal extends StatelessWidget {
), ),
Text( Text(
'Edit message', 'Edit message',
style: Theme.of(context).textTheme.headline6.copyWith(fontWeight: FontWeight.bold), style: Theme.of(context)
.textTheme
.headline6
.copyWith(fontWeight: FontWeight.bold),
), ),
IconButton( IconButton(
icon: Icon( icon: Icon(
+13 -5
View File
@@ -222,7 +222,11 @@ class MessageInputState extends State<MessageInput> {
Widget _buildDmCheckbox() { Widget _buildDmCheckbox() {
return Row( return Row(
children: [ children: [
Checkbox(value: _sendAsDm, onChanged: (val) => setState(() {_sendAsDm = val;})), Checkbox(
value: _sendAsDm,
onChanged: (val) => setState(() {
_sendAsDm = val;
})),
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0), padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Text('Send also as direct message'), child: Text('Send also as direct message'),
@@ -316,7 +320,9 @@ class MessageInputState extends State<MessageInput> {
var matchedCommandsList = StreamChannel.of(context) var matchedCommandsList = StreamChannel.of(context)
.channel .channel
.config .config
.commands.where((element) => element.name == s.substring(1)).toList(); .commands
.where((element) => element.name == s.substring(1))
.toList();
if (matchedCommandsList.length == 1) { if (matchedCommandsList.length == 1) {
_chosenCommand = matchedCommandsList[0]; _chosenCommand = matchedCommandsList[0];
@@ -796,8 +802,8 @@ class MessageInputState extends State<MessageInput> {
return Center( return Center(
child: InkWell( child: InkWell(
child: Padding( child: Padding(
padding: EdgeInsets.only( padding:
left: 8.0, right: padding, top: 8.0, bottom: 8.0), EdgeInsets.only(left: 8.0, right: padding, top: 8.0, bottom: 8.0),
child: Icon(StreamIcons.attach), child: Icon(StreamIcons.attach),
), ),
onTap: () { onTap: () {
@@ -1053,7 +1059,9 @@ class MessageInputState extends State<MessageInput> {
child: Transform.rotate( child: Transform.rotate(
angle: widget.editMessage == null ? -pi / 2 : 0, angle: widget.editMessage == null ? -pi / 2 : 0,
child: Icon( child: Icon(
widget.editMessage == null ? StreamIcons.send_message : StreamIcons.check_send, widget.editMessage == null
? StreamIcons.send_message
: StreamIcons.check_send,
color: StreamChatTheme.of(context).accentColor, color: StreamChatTheme.of(context).accentColor,
), ),
), ),