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