design: Slightly adjust chat design
This commit is contained in:
parent
2e14e63172
commit
c4bc626b09
5 changed files with 81 additions and 83 deletions
|
|
@ -90,9 +90,6 @@ abstract class FluffyThemes {
|
||||||
filled: true,
|
filled: true,
|
||||||
),
|
),
|
||||||
appBarTheme: AppBarTheme(
|
appBarTheme: AppBarTheme(
|
||||||
surfaceTintColor:
|
|
||||||
brightness == Brightness.light ? Colors.white : Colors.black,
|
|
||||||
shadowColor: Colors.black.withAlpha(64),
|
|
||||||
systemOverlayStyle: SystemUiOverlayStyle(
|
systemOverlayStyle: SystemUiOverlayStyle(
|
||||||
statusBarColor: Colors.transparent,
|
statusBarColor: Colors.transparent,
|
||||||
statusBarIconBrightness: brightness.reversed,
|
statusBarIconBrightness: brightness.reversed,
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,6 @@ class ChatView extends StatelessWidget {
|
||||||
builder: (BuildContext context, snapshot) {
|
builder: (BuildContext context, snapshot) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
elevation: 3,
|
|
||||||
actionsIconTheme: IconThemeData(
|
actionsIconTheme: IconThemeData(
|
||||||
color: controller.selectedEvents.isEmpty
|
color: controller.selectedEvents.isEmpty
|
||||||
? null
|
? null
|
||||||
|
|
@ -215,15 +214,6 @@ class ChatView extends StatelessWidget {
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
filterQuality: FilterQuality.medium,
|
filterQuality: FilterQuality.medium,
|
||||||
)
|
|
||||||
else
|
|
||||||
Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
gradient: FluffyThemes.backgroundGradient(
|
|
||||||
context,
|
|
||||||
64,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
SafeArea(
|
SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ class Message extends StatelessWidget {
|
||||||
nextEvent!.senderId == event.senderId &&
|
nextEvent!.senderId == event.senderId &&
|
||||||
!displayTime;
|
!displayTime;
|
||||||
final textColor = ownMessage
|
final textColor = ownMessage
|
||||||
? Theme.of(context).colorScheme.onPrimary
|
? Theme.of(context).colorScheme.onPrimaryContainer
|
||||||
: Theme.of(context).colorScheme.onBackground;
|
: Theme.of(context).colorScheme.onBackground;
|
||||||
final rowMainAxisAlignment =
|
final rowMainAxisAlignment =
|
||||||
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
||||||
|
|
@ -116,7 +116,7 @@ class Message extends StatelessWidget {
|
||||||
if (ownMessage) {
|
if (ownMessage) {
|
||||||
color = displayEvent.status.isError
|
color = displayEvent.status.isError
|
||||||
? Colors.redAccent
|
? Colors.redAccent
|
||||||
: Theme.of(context).colorScheme.primary;
|
: Theme.of(context).colorScheme.primaryContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
final rowChildren = <Widget>[
|
final rowChildren = <Widget>[
|
||||||
|
|
@ -187,9 +187,15 @@ class Message extends StatelessWidget {
|
||||||
padding: const EdgeInsets.only(left: 8),
|
padding: const EdgeInsets.only(left: 8),
|
||||||
child: Material(
|
child: Material(
|
||||||
color: noBubble ? Colors.transparent : color,
|
color: noBubble ? Colors.transparent : color,
|
||||||
elevation: event.type == EventTypes.Sticker ? 0 : 4,
|
shape: RoundedRectangleBorder(
|
||||||
shadowColor: Colors.black.withAlpha(64),
|
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
|
side: noBubble
|
||||||
|
? BorderSide.none
|
||||||
|
: BorderSide(
|
||||||
|
color: Theme.of(context).dividerTheme.color ??
|
||||||
|
Theme.of(context).dividerColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onHover: (b) => useMouse = true,
|
onHover: (b) => useMouse = true,
|
||||||
|
|
@ -205,7 +211,10 @@ class Message extends StatelessWidget {
|
||||||
),
|
),
|
||||||
padding: noBubble || noPadding
|
padding: noBubble || noPadding
|
||||||
? EdgeInsets.zero
|
? EdgeInsets.zero
|
||||||
: EdgeInsets.all(16 * AppConfig.bubbleSizeFactor),
|
: EdgeInsets.symmetric(
|
||||||
|
horizontal: 16 * AppConfig.bubbleSizeFactor,
|
||||||
|
vertical: 8 * AppConfig.bubbleSizeFactor,
|
||||||
|
),
|
||||||
constraints: const BoxConstraints(
|
constraints: const BoxConstraints(
|
||||||
maxWidth: FluffyThemes.columnWidth * 1.5,
|
maxWidth: FluffyThemes.columnWidth * 1.5,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -43,9 +43,7 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
||||||
controller.selectedRoomIds.length.toString(),
|
controller.selectedRoomIds.length.toString(),
|
||||||
key: const ValueKey(SelectMode.select),
|
key: const ValueKey(SelectMode.select),
|
||||||
)
|
)
|
||||||
: SizedBox(
|
: TextField(
|
||||||
height: 44,
|
|
||||||
child: TextField(
|
|
||||||
controller: controller.searchController,
|
controller: controller.searchController,
|
||||||
textInputAction: TextInputAction.search,
|
textInputAction: TextInputAction.search,
|
||||||
onChanged: controller.onSearchEnter,
|
onChanged: controller.onSearchEnter,
|
||||||
|
|
@ -102,7 +100,6 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
actions: selectMode == SelectMode.share
|
actions: selectMode == SelectMode.share
|
||||||
? [
|
? [
|
||||||
Padding(
|
Padding(
|
||||||
|
|
|
||||||
|
|
@ -146,17 +146,22 @@ class SettingsStyleView extends StatelessWidget {
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primaryContainer,
|
||||||
elevation: 6,
|
shape: RoundedRectangleBorder(
|
||||||
shadowColor:
|
|
||||||
Theme.of(context).secondaryHeaderColor.withAlpha(100),
|
|
||||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||||
|
side: BorderSide(
|
||||||
|
color: Theme.of(context).dividerColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(16 * AppConfig.bubbleSizeFactor),
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 16 * AppConfig.bubbleSizeFactor,
|
||||||
|
vertical: 8 * AppConfig.bubbleSizeFactor,
|
||||||
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor',
|
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).colorScheme.onPrimary,
|
color: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||||
fontSize:
|
fontSize:
|
||||||
AppConfig.messageFontSize * AppConfig.fontSizeFactor,
|
AppConfig.messageFontSize * AppConfig.fontSizeFactor,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue