mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
chore: Minor design improvements
This commit is contained in:
parent
3e6ce3403e
commit
8d0a0d43be
@ -81,10 +81,12 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
Theme.of(context).appBarTheme.backgroundColor,
|
Theme.of(context).appBarTheme.backgroundColor,
|
||||||
flexibleSpace: FlexibleSpaceBar(
|
flexibleSpace: FlexibleSpaceBar(
|
||||||
background: ContentBanner(
|
background: ContentBanner(
|
||||||
mxContent: room.avatar,
|
mxContent: room.avatar,
|
||||||
onEdit: room.canSendEvent('m.room.avatar')
|
onEdit: room.canSendEvent('m.room.avatar')
|
||||||
? controller.setAvatarAction
|
? controller.setAvatarAction
|
||||||
: null),
|
: null,
|
||||||
|
defaultIcon: Icons.group_outlined,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -163,7 +163,7 @@ class ChatListController extends State<ChatList> with TickerProviderStateMixin {
|
|||||||
|
|
||||||
Stream<Client> get clientStream => _clientStream.stream;
|
Stream<Client> get clientStream => _clientStream.stream;
|
||||||
|
|
||||||
void addAccountAction() => VRouter.of(context).to('/settings/account/add');
|
void addAccountAction() => VRouter.of(context).to('/settings/account');
|
||||||
|
|
||||||
void _onScroll() {
|
void _onScroll() {
|
||||||
final newScrolledToTop = scrollController.position.pixels <= 0;
|
final newScrolledToTop = scrollController.position.pixels <= 0;
|
||||||
|
@ -31,7 +31,7 @@ class SettingsView extends StatelessWidget {
|
|||||||
background: ContentBanner(
|
background: ContentBanner(
|
||||||
mxContent: controller.profile?.avatarUrl,
|
mxContent: controller.profile?.avatarUrl,
|
||||||
onEdit: controller.setAvatarAction,
|
onEdit: controller.setAvatarAction,
|
||||||
defaultIcon: Icons.person_outline_outlined,
|
defaultIcon: Icons.account_circle_outlined,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -119,7 +119,7 @@ class UserBottomSheetView extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: ContentBanner(
|
child: ContentBanner(
|
||||||
mxContent: user.avatarUrl,
|
mxContent: user.avatarUrl,
|
||||||
defaultIcon: Icons.person_outline,
|
defaultIcon: Icons.account_circle_outlined,
|
||||||
client: client,
|
client: client,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -19,7 +19,7 @@ class ContentBanner extends StatelessWidget {
|
|||||||
const ContentBanner(
|
const ContentBanner(
|
||||||
{this.mxContent,
|
{this.mxContent,
|
||||||
this.height = 400,
|
this.height = 400,
|
||||||
this.defaultIcon = Icons.people_outlined,
|
this.defaultIcon = Icons.account_circle_outlined,
|
||||||
this.loading = false,
|
this.loading = false,
|
||||||
this.onEdit,
|
this.onEdit,
|
||||||
this.client,
|
this.client,
|
||||||
@ -34,7 +34,7 @@ class ContentBanner extends StatelessWidget {
|
|||||||
height: height,
|
height: height,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).secondaryHeaderColor,
|
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
),
|
),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@ -66,10 +66,20 @@ class ContentBanner extends StatelessWidget {
|
|||||||
imageUrl: src.toString(),
|
imageUrl: src.toString(),
|
||||||
height: 300,
|
height: 300,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
errorWidget: (c, m, e) => Icon(defaultIcon, size: 200),
|
errorWidget: (c, m, e) => Icon(
|
||||||
|
defaultIcon,
|
||||||
|
size: 200,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onSecondaryContainer,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
: Icon(defaultIcon, size: 200),
|
: Icon(
|
||||||
|
defaultIcon,
|
||||||
|
size: 200,
|
||||||
|
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (onEdit != null)
|
if (onEdit != null)
|
||||||
|
@ -76,7 +76,7 @@ class ProfileBottomSheet extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
: ContentBanner(
|
: ContentBanner(
|
||||||
mxContent: profile.avatarUrl,
|
mxContent: profile.avatarUrl,
|
||||||
defaultIcon: Icons.person_outline,
|
defaultIcon: Icons.account_circle_outlined,
|
||||||
client: Matrix.of(context).client,
|
client: Matrix.of(context).client,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -114,7 +114,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
|||||||
ContentBanner(
|
ContentBanner(
|
||||||
mxContent: profile.avatarUrl,
|
mxContent: profile.avatarUrl,
|
||||||
height: 156,
|
height: 156,
|
||||||
defaultIcon: Icons.person_outline,
|
defaultIcon: Icons.group_outlined,
|
||||||
client: Matrix.of(context).client,
|
client: Matrix.of(context).client,
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
Loading…
Reference in New Issue
Block a user