1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-26 12:58:51 +00:00

Adapt conversations color for #Forez

This commit is contained in:
Pierre HUBERT 2021-04-25 16:35:50 +02:00
parent 616755aa38
commit ecd11fbf29
3 changed files with 9 additions and 2 deletions

View File

@ -35,6 +35,7 @@ void main() {
appName: "#Forez",
appQuickDescription: tr("Events organisation in Forez plain"),
unreadConversationColor: Colors.green.shade900,
defaultConversationColor: Colors.green.shade900,
toursEntriesBuilder: buildTour,
additionalLoading: () => ForezGroupHelper.refreshInfo(),
mainRouteBuilder: (c, k) => ForezRoute(key: k),

View File

@ -24,6 +24,7 @@ class Config {
final String appName;
final String appQuickDescription;
final Color unreadConversationColor;
final Color defaultConversationColor;
// Entries for the welcome tour
final TourEntriesBuilder toursEntriesBuilder;
@ -44,6 +45,7 @@ class Config {
this.primaryColorDark,
this.appName = "Comunic",
this.appQuickDescription,
this.defaultConversationColor,
this.unreadConversationColor,
this.toursEntriesBuilder,
this.additionalLoading,

View File

@ -7,6 +7,7 @@ import 'package:comunic/helpers/users_helper.dart';
import 'package:comunic/lists/conversation_messages_list.dart';
import 'package:comunic/lists/users_list.dart';
import 'package:comunic/models/api_request.dart';
import 'package:comunic/models/config.dart';
import 'package:comunic/models/conversation.dart';
import 'package:comunic/models/conversation_message.dart';
import 'package:comunic/models/new_conversation_message.dart';
@ -92,6 +93,7 @@ class _ConversationScreenState extends SafeState<ConversationScreen> {
// Colors definition
Color get _senderColor =>
_conversation.color ??
config().defaultConversationColor ??
/*(darkTheme() ? Color(0xff2b343b) :*/ Colors.blue.shade700; //);
Color get _receiverColor =>
@ -100,11 +102,13 @@ class _ConversationScreenState extends SafeState<ConversationScreen> {
Color get _greyColor => Color(0xff8f8f8f);
Color get _gradientColorStart =>
_conversation.color ??
(_conversation.color ?? config().defaultConversationColor)
?.withOpacity(0.7) ??
(darkTheme() ? Color(0xff00b6f3) : Colors.blue.shade300);
Color get _gradientColorEnd =>
_conversation.color?.withOpacity(0.7) ??
_conversation.color ??
config().defaultConversationColor ??
(darkTheme() ? Color(0xff0184dc) : Colors.blueAccent.shade700);
Color get _separatorColor =>