mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
Minor design fixes
This commit is contained in:
parent
a56a455e6b
commit
b1ca7a6cc1
@ -48,7 +48,7 @@ class Avatar extends StatelessWidget {
|
||||
)
|
||||
: null,
|
||||
backgroundColor: noPic
|
||||
? name?.color ?? Theme.of(context).secondaryHeaderColor
|
||||
? name?.lightColor ?? Theme.of(context).secondaryHeaderColor
|
||||
: Theme.of(context).secondaryHeaderColor,
|
||||
child: noPic
|
||||
? Text(fallbackLetters, style: TextStyle(color: Colors.white))
|
||||
|
@ -2,6 +2,15 @@ import 'package:flutter/material.dart';
|
||||
|
||||
extension StringColor on String {
|
||||
Color get color {
|
||||
var number = 0.0;
|
||||
for (var i = 0; i < length; i++) {
|
||||
number += codeUnitAt(i);
|
||||
}
|
||||
number = (number % 10) * 25.5;
|
||||
return HSLColor.fromAHSL(1, number, 1, 0.35).toColor();
|
||||
}
|
||||
|
||||
Color get lightColor {
|
||||
var number = 0.0;
|
||||
for (var i = 0; i < length; i++) {
|
||||
number += codeUnitAt(i);
|
||||
|
@ -298,7 +298,8 @@ class _ChatListState extends State<ChatList> {
|
||||
title: selectMode == SelectMode.share
|
||||
? Text(L10n.of(context).share)
|
||||
: Padding(
|
||||
padding: EdgeInsets.all(8),
|
||||
padding:
|
||||
EdgeInsets.only(top: 8, bottom: 8, right: 8),
|
||||
child: TextField(
|
||||
autocorrect: false,
|
||||
controller: searchController,
|
||||
|
Loading…
Reference in New Issue
Block a user