feat: commands ui

This commit is contained in:
Deven Joshi
2020-10-23 16:58:28 +05:30
parent 00828eb0e2
commit e58b051bfa
3 changed files with 17 additions and 5 deletions
+2
View File
@@ -1,6 +1,8 @@
include: package:pedantic/analysis_options.yaml
analyzer:
enable-experiment:
- extension-methods
exclude:
- lib/**/*.g.dart
- example/**
+14 -4
View File
@@ -417,7 +417,7 @@ class MessageInputState extends State<MessageInput> {
shrinkWrap: true,
children: [
Padding(
padding: const EdgeInsets.all(4.0),
padding: const EdgeInsets.only(left: 8.0, top: 8.0),
child: Row(
children: [
Padding(
@@ -433,11 +433,11 @@ class MessageInputState extends State<MessageInput> {
(c) => ListTile(
title: Text.rich(
TextSpan(
text: '${c.name}',
text: '${c.name.capitalize()}',
style: TextStyle(fontWeight: FontWeight.bold),
children: [
TextSpan(
text: ' ${c.args}',
text: ' /${c.name} ${c.args}',
style: TextStyle(
fontWeight: FontWeight.w300,
),
@@ -445,7 +445,11 @@ class MessageInputState extends State<MessageInput> {
],
),
),
subtitle: Text(c.description),
trailing: CircleAvatar(
backgroundColor: StreamChatTheme.of(context).accentColor,
child: Icon(StreamIcons.lightning, color: Colors.white,),
),
//subtitle: Text(c.description),
onTap: () {
_setCommand(c);
},
@@ -1139,3 +1143,9 @@ class _SendingAttachment {
this.uploaded = false,
});
}
extension StringExtension on String {
String capitalize() {
return "${this[0].toUpperCase()}${this.substring(1)}";
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
environment:
sdk: ">=2.3.0 <3.0.0"
sdk: ">=2.6.0 <3.0.0"
dependencies:
flutter: