Flutter UIKit AppStyleConfig
#
OverviewAppStyleConfig
is a centralized configuration class that defines styles for various UI components used throughout the app. It includes predefined styles for buttons, pages, dialogs, and other elements, which can be applied or overridden based on the app's design requirements.
#
Adding the AppStyleConfig Class to Your ProjectEnsure that the AppStyleConfig
class is included in your project and import it as needed:
#
CustomizationYou can also customize the default styles by calling the setAppStyle
method and passing in your own styles:
#
Setting the App StyleTo configure the app with a custom style, you can call the setAppStyle
method and pass an AppStyle
object.
AppStyle
contains various style properties that you can override with your custom styles or use the default styles provided by the app.
#
Customizing Individual StylesIf you want to change specific styles (e.g., the sender chat bubble's decoration), you can modify them individually without affecting other styles:
This example demonstrates how to apply a custom button style to the login page. If a style is not provided, the default style will be used.
#
Page Style ConfigurationsAppStyleConfig
also provides various page-specific styles, which can be configured globally in your project. Here are some examples:
Dashboard Page Style:
Chat Page Style:
These predefined page styles allow you to quickly apply consistent theming to various pages in your app.
#
Dialog ConfigurationsAppStyleConfig
also provides style for Dialogs, which can be configured globally in your project. Here are some examples:
These predefined Dialog styles allow you to quickly apply consistent theming to various dialogs in your app.
#
Accessing StylesOnce the styles are configured, you can access the styles globally throughout your application:
You can use this approach for all the predefined style properties.
#
Available StylesBelow are the styles available for customization:
profileViewStyle
: Style configuration for the profile view.dashBoardPageStyle
: Style configuration for the dashboard page.chatPageStyle
: Style configuration for the chat page.messageInfoPageStyle
: Style configuration for message info.chatInfoPageStyle
: Style configuration for chat info.viewAllMediaPageStyle
: Style configuration for viewing all media.groupChatInfoPageStyle
: Style configuration for group chat info.contactListPageStyle
: Style configuration for the contact list.archivedChatsPageStyle
: Style configuration for archived chats.createGroupPageStyle
: Style configuration for creating groups.galleryPageStyle
: Style configuration for the gallery page.localContactPageStyle
: Style configuration for local contacts.localContactPreviewPageStyle
: Style configuration for previewing local contacts.locationSentPageStyle
: Style configuration for location sharing.mediaSentPreviewPageStyle
: Style configuration for media preview.settingsPageStyle
: Style configuration for the settings page.blockedListPageStyle
: Style configuration for the blocked list.starredMessageListPageStyle
: Style configuration for starred messages.dialogStyle
: Style configuration for dialogs.outgoingCallPageStyle
: Style configuration for outgoing calls.callAgainPageStyle
: Style configuration for call again.ongoingCallPageStyle
: Style configuration for ongoing calls.callInfoPageStyle
: Style configuration for call info.addParticipantsPageStyle
: Style configuration for adding participants.joinCallPreviewPageStyle
: Style configuration for joining calls.
#
List of Setter Methods:setProfileViewStyle(ProfileViewStyle profileViewStyle)
setDashboardStyle(DashBoardPageStyle dashBoardPageStyle)
setChatPageStyle(ChatPageStyle chatPageStyle)
setMessageInfoPageStyle(MessageInfoPageStyle messageInfoPageStyle)
setChatInfoPageStyle(ChatInfoPageStyle chatInfoPageStyle)
setViewAllMediaPageStyle(ViewAllMediaPageStyle viewAllMediaPageStyle)
setGroupChatInfoPageStyle(GroupChatInfoPageStyle groupChatInfoPageStyle)
setContactListPageStyle(ContactListPageStyle contactListPageStyle)
setArchivedChatsPageStyle(ArchivedChatsPageStyle archivedChatsPageStyle)
setCreateGroupPageStyle(CreateGroupPageStyle createGroupPageStyle)
setGalleryPageStyle(GalleryPageStyle galleryPageStyle)
setLocalContactPageStyle(LocalContactPageStyle localContactPageStyle)
setLocalContactPreviewPageStyle(LocalContactPreviewPageStyle localContactPreviewPageStyle)
setLocationSentPageStyle(LocationSentPageStyle locationSentPageStyle)
setMediaSentPreviewPageStyle(MediaSentPreviewPageStyle mediaSentPreviewPageStyle)
setSettingsPageStyle(SettingsPageStyle settingsPageStyle)
setBlockedListPageStyle(BlockedListPageStyle blockedListPageStyle)
setStarredMessageListPageStyle(StarredMessageListPageStyle starredMessageListPageStyle)
setDialogStyle(DialogStyle dialogStyle)
setOutgoingCallPageStyle(OutgoingCallPageStyle outgoingCallPageStyle)
setCallAgainPageStyle(CallAgainPageStyle callAgainPageStyle)
setOngoingCallPageStyle(OngoingCallPageStyle ongoingCallPageStyle)
setCallInfoPageStyle(CallInfoPageStyle callInfoPageStyle)
setAddParticipantsPageStyle(AddParticipantsPageStyle addParticipantsPageStyle)
setJoinCallPreviewPageStyle(JoinCallPreviewPageStyle joinCallPreviewPageStyle)
This documentation provides a quick reference for integrating and customizing styles using AppStyleConfig
in your project.