Skip to content

Commit 41827d6

Browse files
committed
🔧 Reduce username length while creation
1 parent b890649 commit 41827d6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/helper/utility.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,11 @@ List<String> getHashTags(String text) {
166166
return resultMatches;
167167
}
168168

169-
String getUserName({String name, String id}) {
169+
String getUserName({ String id,String name,}) {
170170
String userName = '';
171+
if(name.length > 15){
172+
name = name.substring(0,6);
173+
}
171174
name = name.split(' ')[0];
172175
id = id.substring(0, 4).toLowerCase();
173176
userName = '@$name$id';

0 commit comments

Comments
 (0)