feat: New chat background colors and chatlist design
This commit is contained in:
parent
ee505bbde1
commit
caaa7bd2dc
8 changed files with 92 additions and 48 deletions
|
|
@ -31,6 +31,7 @@ class ChatListView extends StatelessWidget {
|
|||
},
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: controller.scrolledToTop ? 0 : null,
|
||||
actionsIconTheme: IconThemeData(
|
||||
color: controller.selectedRoomIds.isEmpty
|
||||
? null
|
||||
|
|
@ -200,12 +201,20 @@ class ChatListView extends StatelessWidget {
|
|||
Expanded(child: _ChatListViewBody(controller)),
|
||||
]),
|
||||
floatingActionButton: selectMode == SelectMode.normal
|
||||
? FloatingActionButton(
|
||||
heroTag: 'main_fab',
|
||||
onPressed: () =>
|
||||
VRouter.of(context).to('/newprivatechat'),
|
||||
child: Icon(CupertinoIcons.chat_bubble),
|
||||
)
|
||||
? controller.scrolledToTop
|
||||
? FloatingActionButton.extended(
|
||||
heroTag: 'main_fab',
|
||||
onPressed: () =>
|
||||
VRouter.of(context).to('/newprivatechat'),
|
||||
icon: Icon(CupertinoIcons.chat_bubble),
|
||||
label: Text(L10n.of(context).newChat),
|
||||
)
|
||||
: FloatingActionButton(
|
||||
heroTag: 'main_fab',
|
||||
onPressed: () =>
|
||||
VRouter.of(context).to('/newprivatechat'),
|
||||
child: Icon(CupertinoIcons.chat_bubble),
|
||||
)
|
||||
: null,
|
||||
drawer: controller.spaces.isEmpty
|
||||
? null
|
||||
|
|
@ -307,6 +316,7 @@ class _ChatListViewBody extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
return ListView.builder(
|
||||
controller: controller.scrollController,
|
||||
itemCount: rooms.length,
|
||||
itemBuilder: (BuildContext context, int i) {
|
||||
return ChatListItem(
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'dart:ui';
|
|||
|
||||
import 'package:emoji_picker_flutter/emoji_picker_flutter.dart';
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/widgets/background_gradient_box.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:fluffychat/pages/chat.dart';
|
||||
import 'package:fluffychat/widgets/avatar.dart';
|
||||
|
|
@ -204,6 +205,7 @@ class ChatView extends StatelessWidget {
|
|||
: null,
|
||||
body: Stack(
|
||||
children: <Widget>[
|
||||
BackgroundGradientBox(),
|
||||
if (Matrix.of(context).wallpaper != null)
|
||||
Image.file(
|
||||
Matrix.of(context).wallpaper,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:fluffychat/widgets/background_gradient_box.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class EmptyPage extends StatelessWidget {
|
||||
|
|
@ -10,26 +11,31 @@ class EmptyPage extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final _width = min(MediaQuery.of(context).size.width, EmptyPage._width);
|
||||
return Scaffold(
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
body: Stack(
|
||||
children: [
|
||||
Center(
|
||||
child: Hero(
|
||||
tag: 'info-logo',
|
||||
child: Image.asset(
|
||||
'assets/info-logo.png',
|
||||
width: _width,
|
||||
height: _width,
|
||||
BackgroundGradientBox(),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: Hero(
|
||||
tag: 'info-logo',
|
||||
child: Image.asset(
|
||||
'assets/info-logo.png',
|
||||
width: _width,
|
||||
height: _width,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (loading)
|
||||
Center(
|
||||
child: SizedBox(
|
||||
width: _width,
|
||||
child: LinearProgressIndicator(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (loading)
|
||||
Center(
|
||||
child: SizedBox(
|
||||
width: _width,
|
||||
child: LinearProgressIndicator(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue