• UIKit
  • SDK
  • 서버 API
Chat/
UIKit/
Flutter/
맞춤화/
UIKit
  • 개요
  • Run Demo
  • 설치
    • 통합
    • Only Chat
  • 제품 특성
    • 국부 검색
    • 오프라인 푸시
    • 온라인 상태
    • 입력 상태
    • 메시지 읽음 확인
    • 메시지 반응
    • 글로벌화
    • 사용자 정의 메시지 추가
    • 이모티콘과 스티커
  • 맞춤화
    • UI 주제 변경
    • UI 스타일 설정
  • Changelog
  • Guideline for Beginners
  • 콘솔 안내
    • 애플리케이션 생성 및 업그레이드
    • 기본 구성
    • 기능 구성
    • 계정 관리
    • 그룹 관리
    • 콜백 구성
  • 제품 소개
    • 메시지 관리
      • 1대1 메시지
      • 메시지 저장
      • 오프라인 푸시
      • 그룹 메시지
      • 메시지 포맷
    • 계정 시스템
      • 로그인 인증
      • 온라인 상태 관리
    • 그룹 관련
      • 그룹 시스템
      • 그룹 관리
    • 사용자 정보 및 관계망
      • 정보 관리
      • 관계망 관리
  • 구매 가이드
    • 과금 개요
    • 가격
  • 에러코드
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

UI 스타일 설정

Description

Since version of v1.1.0, the capability of theme and customize colors has been improved to a large extent.
While TUIKit provides a default set of colors for those widgets that you can use directly, you can also customize those colors up to your needs.

Customize Colors

Phase 1: Define a color object of the theme

In this object, you can easily customize each color on the interface of the widgets TUIKit provided.
Instantiate a TUITheme() object, and specify each color you want to modify, apart from the default ones, directly to it.
This object contains the color configuration for those colors.
// Primary Color For The App
final Color? primaryColor;

// Secondary Color For The App
final Color? secondaryColor;

// Info Color, Used For Secondary Action Or Info
final Color? infoColor;

// Weak Background Color, Lighter Than Main Background, Used For Marginal Space Or Shadowy Space
final Color? weakBackgroundColor;

// Weak Background Color, Lighter Than Main Background, Used For Marginal Space Or Shadowy Space
final Color? wideBackgroundColor;

// Weak Divider Color, Used For Divider Or Border
final Color? weakDividerColor;

// Weak Text Color
final Color? weakTextColor;

// Dark Text Color
final Color? darkTextColor;

// Light Primary Color, Used For AppBar Or Several Panels
final Color? lightPrimaryColor;

// TextColor
final Color? textColor;

// Caution Color, Used For Warning Actions
final Color? cautionColor;

// Group Owner Identification Color
final Color? ownerColor;

// Group Admin Identification Color
final Color? adminColor;

// white
final Color? white;

// black
final Color? black;

// input fill color
final Color? inputFillColor;

// grey text color
final Color? textgrey;

/// The backgrounud color of Appbar
final Color? appbarBgColor;
/// The text color of Appbar
final Color? appbarTextColor;
/// The backgrounud color of multi-messages selection pan
final Color? selectPanelBgColor;
/// The text and icon color of multi-messages selection panel
final Color? selectPanelTextIconColor;

/// The background color of the conversation item.
final Color? conversationItemBgColor;

/// The border color of the conversation item.
final Color? conversationItemBorderColor;

/// The background color of the conversation item when activated.
final Color? conversationItemActiveBgColor;

/// The background color of the conversation item when pinned to top.
final Color? conversationItemPinedBgColor;

/// The font color of the conversation title.
final Color? conversationItemTitleTextColor;

/// The font color of the conversation last message.
final Color? conversationItemLastMessageTextColor;

/// The font color of the time on conversation item.
final Color? conversationItemTitmeTextColor;

/// The indicator color of an online status user.
final Color? conversationItemOnlineStatusBgColor;

/// The indicator color of an offline status user.
final Color? conversationItemOfflineStatusBgColor;

/// The background color of the conversation unread count.
final Color? conversationItemUnreadCountBgColor;

/// The font color of the conversation unread count.
final Color? conversationItemUnreadCountTextColor;

/// The font color of the draft text on conversation item.
final Color? conversationItemDraftTextColor;

/// The color of the icon, indicates that this conversation is not supposed to notify the user when new messages incomes.
final Color? conversationItemNoNotificationIconColor;

/// The font color of the slider bar of conversation item.
final Color? conversationItemSliderTextColor;

/// The background color of 'clear' button on the slider bar of conversation item.
final Color? conversationItemSliderClearBgColor;

/// The background color of 'pin to top' button on the slider bar of conversation item.
final Color? conversationItemSliderPinBgColor;

/// The background color of 'delete' button on the slider bar of conversation item.
final Color? conversationItemSliderDeleteBgColor;

/// The background color of the conversation item when chosen on desktop.
final Color? conversationItemChooseBgColor;

/// The background color of the chat page.
final Color? chatBgColor;

/// The background color of the time divider on chat page.
final Color? chatTimeDividerTextColor;

/// The background color of the top app bar on chat page.
final Color? chatHeaderBgColor;

/// The font color of title on top app bar on chat page.
final Color? chatHeaderTitleTextColor;

/// The font color of 'back' text on top app bar on chat page.
final Color? chatHeaderBackTextColor;

/// The font color of action on top app bar on chat page.
final Color? chatHeaderActionTextColor;

/// The font color of title on top app bar on chat page.
final Color? chatMessageItemTextColor;

/// The background color of the message from self.
final Color? chatMessageItemFromSelfBgColor;

/// The background color of the message from other users.
final Color? chatMessageItemFromOthersBgColor;

/// The font color of the read receipt indicator.
final Color? chatMessageItemUnreadStatusTextColor;

/// The background color of the dynamic tongue.
final Color? chatMessageTongueBgColor;

/// The font color of the dynamic tongue.
final Color? chatMessageTongueTextColor;

Phase 2: Enable configuration

Invoke the setTheme method from TUIKit, and specify it with the TUITheme() object from the previous phase.
This method can be invoked at any time to modify the color dynamically.
final CoreServicesImpl _coreInstance = TIMUIKitCore.getInstance();
_coreInstance.setTheme(theme: TUITheme());

Contact us

If there's anything unclear or you have more ideas, feel free to contact us!