Add zero-padding to session user-count

This commit is contained in:
Nutcake 2023-05-29 20:22:06 +02:00
parent a3ecbfe281
commit a7f39c1d06
2 changed files with 2 additions and 2 deletions

View file

@ -50,7 +50,7 @@ class MessageSessionInvite extends StatelessWidget {
foregroundColor: foregroundColor,
),
const SizedBox(height: 4,),
Text("${sessionInfo.sessionUsers.length}/${sessionInfo.maxUsers}", style: Theme
Text("${sessionInfo.sessionUsers.length.toString().padLeft(2, "0")}/${sessionInfo.maxUsers.toString().padLeft(2, "0")}", style: Theme
.of(context)
.textTheme
.bodyMedium

View file

@ -133,7 +133,7 @@ class SessionTile extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
FormattedText(session.formattedName),
Text("${session.sessionUsers.length}/${session.maxUsers} active users")
Text("${session.sessionUsers.length.toString().padLeft(2, "0")}/${session.maxUsers.toString().padLeft(2, "0")} active users")
],
),
)