Infer isLightTheme from provided context
This commit is contained in:
parent
6ed7de2804
commit
da491bdc50
3 changed files with 2 additions and 11 deletions
|
|
@ -114,13 +114,14 @@ class IRCMessage {
|
|||
required ChatAssetsStore assetsStore,
|
||||
required double badgeScale,
|
||||
required double emoteScale,
|
||||
required bool isLightTheme,
|
||||
required bool launchExternal,
|
||||
void Function()? onTapName,
|
||||
bool showMessage = true,
|
||||
bool useReadableColors = false,
|
||||
TimestampType timestamp = TimestampType.disabled,
|
||||
}) {
|
||||
final isLightTheme = Theme.of(context).brightness == Brightness.light;
|
||||
|
||||
final emoteToObject = assetsStore.emoteToObject;
|
||||
final twitchBadgeToObject = assetsStore.twitchBadgesToObject;
|
||||
final ffzUserToBadges = assetsStore.userToFFZBadges;
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@ class ChatBottomBar extends StatelessWidget {
|
|||
emoteScale: chatStore.settings.emoteScale,
|
||||
badgeScale: chatStore.settings.badgeScale,
|
||||
useReadableColors: chatStore.settings.useReadableColors,
|
||||
isLightTheme:
|
||||
Theme.of(context).brightness == Brightness.light,
|
||||
launchExternal: chatStore.settings.launchUrlExternal,
|
||||
timestamp: chatStore.settings.timestampType,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -69,8 +69,6 @@ class ChatMessage extends StatelessWidget {
|
|||
emoteScale: chatStore.settings.emoteScale,
|
||||
badgeScale: chatStore.settings.badgeScale,
|
||||
useReadableColors: chatStore.settings.useReadableColors,
|
||||
isLightTheme:
|
||||
Theme.of(context).brightness == Brightness.light,
|
||||
launchExternal: chatStore.settings.launchUrlExternal,
|
||||
timestamp: chatStore.settings.timestampType,
|
||||
),
|
||||
|
|
@ -129,8 +127,6 @@ class ChatMessage extends StatelessWidget {
|
|||
emoteScale: chatStore.settings.emoteScale,
|
||||
badgeScale: chatStore.settings.badgeScale,
|
||||
useReadableColors: chatStore.settings.useReadableColors,
|
||||
isLightTheme:
|
||||
Theme.of(context).brightness == Brightness.light,
|
||||
launchExternal: chatStore.settings.launchUrlExternal,
|
||||
timestamp: chatStore.settings.timestampType,
|
||||
),
|
||||
|
|
@ -240,8 +236,6 @@ class ChatMessage extends StatelessWidget {
|
|||
badgeScale: chatStore.settings.badgeScale,
|
||||
showMessage: chatStore.settings.showDeletedMessages,
|
||||
useReadableColors: chatStore.settings.useReadableColors,
|
||||
isLightTheme:
|
||||
Theme.of(context).brightness == Brightness.light,
|
||||
launchExternal: chatStore.settings.launchUrlExternal,
|
||||
timestamp: chatStore.settings.timestampType,
|
||||
),
|
||||
|
|
@ -300,8 +294,6 @@ class ChatMessage extends StatelessWidget {
|
|||
badgeScale: chatStore.settings.badgeScale,
|
||||
useReadableColors:
|
||||
chatStore.settings.useReadableColors,
|
||||
isLightTheme:
|
||||
Theme.of(context).brightness == Brightness.light,
|
||||
launchExternal: chatStore.settings.launchUrlExternal,
|
||||
timestamp: chatStore.settings.timestampType,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue