mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Add counter on comment form
This commit is contained in:
@ -153,3 +153,13 @@ Future<bool> showConfirmDialog({
|
||||
|
||||
return result != null && result;
|
||||
}
|
||||
|
||||
/// Smart [InputCounterWidgetBuilder] that show text limit only when some
|
||||
/// text has already been entered by the user
|
||||
Widget smartInputCounterWidgetBuilder(
|
||||
BuildContext context, {
|
||||
@required int currentLength,
|
||||
@required int maxLength,
|
||||
@required bool isFocused,
|
||||
}) =>
|
||||
currentLength > 0 ? Text("$currentLength/$maxLength") : Container();
|
||||
|
Reference in New Issue
Block a user