-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TW-893: Remove pill on mentionned users
- Loading branch information
Julian KOUNE
committed
Nov 13, 2023
1 parent
2bf572e
commit 45c91df
Showing
6 changed files
with
102 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class InputBarStyle { | ||
static const double suggestionAvatarSize = 30; | ||
|
||
static const double suggestionAvatarFontSize = 15; | ||
|
||
static const double suggestionSize = 50; | ||
|
||
static const double suggestionBorderRadius = 12.0; | ||
|
||
static const double suggestionListPadding = 8.0; | ||
|
||
static TextStyle getTypeAheadTextStyle(BuildContext context) => TextStyle( | ||
fontSize: 15, | ||
color: Theme.of(context).brightness == Brightness.light | ||
? Colors.black | ||
: Colors.white, | ||
); | ||
|
||
static const double suggestionTileAvatarTextGap = 8.0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import 'package:fluffychat/utils/string_extension.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_matrix_html/text_parser.dart'; | ||
|
||
class MentionnedUser extends StatelessWidget { | ||
final String displayName; | ||
final String url; | ||
final OnPillTap? onTap; | ||
final TextStyle? textStyle; | ||
|
||
const MentionnedUser({ | ||
Key? key, | ||
required this.displayName, | ||
required this.url, | ||
this.textStyle, | ||
this.onTap, | ||
}) : super(key: key); | ||
|
||
final int _maxCharactersDisplayNameForPill = 12; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return GestureDetector( | ||
onTap: () { | ||
onTap?.call(url); | ||
}, | ||
child: Text( | ||
displayName.shortenDisplayName( | ||
maxCharacters: _maxCharactersDisplayNameForPill, | ||
), | ||
style: textStyle, | ||
maxLines: 1, | ||
overflow: TextOverflow.clip, | ||
), | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.