refactor: Migrate to flutter 2
This commit is contained in:
parent
d729dbe1b7
commit
b0ada828aa
39 changed files with 257 additions and 315 deletions
|
|
@ -231,25 +231,25 @@ class InputBar extends StatelessWidget {
|
|||
}
|
||||
insertText = (isUnique
|
||||
? insertEmote
|
||||
: ':${insertPack}~${insertEmote.substring(1)}') +
|
||||
: ':$insertPack~${insertEmote.substring(1)}') +
|
||||
' ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'(\s|^)(:(?:[-\w]+~)?[-\w]+)$'),
|
||||
(Match m) => '${m[1]}${insertText}',
|
||||
(Match m) => '${m[1]}$insertText',
|
||||
);
|
||||
}
|
||||
if (suggestion['type'] == 'user') {
|
||||
insertText = suggestion['mxid'] + ' ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'(\s|^)(@[-\w]+)$'),
|
||||
(Match m) => '${m[1]}${insertText}',
|
||||
(Match m) => '${m[1]}$insertText',
|
||||
);
|
||||
}
|
||||
if (suggestion['type'] == 'room') {
|
||||
insertText = suggestion['mxid'] + ' ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'(\s|^)(#[-\w]+)$'),
|
||||
(Match m) => '${m[1]}${insertText}',
|
||||
(Match m) => '${m[1]}$insertText',
|
||||
);
|
||||
}
|
||||
if (insertText.isNotEmpty && startText.isNotEmpty) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue