clean up settings: move keep-awake to chat, improve labels and section headers

- move keepScreenAwake from video to chat settings (store + UI)
- mute section headers (lighter weight, smaller, reduced opacity)
- add breathing room between app bar and first setting
- improve labels across general, video, and chat settings
- reorder store fields to logical grouping with organized reset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Tommy Chow 2026-03-08 23:13:44 -07:00
parent 8b8b190316
commit 9c1be7e121
7 changed files with 737 additions and 741 deletions

View file

@ -1,347 +1,369 @@
import 'dart:io';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:frosty/constants.dart';
import 'package:frosty/screens/settings/stores/settings_store.dart';
import 'package:frosty/screens/settings/widgets/settings_list_select.dart';
import 'package:frosty/screens/settings/widgets/settings_list_slider.dart';
import 'package:frosty/screens/settings/widgets/settings_list_switch.dart';
import 'package:frosty/screens/settings/widgets/settings_muted_words.dart';
import 'package:frosty/utils/context_extensions.dart';
import 'package:frosty/widgets/frosty_cached_network_image.dart';
import 'package:frosty/widgets/section_header.dart';
import 'package:frosty/widgets/settings_page_layout.dart';
import 'package:url_launcher/url_launcher.dart';
class ChatSettings extends StatefulWidget {
final SettingsStore settingsStore;
const ChatSettings({super.key, required this.settingsStore});
@override
State<ChatSettings> createState() => _ChatSettingsState();
}
class _ChatSettingsState extends State<ChatSettings> {
var showPreview = false;
@override
Widget build(BuildContext context) {
final settingsStore = widget.settingsStore;
return Observer(
builder: (context) => SettingsPageLayout(
children: [
const SectionHeader('Message sizing', isFirst: true),
ExpansionTile(
title: const Text('Preview'),
children: [
Container(
width: double.infinity,
padding: const EdgeInsets.all(16),
child: DefaultTextStyle(
style: DefaultTextStyle.of(
context,
).style.copyWith(fontSize: settingsStore.fontSize),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: FrostyCachedNetworkImage(
imageUrl:
'https://static-cdn.jtvnw.net/badges/v1/bbbe0db0-a598-423e-86d0-f9fb98ca1933/3',
height:
defaultBadgeSize * settingsStore.badgeScale,
width:
defaultBadgeSize * settingsStore.badgeScale,
),
),
const TextSpan(text: ' Badge and emote preview. '),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: FrostyCachedNetworkImage(
imageUrl:
'https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/3.0',
height:
defaultEmoteSize * settingsStore.emoteScale,
width:
defaultEmoteSize * settingsStore.emoteScale,
),
),
],
),
textScaler: settingsStore.messageScale.textScaler,
),
SizedBox(height: settingsStore.messageSpacing),
Text(
'Hello! Here\'s a text preview.',
textScaler: settingsStore.messageScale.textScaler,
),
SizedBox(height: settingsStore.messageSpacing),
Text(
'And another for spacing without an emote!',
textScaler: settingsStore.messageScale.textScaler,
),
],
),
),
),
],
),
SettingsListSlider(
title: 'Badge scale',
trailing: '${settingsStore.badgeScale.toStringAsFixed(2)}x',
value: settingsStore.badgeScale,
min: 0.25,
max: 3.0,
divisions: 11,
onChanged: (newValue) => settingsStore.badgeScale = newValue,
),
SettingsListSlider(
title: 'Emote scale',
trailing: '${settingsStore.emoteScale.toStringAsFixed(2)}x',
value: settingsStore.emoteScale,
min: 0.25,
max: 3.0,
divisions: 11,
onChanged: (newValue) => settingsStore.emoteScale = newValue,
),
SettingsListSlider(
title: 'Message scale',
trailing: '${settingsStore.messageScale.toStringAsFixed(2)}x',
value: settingsStore.messageScale,
min: 0.5,
max: 2.0,
divisions: 6,
onChanged: (newValue) => settingsStore.messageScale = newValue,
),
SettingsListSlider(
title: 'Message spacing',
trailing: '${settingsStore.messageSpacing.toStringAsFixed(0)}px',
value: settingsStore.messageSpacing,
max: 30.0,
divisions: 15,
onChanged: (newValue) => settingsStore.messageSpacing = newValue,
),
SettingsListSlider(
title: 'Font size',
trailing: settingsStore.fontSize.toInt().toString(),
value: settingsStore.fontSize,
min: 5,
max: 20,
divisions: 15,
onChanged: (newValue) => settingsStore.fontSize = newValue,
),
const SectionHeader('Message appearance'),
SettingsListSwitch(
title: 'Show deleted messages',
subtitle: const Text(
'Restores the original message of deleted messages.',
),
value: settingsStore.showDeletedMessages,
onChanged: (newValue) =>
settingsStore.showDeletedMessages = newValue,
),
SettingsListSwitch(
title: 'Show message dividers',
value: settingsStore.showChatMessageDividers,
onChanged: (newValue) =>
settingsStore.showChatMessageDividers = newValue,
),
SettingsListSelect(
title: 'Message timestamps',
selectedOption: timestampNames[settingsStore.timestampType.index],
options: timestampNames,
onChanged: (newValue) => settingsStore.timestampType =
TimestampType.values[timestampNames.indexOf(newValue)],
),
const SectionHeader('Delay and latency'),
SettingsListSwitch(
title: 'Sync message delay and stream latency',
value: settingsStore.autoSyncChatDelay,
onChanged: (newValue) => settingsStore.autoSyncChatDelay = newValue,
),
if (!settingsStore.autoSyncChatDelay)
SettingsListSlider(
title: 'Message delay',
trailing: '${settingsStore.chatDelay.toInt()} seconds',
subtitle:
'Adds a delay before each message is rendered in chat. ${Platform.isIOS ? '15 seconds is recommended for iOS.' : ''}',
value: settingsStore.chatDelay,
max: 30.0,
divisions: 30,
onChanged: (newValue) => settingsStore.chatDelay = newValue,
),
const SectionHeader('Alerts'),
SettingsListSwitch(
title: 'Highlight first time chatters',
value: settingsStore.highlightFirstTimeChatter,
onChanged: (newValue) =>
settingsStore.highlightFirstTimeChatter = newValue,
),
SettingsListSwitch(
title: 'Show notices',
subtitle: const Text(
'Shows notices such as subs and re-subs, announcements, and raids.',
),
value: settingsStore.showUserNotices,
onChanged: (newValue) => settingsStore.showUserNotices = newValue,
),
const SectionHeader('Layout'),
SettingsListSwitch(
title: 'Move emote menu button left',
subtitle: const Text(
'Places the emote menu button on the left side to avoid accidental presses.',
),
value: settingsStore.emoteMenuButtonOnLeft,
onChanged: (newValue) =>
settingsStore.emoteMenuButtonOnLeft = newValue,
),
SettingsListSwitch(
title: 'Persist chat tabs',
subtitle: const Text(
'Secondary chat tabs are remembered when switching channels.',
),
value: settingsStore.persistChatTabs,
onChanged: (newValue) {
settingsStore.persistChatTabs = newValue;
if (!newValue) {
settingsStore.secondaryTabs = [];
}
},
),
const SectionHeader('Landscape mode'),
SettingsListSwitch(
title: 'Move chat left',
value: settingsStore.landscapeChatLeftSide,
onChanged: (newValue) =>
settingsStore.landscapeChatLeftSide = newValue,
),
SettingsListSwitch(
title: 'Force vertical chat',
subtitle: const Text(
'Intended for tablets and other larger displays.',
),
value: settingsStore.landscapeForceVerticalChat,
onChanged: (newValue) =>
settingsStore.landscapeForceVerticalChat = newValue,
),
SettingsListSelect(
title: 'Fill notch side',
subtitle:
'Overrides and fills the available space in devices with a display notch.',
selectedOption:
landscapeCutoutNames[settingsStore.landscapeCutout.index],
options: landscapeCutoutNames,
onChanged: (newValue) => settingsStore.landscapeCutout =
LandscapeCutoutType.values[landscapeCutoutNames.indexOf(
newValue,
)],
),
SettingsListSlider(
title: 'Chat overlay opacity',
trailing:
'${(settingsStore.fullScreenChatOverlayOpacity * 100).toStringAsFixed(0)}%',
subtitle:
'Sets the opacity (transparency) of the overlay chat in fullscreen mode.',
value: settingsStore.fullScreenChatOverlayOpacity,
divisions: 10,
onChanged: (newValue) =>
settingsStore.fullScreenChatOverlayOpacity = newValue,
),
const SectionHeader('Muted keywords'),
SettingsMutedWords(settingsStore: settingsStore),
SettingsListSwitch(
title: 'Match whole words',
subtitle: const Text(
'Only matches whole words instead of partial matches.',
),
value: settingsStore.matchWholeWord,
onChanged: (newValue) => settingsStore.matchWholeWord = newValue,
),
const SectionHeader('Autocomplete'),
SettingsListSwitch(
title: 'Show autocomplete bar',
subtitle: const Text(
'Shows a bar containing matching emotes and mentions while typing.',
),
value: settingsStore.autocomplete,
onChanged: (newValue) => settingsStore.autocomplete = newValue,
),
const SectionHeader('Emotes and badges'),
SettingsListSwitch(
title: 'Show Twitch emotes',
value: settingsStore.showTwitchEmotes,
onChanged: (newValue) => settingsStore.showTwitchEmotes = newValue,
),
SettingsListSwitch(
title: 'Show Twitch badges',
value: settingsStore.showTwitchBadges,
onChanged: (newValue) => settingsStore.showTwitchBadges = newValue,
),
SettingsListSwitch(
title: 'Show 7TV emotes',
value: settingsStore.show7TVEmotes,
onChanged: (newValue) => settingsStore.show7TVEmotes = newValue,
),
SettingsListSwitch(
title: 'Show BTTV emotes',
value: settingsStore.showBTTVEmotes,
onChanged: (newValue) => settingsStore.showBTTVEmotes = newValue,
),
SettingsListSwitch(
title: 'Show BTTV badges',
value: settingsStore.showBTTVBadges,
onChanged: (newValue) => settingsStore.showBTTVBadges = newValue,
),
SettingsListSwitch(
title: 'Show FFZ emotes',
value: settingsStore.showFFZEmotes,
onChanged: (newValue) => settingsStore.showFFZEmotes = newValue,
),
SettingsListSwitch(
title: 'Show FFZ badges',
value: settingsStore.showFFZBadges,
onChanged: (newValue) => settingsStore.showFFZBadges = newValue,
),
const SectionHeader('Recent messages'),
SettingsListSwitch(
title: 'Show historical recent messages',
subtitle: Text.rich(
TextSpan(
text:
'Loads historical recent messages in chat through a third-party API service at ',
children: [
TextSpan(
text: 'https://recent-messages.robotty.de/',
style: TextStyle(
color: context.colorScheme.primary,
decoration: TextDecoration.underline,
decorationColor: context.colorScheme.primary,
),
recognizer: TapGestureRecognizer()
..onTap = () => launchUrl(
Uri.parse('https://recent-messages.robotty.de/'),
mode: settingsStore.launchUrlExternal
? LaunchMode.externalApplication
: LaunchMode.inAppBrowserView,
),
),
],
),
),
value: settingsStore.showRecentMessages,
onChanged: (newValue) =>
settingsStore.showRecentMessages = newValue,
),
],
),
);
}
}
import 'dart:io';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:frosty/constants.dart';
import 'package:frosty/screens/settings/stores/settings_store.dart';
import 'package:frosty/screens/settings/widgets/settings_list_select.dart';
import 'package:frosty/screens/settings/widgets/settings_list_slider.dart';
import 'package:frosty/screens/settings/widgets/settings_list_switch.dart';
import 'package:frosty/screens/settings/widgets/settings_muted_words.dart';
import 'package:frosty/utils/context_extensions.dart';
import 'package:frosty/widgets/frosty_cached_network_image.dart';
import 'package:frosty/widgets/section_header.dart';
import 'package:frosty/widgets/settings_page_layout.dart';
import 'package:url_launcher/url_launcher.dart';
class ChatSettings extends StatelessWidget {
final SettingsStore settingsStore;
const ChatSettings({super.key, required this.settingsStore});
@override
Widget build(BuildContext context) {
return Observer(
builder: (context) => SettingsPageLayout(
children: [
const SectionHeader('General', isFirst: true),
SettingsListSwitch(
title: 'Keep screen on',
subtitle: const Text(
'Prevents the screen from sleeping while a channel is open.',
),
value: settingsStore.keepScreenAwake,
onChanged: (newValue) =>
settingsStore.keepScreenAwake = newValue,
),
SettingsListSwitch(
title: 'Autocomplete',
subtitle: const Text(
'Shows matching emotes and mentions while typing.',
),
value: settingsStore.autocomplete,
onChanged: (newValue) =>
settingsStore.autocomplete = newValue,
),
SettingsListSwitch(
title: 'Load recent messages',
subtitle: Text.rich(
TextSpan(
text:
'Loads historical recent messages in chat through a third-party API service at ',
children: [
TextSpan(
text: 'https://recent-messages.robotty.de/',
style: TextStyle(
color: context.colorScheme.primary,
decoration: TextDecoration.underline,
decorationColor: context.colorScheme.primary,
),
recognizer: TapGestureRecognizer()
..onTap = () => launchUrl(
Uri.parse(
'https://recent-messages.robotty.de/',
),
mode: settingsStore.launchUrlExternal
? LaunchMode.externalApplication
: LaunchMode.inAppBrowserView,
),
),
],
),
),
value: settingsStore.showRecentMessages,
onChanged: (newValue) =>
settingsStore.showRecentMessages = newValue,
),
const SectionHeader('Message sizing'),
ExpansionTile(
title: const Text('Preview'),
children: [
Container(
width: double.infinity,
padding: const EdgeInsets.all(16),
child: DefaultTextStyle(
style: DefaultTextStyle.of(
context,
).style.copyWith(fontSize: settingsStore.fontSize),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: FrostyCachedNetworkImage(
imageUrl:
'https://static-cdn.jtvnw.net/badges/v1/bbbe0db0-a598-423e-86d0-f9fb98ca1933/3',
height:
defaultBadgeSize *
settingsStore.badgeScale,
width:
defaultBadgeSize *
settingsStore.badgeScale,
),
),
const TextSpan(
text: ' Badge and emote preview. ',
),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: FrostyCachedNetworkImage(
imageUrl:
'https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/3.0',
height:
defaultEmoteSize *
settingsStore.emoteScale,
width:
defaultEmoteSize *
settingsStore.emoteScale,
),
),
],
),
textScaler: settingsStore.messageScale.textScaler,
),
SizedBox(height: settingsStore.messageSpacing),
Text(
'Hello! Here\'s a text preview.',
textScaler: settingsStore.messageScale.textScaler,
),
SizedBox(height: settingsStore.messageSpacing),
Text(
'And another for spacing without an emote!',
textScaler: settingsStore.messageScale.textScaler,
),
],
),
),
),
],
),
SettingsListSlider(
title: 'Badge scale',
trailing: '${settingsStore.badgeScale.toStringAsFixed(2)}x',
value: settingsStore.badgeScale,
min: 0.25,
max: 3.0,
divisions: 11,
onChanged: (newValue) => settingsStore.badgeScale = newValue,
),
SettingsListSlider(
title: 'Emote scale',
trailing: '${settingsStore.emoteScale.toStringAsFixed(2)}x',
value: settingsStore.emoteScale,
min: 0.25,
max: 3.0,
divisions: 11,
onChanged: (newValue) => settingsStore.emoteScale = newValue,
),
SettingsListSlider(
title: 'Message scale',
trailing: '${settingsStore.messageScale.toStringAsFixed(2)}x',
value: settingsStore.messageScale,
min: 0.5,
max: 2.0,
divisions: 6,
onChanged: (newValue) => settingsStore.messageScale = newValue,
),
SettingsListSlider(
title: 'Message spacing',
trailing:
'${settingsStore.messageSpacing.toStringAsFixed(0)}px',
value: settingsStore.messageSpacing,
max: 30.0,
divisions: 15,
onChanged: (newValue) =>
settingsStore.messageSpacing = newValue,
),
SettingsListSlider(
title: 'Font size',
trailing: settingsStore.fontSize.toInt().toString(),
value: settingsStore.fontSize,
min: 5,
max: 20,
divisions: 15,
onChanged: (newValue) => settingsStore.fontSize = newValue,
),
const SectionHeader('Message appearance'),
SettingsListSwitch(
title: 'Show deleted messages',
subtitle: const Text(
'Restores the original message of deleted messages.',
),
value: settingsStore.showDeletedMessages,
onChanged: (newValue) =>
settingsStore.showDeletedMessages = newValue,
),
SettingsListSwitch(
title: 'Show message dividers',
value: settingsStore.showChatMessageDividers,
onChanged: (newValue) =>
settingsStore.showChatMessageDividers = newValue,
),
SettingsListSelect(
title: 'Timestamps',
selectedOption:
timestampNames[settingsStore.timestampType.index],
options: timestampNames,
onChanged: (newValue) => settingsStore.timestampType =
TimestampType.values[timestampNames.indexOf(newValue)],
),
const SectionHeader('Delay'),
SettingsListSwitch(
title: 'Auto-sync chat delay',
value: settingsStore.autoSyncChatDelay,
onChanged: (newValue) =>
settingsStore.autoSyncChatDelay = newValue,
),
if (!settingsStore.autoSyncChatDelay)
SettingsListSlider(
title: 'Chat delay',
trailing: '${settingsStore.chatDelay.toInt()} seconds',
subtitle:
'Adds a delay before each message is rendered in chat. ${Platform.isIOS ? '15 seconds is recommended for iOS.' : ''}',
value: settingsStore.chatDelay,
max: 30.0,
divisions: 30,
onChanged: (newValue) =>
settingsStore.chatDelay = newValue,
),
const SectionHeader('Alerts'),
SettingsListSwitch(
title: 'Highlight first-time chatters',
value: settingsStore.highlightFirstTimeChatter,
onChanged: (newValue) =>
settingsStore.highlightFirstTimeChatter = newValue,
),
SettingsListSwitch(
title: 'Show notices',
subtitle: const Text(
'Shows notices such as subs, announcements, and raids.',
),
value: settingsStore.showUserNotices,
onChanged: (newValue) =>
settingsStore.showUserNotices = newValue,
),
const SectionHeader('Layout'),
SettingsListSwitch(
title: 'Emote menu on left',
subtitle: const Text(
'Places the emote menu button on the left side.',
),
value: settingsStore.emoteMenuButtonOnLeft,
onChanged: (newValue) =>
settingsStore.emoteMenuButtonOnLeft = newValue,
),
SettingsListSwitch(
title: 'Remember chat tabs',
subtitle: const Text(
'Secondary chat tabs are kept when switching channels.',
),
value: settingsStore.persistChatTabs,
onChanged: (newValue) {
settingsStore.persistChatTabs = newValue;
if (!newValue) {
settingsStore.secondaryTabs = [];
}
},
),
const SectionHeader('Landscape'),
SettingsListSwitch(
title: 'Chat on left side',
value: settingsStore.landscapeChatLeftSide,
onChanged: (newValue) =>
settingsStore.landscapeChatLeftSide = newValue,
),
SettingsListSwitch(
title: 'Force vertical chat',
subtitle: const Text(
'Intended for tablets and larger displays.',
),
value: settingsStore.landscapeForceVerticalChat,
onChanged: (newValue) =>
settingsStore.landscapeForceVerticalChat = newValue,
),
SettingsListSelect(
title: 'Notch fill',
subtitle:
'Fills the display cutout area on the selected side.',
selectedOption:
landscapeCutoutNames[settingsStore.landscapeCutout.index],
options: landscapeCutoutNames,
onChanged: (newValue) => settingsStore.landscapeCutout =
LandscapeCutoutType.values[landscapeCutoutNames.indexOf(
newValue,
)],
),
SettingsListSlider(
title: 'Overlay chat opacity',
trailing:
'${(settingsStore.fullScreenChatOverlayOpacity * 100).toStringAsFixed(0)}%',
subtitle:
'Opacity of the chat overlay in fullscreen mode.',
value: settingsStore.fullScreenChatOverlayOpacity,
divisions: 10,
onChanged: (newValue) =>
settingsStore.fullScreenChatOverlayOpacity = newValue,
),
const SectionHeader('Filtering'),
SettingsMutedWords(settingsStore: settingsStore),
SettingsListSwitch(
title: 'Match whole words',
subtitle: const Text(
'Only matches whole words instead of partial matches.',
),
value: settingsStore.matchWholeWord,
onChanged: (newValue) =>
settingsStore.matchWholeWord = newValue,
),
const SectionHeader('Emotes and badges'),
SettingsListSwitch(
title: 'Twitch emotes',
value: settingsStore.showTwitchEmotes,
onChanged: (newValue) =>
settingsStore.showTwitchEmotes = newValue,
),
SettingsListSwitch(
title: 'Twitch badges',
value: settingsStore.showTwitchBadges,
onChanged: (newValue) =>
settingsStore.showTwitchBadges = newValue,
),
SettingsListSwitch(
title: '7TV emotes',
value: settingsStore.show7TVEmotes,
onChanged: (newValue) =>
settingsStore.show7TVEmotes = newValue,
),
SettingsListSwitch(
title: 'BTTV emotes',
value: settingsStore.showBTTVEmotes,
onChanged: (newValue) =>
settingsStore.showBTTVEmotes = newValue,
),
SettingsListSwitch(
title: 'BTTV badges',
value: settingsStore.showBTTVBadges,
onChanged: (newValue) =>
settingsStore.showBTTVBadges = newValue,
),
SettingsListSwitch(
title: 'FFZ emotes',
value: settingsStore.showFFZEmotes,
onChanged: (newValue) =>
settingsStore.showFFZEmotes = newValue,
),
SettingsListSwitch(
title: 'FFZ badges',
value: settingsStore.showFFZBadges,
onChanged: (newValue) =>
settingsStore.showFFZBadges = newValue,
),
],
),
);
}
}

View file

@ -25,12 +25,12 @@ class GeneralSettings extends StatelessWidget {
AccentColorSetting(settingsStore: settingsStore),
const SectionHeader('Stream card'),
SettingsListSwitch(
title: 'Use large stream card',
title: 'Large stream cards',
value: settingsStore.largeStreamCard,
onChanged: (newValue) => settingsStore.largeStreamCard = newValue,
),
SettingsListSwitch(
title: 'Show thumbnail',
title: 'Show thumbnails',
value: settingsStore.showThumbnails,
onChanged: (newValue) => settingsStore.showThumbnails = newValue,
),

View file

@ -65,9 +65,6 @@ abstract class _SettingsStoreBase with Store {
static const defaultShowVideo = true;
static const defaultDefaultToHighestQuality = false;
static const defaultUseTextureRendering = true;
static const defaultKeepScreenAwake = true;
// Overlay defaults
static const defaultUseNativePlayer = false;
static const defaultShowOverlay = true;
@ -87,10 +84,6 @@ abstract class _SettingsStoreBase with Store {
@observable
var useTextureRendering = defaultUseTextureRendering;
@JsonKey(defaultValue: defaultKeepScreenAwake)
@observable
var keepScreenAwake = defaultKeepScreenAwake;
@JsonKey(defaultValue: defaultUseNativePlayer)
@observable
var useNativePlayer = defaultUseNativePlayer;
@ -113,8 +106,6 @@ abstract class _SettingsStoreBase with Store {
showVideo = defaultShowVideo;
defaultToHighestQuality = defaultDefaultToHighestQuality;
useTextureRendering = defaultUseTextureRendering;
keepScreenAwake = defaultKeepScreenAwake;
useNativePlayer = defaultUseNativePlayer;
showOverlay = defaultShowOverlay;
@ -123,44 +114,25 @@ abstract class _SettingsStoreBase with Store {
}
// * Chat Settings
// Message sizing defaults
// -- Messages --
// Sizing defaults
static const defaultBadgeScale = 1.0;
static const defaultEmoteScale = 1.0;
static const defaultMessageScale = 1.0;
static const defaultMessageSpacing = 8.0;
static const defaultFontSize = 12.0;
// Message appearance defaults
// Appearance defaults
static const defaultShowDeletedMessages = false;
static const defaultShowChatMessageDividers = false;
static const defaultTimestampType = TimestampType.disabled;
// Delay defaults
static const defaultAutoSyncChatDelay = false;
static const defaultChatDelay = 0.0;
// Alert defaults
static const defaultHighlightFirstTimeChatter = true;
static const defaultShowUserNotices = true;
// Layout defaults
static const defaultEmoteMenuButtonOnLeft = false;
// Landscape mode defaults
static const defaultLandscapeChatLeftSide = false;
static const defaultLandscapeForceVerticalChat = false;
static const defaultLandscapeCutout = LandscapeCutoutType.none;
static const defaultChatWidth = 0.2;
static const defaultFullScreenChatOverlayOpacity = 0.5;
// mute words defaults
static const defaultMutedWords = <String>[];
static const defaultMatchWholeWord = true;
// Autocomplete defaults
static const defaultAutocomplete = true;
// Emotes and badges defaults
// -- Emotes & Badges --
static const defaultShowTwitchEmotes = true;
static const defaultShowTwitchBadges = true;
static const defaultShow7TVEmotes = true;
@ -169,14 +141,26 @@ abstract class _SettingsStoreBase with Store {
static const defaultShowFFZEmotes = true;
static const defaultShowFFZBadges = true;
// Recent messages defaults
static const defaultShowRecentMessages = false;
// Chat tabs defaults
// -- Layout --
static const defaultEmoteMenuButtonOnLeft = false;
static const defaultPersistChatTabs = true;
static const defaultSecondaryTabs = <PersistedChatTab>[];
static const defaultLandscapeChatLeftSide = false;
static const defaultLandscapeForceVerticalChat = false;
static const defaultLandscapeCutout = LandscapeCutoutType.none;
static const defaultChatWidth = 0.2;
static const defaultFullScreenChatOverlayOpacity = 0.5;
// Message sizing options
// -- Behavior --
static const defaultKeepScreenAwake = true;
static const defaultAutocomplete = true;
static const defaultShowRecentMessages = false;
static const defaultAutoSyncChatDelay = false;
static const defaultChatDelay = 0.0;
static const defaultMutedWords = <String>[];
static const defaultMatchWholeWord = true;
// Messages options
@JsonKey(defaultValue: defaultBadgeScale)
@observable
var badgeScale = defaultBadgeScale;
@ -197,7 +181,6 @@ abstract class _SettingsStoreBase with Store {
@observable
var fontSize = defaultFontSize;
// Message appearance options
@JsonKey(defaultValue: defaultShowDeletedMessages)
@observable
var showDeletedMessages = defaultShowDeletedMessages;
@ -213,24 +196,6 @@ abstract class _SettingsStoreBase with Store {
@observable
var timestampType = defaultTimestampType;
// Delay options
@JsonKey(defaultValue: defaultAutoSyncChatDelay)
@observable
var autoSyncChatDelay = defaultAutoSyncChatDelay;
@JsonKey(defaultValue: defaultChatDelay)
@observable
var chatDelay = defaultChatDelay;
@JsonKey(includeFromJson: false, includeToJson: false)
@observable
var syncedChatDelay = defaultChatDelay;
@computed
double get effectiveChatDelay =>
autoSyncChatDelay ? syncedChatDelay : chatDelay;
// Alert options
@JsonKey(defaultValue: defaultHighlightFirstTimeChatter)
@observable
var highlightFirstTimeChatter = defaultHighlightFirstTimeChatter;
@ -239,38 +204,7 @@ abstract class _SettingsStoreBase with Store {
@observable
var showUserNotices = defaultShowUserNotices;
// Layout options
@JsonKey(defaultValue: defaultEmoteMenuButtonOnLeft)
@observable
var emoteMenuButtonOnLeft = defaultEmoteMenuButtonOnLeft;
// Landscape mode options
@JsonKey(defaultValue: defaultLandscapeChatLeftSide)
@observable
var landscapeChatLeftSide = defaultLandscapeChatLeftSide;
@JsonKey(defaultValue: defaultLandscapeForceVerticalChat)
@observable
var landscapeForceVerticalChat = defaultLandscapeForceVerticalChat;
@JsonKey(defaultValue: defaultLandscapeCutout)
@observable
var landscapeCutout = defaultLandscapeCutout;
@JsonKey(defaultValue: defaultChatWidth)
@observable
var chatWidth = defaultChatWidth;
@JsonKey(defaultValue: defaultFullScreenChatOverlayOpacity)
@observable
var fullScreenChatOverlayOpacity = defaultFullScreenChatOverlayOpacity;
// Autocomplete options
@JsonKey(defaultValue: defaultAutocomplete)
@observable
var autocomplete = defaultAutocomplete;
// Emotes and badges
// Emotes & Badges options
@JsonKey(defaultValue: defaultShowTwitchEmotes)
@observable
var showTwitchEmotes = defaultShowTwitchEmotes;
@ -299,12 +233,11 @@ abstract class _SettingsStoreBase with Store {
@observable
var showFFZBadges = defaultShowFFZBadges;
// Recent messages
@JsonKey(defaultValue: defaultShowRecentMessages)
// Layout options
@JsonKey(defaultValue: defaultEmoteMenuButtonOnLeft)
@observable
var showRecentMessages = defaultShowRecentMessages;
var emoteMenuButtonOnLeft = defaultEmoteMenuButtonOnLeft;
// Chat tabs
@JsonKey(defaultValue: defaultPersistChatTabs)
@observable
var persistChatTabs = defaultPersistChatTabs;
@ -313,6 +246,55 @@ abstract class _SettingsStoreBase with Store {
@observable
var secondaryTabs = defaultSecondaryTabs;
@JsonKey(defaultValue: defaultLandscapeChatLeftSide)
@observable
var landscapeChatLeftSide = defaultLandscapeChatLeftSide;
@JsonKey(defaultValue: defaultLandscapeForceVerticalChat)
@observable
var landscapeForceVerticalChat = defaultLandscapeForceVerticalChat;
@JsonKey(defaultValue: defaultLandscapeCutout)
@observable
var landscapeCutout = defaultLandscapeCutout;
@JsonKey(defaultValue: defaultChatWidth)
@observable
var chatWidth = defaultChatWidth;
@JsonKey(defaultValue: defaultFullScreenChatOverlayOpacity)
@observable
var fullScreenChatOverlayOpacity = defaultFullScreenChatOverlayOpacity;
// Behavior options
@JsonKey(defaultValue: defaultKeepScreenAwake)
@observable
var keepScreenAwake = defaultKeepScreenAwake;
@JsonKey(defaultValue: defaultAutocomplete)
@observable
var autocomplete = defaultAutocomplete;
@JsonKey(defaultValue: defaultShowRecentMessages)
@observable
var showRecentMessages = defaultShowRecentMessages;
@JsonKey(defaultValue: defaultAutoSyncChatDelay)
@observable
var autoSyncChatDelay = defaultAutoSyncChatDelay;
@JsonKey(defaultValue: defaultChatDelay)
@observable
var chatDelay = defaultChatDelay;
@JsonKey(includeFromJson: false, includeToJson: false)
@observable
var syncedChatDelay = defaultChatDelay;
@computed
double get effectiveChatDelay =>
autoSyncChatDelay ? syncedChatDelay : chatDelay;
@JsonKey(defaultValue: defaultMutedWords)
@observable
List<String> mutedWords = defaultMutedWords;
@ -323,36 +305,19 @@ abstract class _SettingsStoreBase with Store {
@action
void resetChatSettings() {
// Messages
badgeScale = defaultBadgeScale;
emoteScale = defaultEmoteScale;
messageScale = defaultMessageScale;
messageSpacing = defaultMessageSpacing;
fontSize = defaultFontSize;
showDeletedMessages = defaultShowDeletedMessages;
showChatMessageDividers = defaultShowChatMessageDividers;
timestampType = defaultTimestampType;
autoSyncChatDelay = defaultAutoSyncChatDelay;
chatDelay = defaultChatDelay;
syncedChatDelay = defaultChatDelay;
highlightFirstTimeChatter = defaultHighlightFirstTimeChatter;
showUserNotices = defaultShowUserNotices;
emoteMenuButtonOnLeft = defaultEmoteMenuButtonOnLeft;
landscapeChatLeftSide = defaultLandscapeChatLeftSide;
landscapeForceVerticalChat = defaultLandscapeForceVerticalChat;
landscapeCutout = defaultLandscapeCutout;
chatWidth = defaultChatWidth;
fullScreenChatOverlayOpacity = defaultFullScreenChatOverlayOpacity;
mutedWords = defaultMutedWords;
matchWholeWord = defaultMatchWholeWord;
autocomplete = defaultAutocomplete;
// Emotes & Badges
showTwitchEmotes = defaultShowTwitchEmotes;
showTwitchBadges = defaultShowTwitchBadges;
show7TVEmotes = defaultShow7TVEmotes;
@ -361,10 +326,25 @@ abstract class _SettingsStoreBase with Store {
showFFZEmotes = defaultShowFFZEmotes;
showFFZBadges = defaultShowFFZBadges;
showRecentMessages = defaultShowRecentMessages;
// Layout
emoteMenuButtonOnLeft = defaultEmoteMenuButtonOnLeft;
persistChatTabs = defaultPersistChatTabs;
secondaryTabs = defaultSecondaryTabs;
landscapeChatLeftSide = defaultLandscapeChatLeftSide;
landscapeForceVerticalChat = defaultLandscapeForceVerticalChat;
landscapeCutout = defaultLandscapeCutout;
chatWidth = defaultChatWidth;
fullScreenChatOverlayOpacity = defaultFullScreenChatOverlayOpacity;
// Behavior
keepScreenAwake = defaultKeepScreenAwake;
autocomplete = defaultAutocomplete;
showRecentMessages = defaultShowRecentMessages;
autoSyncChatDelay = defaultAutoSyncChatDelay;
chatDelay = defaultChatDelay;
syncedChatDelay = defaultChatDelay;
mutedWords = defaultMutedWords;
matchWholeWord = defaultMatchWholeWord;
}
// * Other settings

View file

@ -23,7 +23,6 @@ SettingsStore _$SettingsStoreFromJson(
..showVideo = json['showVideo'] as bool? ?? true
..defaultToHighestQuality = json['defaultToHighestQuality'] as bool? ?? false
..useTextureRendering = json['useTextureRendering'] as bool? ?? true
..keepScreenAwake = json['keepScreenAwake'] as bool? ?? true
..useNativePlayer = json['useNativePlayer'] as bool? ?? false
..showOverlay = json['showOverlay'] as bool? ?? true
..toggleableOverlay = json['toggleableOverlay'] as bool? ?? false
@ -42,12 +41,23 @@ SettingsStore _$SettingsStoreFromJson(
unknownValue: TimestampType.disabled,
) ??
TimestampType.disabled
..autoSyncChatDelay = json['autoSyncChatDelay'] as bool? ?? false
..chatDelay = (json['chatDelay'] as num?)?.toDouble() ?? 0.0
..highlightFirstTimeChatter =
json['highlightFirstTimeChatter'] as bool? ?? true
..showUserNotices = json['showUserNotices'] as bool? ?? true
..showTwitchEmotes = json['showTwitchEmotes'] as bool? ?? true
..showTwitchBadges = json['showTwitchBadges'] as bool? ?? true
..show7TVEmotes = json['show7TVEmotes'] as bool? ?? true
..showBTTVEmotes = json['showBTTVEmotes'] as bool? ?? true
..showBTTVBadges = json['showBTTVBadges'] as bool? ?? true
..showFFZEmotes = json['showFFZEmotes'] as bool? ?? true
..showFFZBadges = json['showFFZBadges'] as bool? ?? true
..emoteMenuButtonOnLeft = json['emoteMenuButtonOnLeft'] as bool? ?? false
..persistChatTabs = json['persistChatTabs'] as bool? ?? true
..secondaryTabs =
(json['secondaryTabs'] as List<dynamic>?)
?.map((e) => PersistedChatTab.fromJson(e as Map<String, dynamic>))
.toList() ??
[]
..landscapeChatLeftSide = json['landscapeChatLeftSide'] as bool? ?? false
..landscapeForceVerticalChat =
json['landscapeForceVerticalChat'] as bool? ?? false
@ -60,21 +70,11 @@ SettingsStore _$SettingsStoreFromJson(
..chatWidth = (json['chatWidth'] as num?)?.toDouble() ?? 0.2
..fullScreenChatOverlayOpacity =
(json['fullScreenChatOverlayOpacity'] as num?)?.toDouble() ?? 0.5
..keepScreenAwake = json['keepScreenAwake'] as bool? ?? true
..autocomplete = json['autocomplete'] as bool? ?? true
..showTwitchEmotes = json['showTwitchEmotes'] as bool? ?? true
..showTwitchBadges = json['showTwitchBadges'] as bool? ?? true
..show7TVEmotes = json['show7TVEmotes'] as bool? ?? true
..showBTTVEmotes = json['showBTTVEmotes'] as bool? ?? true
..showBTTVBadges = json['showBTTVBadges'] as bool? ?? true
..showFFZEmotes = json['showFFZEmotes'] as bool? ?? true
..showFFZBadges = json['showFFZBadges'] as bool? ?? true
..showRecentMessages = json['showRecentMessages'] as bool? ?? false
..persistChatTabs = json['persistChatTabs'] as bool? ?? true
..secondaryTabs =
(json['secondaryTabs'] as List<dynamic>?)
?.map((e) => PersistedChatTab.fromJson(e as Map<String, dynamic>))
.toList() ??
[]
..autoSyncChatDelay = json['autoSyncChatDelay'] as bool? ?? false
..chatDelay = (json['chatDelay'] as num?)?.toDouble() ?? 0.0
..mutedWords =
(json['mutedWords'] as List<dynamic>?)
?.map((e) => e as String)
@ -102,7 +102,6 @@ Map<String, dynamic> _$SettingsStoreToJson(
'showVideo': instance.showVideo,
'defaultToHighestQuality': instance.defaultToHighestQuality,
'useTextureRendering': instance.useTextureRendering,
'keepScreenAwake': instance.keepScreenAwake,
'useNativePlayer': instance.useNativePlayer,
'showOverlay': instance.showOverlay,
'toggleableOverlay': instance.toggleableOverlay,
@ -115,17 +114,8 @@ Map<String, dynamic> _$SettingsStoreToJson(
'showDeletedMessages': instance.showDeletedMessages,
'showChatMessageDividers': instance.showChatMessageDividers,
'timestampType': _$TimestampTypeEnumMap[instance.timestampType]!,
'autoSyncChatDelay': instance.autoSyncChatDelay,
'chatDelay': instance.chatDelay,
'highlightFirstTimeChatter': instance.highlightFirstTimeChatter,
'showUserNotices': instance.showUserNotices,
'emoteMenuButtonOnLeft': instance.emoteMenuButtonOnLeft,
'landscapeChatLeftSide': instance.landscapeChatLeftSide,
'landscapeForceVerticalChat': instance.landscapeForceVerticalChat,
'landscapeCutout': _$LandscapeCutoutTypeEnumMap[instance.landscapeCutout]!,
'chatWidth': instance.chatWidth,
'fullScreenChatOverlayOpacity': instance.fullScreenChatOverlayOpacity,
'autocomplete': instance.autocomplete,
'showTwitchEmotes': instance.showTwitchEmotes,
'showTwitchBadges': instance.showTwitchBadges,
'show7TVEmotes': instance.show7TVEmotes,
@ -133,9 +123,19 @@ Map<String, dynamic> _$SettingsStoreToJson(
'showBTTVBadges': instance.showBTTVBadges,
'showFFZEmotes': instance.showFFZEmotes,
'showFFZBadges': instance.showFFZBadges,
'showRecentMessages': instance.showRecentMessages,
'emoteMenuButtonOnLeft': instance.emoteMenuButtonOnLeft,
'persistChatTabs': instance.persistChatTabs,
'secondaryTabs': instance.secondaryTabs,
'landscapeChatLeftSide': instance.landscapeChatLeftSide,
'landscapeForceVerticalChat': instance.landscapeForceVerticalChat,
'landscapeCutout': _$LandscapeCutoutTypeEnumMap[instance.landscapeCutout]!,
'chatWidth': instance.chatWidth,
'fullScreenChatOverlayOpacity': instance.fullScreenChatOverlayOpacity,
'keepScreenAwake': instance.keepScreenAwake,
'autocomplete': instance.autocomplete,
'showRecentMessages': instance.showRecentMessages,
'autoSyncChatDelay': instance.autoSyncChatDelay,
'chatDelay': instance.chatDelay,
'mutedWords': instance.mutedWords,
'matchWholeWord': instance.matchWholeWord,
'shareCrashLogsAndAnalytics': instance.shareCrashLogsAndAnalytics,
@ -327,24 +327,6 @@ mixin _$SettingsStore on _SettingsStoreBase, Store {
});
}
late final _$keepScreenAwakeAtom = Atom(
name: '_SettingsStoreBase.keepScreenAwake',
context: context,
);
@override
bool get keepScreenAwake {
_$keepScreenAwakeAtom.reportRead();
return super.keepScreenAwake;
}
@override
set keepScreenAwake(bool value) {
_$keepScreenAwakeAtom.reportWrite(value, super.keepScreenAwake, () {
super.keepScreenAwake = value;
});
}
late final _$useNativePlayerAtom = Atom(
name: '_SettingsStoreBase.useNativePlayer',
context: context,
@ -565,60 +547,6 @@ mixin _$SettingsStore on _SettingsStoreBase, Store {
});
}
late final _$autoSyncChatDelayAtom = Atom(
name: '_SettingsStoreBase.autoSyncChatDelay',
context: context,
);
@override
bool get autoSyncChatDelay {
_$autoSyncChatDelayAtom.reportRead();
return super.autoSyncChatDelay;
}
@override
set autoSyncChatDelay(bool value) {
_$autoSyncChatDelayAtom.reportWrite(value, super.autoSyncChatDelay, () {
super.autoSyncChatDelay = value;
});
}
late final _$chatDelayAtom = Atom(
name: '_SettingsStoreBase.chatDelay',
context: context,
);
@override
double get chatDelay {
_$chatDelayAtom.reportRead();
return super.chatDelay;
}
@override
set chatDelay(double value) {
_$chatDelayAtom.reportWrite(value, super.chatDelay, () {
super.chatDelay = value;
});
}
late final _$syncedChatDelayAtom = Atom(
name: '_SettingsStoreBase.syncedChatDelay',
context: context,
);
@override
double get syncedChatDelay {
_$syncedChatDelayAtom.reportRead();
return super.syncedChatDelay;
}
@override
set syncedChatDelay(double value) {
_$syncedChatDelayAtom.reportWrite(value, super.syncedChatDelay, () {
super.syncedChatDelay = value;
});
}
late final _$highlightFirstTimeChatterAtom = Atom(
name: '_SettingsStoreBase.highlightFirstTimeChatter',
context: context,
@ -659,148 +587,6 @@ mixin _$SettingsStore on _SettingsStoreBase, Store {
});
}
late final _$emoteMenuButtonOnLeftAtom = Atom(
name: '_SettingsStoreBase.emoteMenuButtonOnLeft',
context: context,
);
@override
bool get emoteMenuButtonOnLeft {
_$emoteMenuButtonOnLeftAtom.reportRead();
return super.emoteMenuButtonOnLeft;
}
@override
set emoteMenuButtonOnLeft(bool value) {
_$emoteMenuButtonOnLeftAtom.reportWrite(
value,
super.emoteMenuButtonOnLeft,
() {
super.emoteMenuButtonOnLeft = value;
},
);
}
late final _$landscapeChatLeftSideAtom = Atom(
name: '_SettingsStoreBase.landscapeChatLeftSide',
context: context,
);
@override
bool get landscapeChatLeftSide {
_$landscapeChatLeftSideAtom.reportRead();
return super.landscapeChatLeftSide;
}
@override
set landscapeChatLeftSide(bool value) {
_$landscapeChatLeftSideAtom.reportWrite(
value,
super.landscapeChatLeftSide,
() {
super.landscapeChatLeftSide = value;
},
);
}
late final _$landscapeForceVerticalChatAtom = Atom(
name: '_SettingsStoreBase.landscapeForceVerticalChat',
context: context,
);
@override
bool get landscapeForceVerticalChat {
_$landscapeForceVerticalChatAtom.reportRead();
return super.landscapeForceVerticalChat;
}
@override
set landscapeForceVerticalChat(bool value) {
_$landscapeForceVerticalChatAtom.reportWrite(
value,
super.landscapeForceVerticalChat,
() {
super.landscapeForceVerticalChat = value;
},
);
}
late final _$landscapeCutoutAtom = Atom(
name: '_SettingsStoreBase.landscapeCutout',
context: context,
);
@override
LandscapeCutoutType get landscapeCutout {
_$landscapeCutoutAtom.reportRead();
return super.landscapeCutout;
}
@override
set landscapeCutout(LandscapeCutoutType value) {
_$landscapeCutoutAtom.reportWrite(value, super.landscapeCutout, () {
super.landscapeCutout = value;
});
}
late final _$chatWidthAtom = Atom(
name: '_SettingsStoreBase.chatWidth',
context: context,
);
@override
double get chatWidth {
_$chatWidthAtom.reportRead();
return super.chatWidth;
}
@override
set chatWidth(double value) {
_$chatWidthAtom.reportWrite(value, super.chatWidth, () {
super.chatWidth = value;
});
}
late final _$fullScreenChatOverlayOpacityAtom = Atom(
name: '_SettingsStoreBase.fullScreenChatOverlayOpacity',
context: context,
);
@override
double get fullScreenChatOverlayOpacity {
_$fullScreenChatOverlayOpacityAtom.reportRead();
return super.fullScreenChatOverlayOpacity;
}
@override
set fullScreenChatOverlayOpacity(double value) {
_$fullScreenChatOverlayOpacityAtom.reportWrite(
value,
super.fullScreenChatOverlayOpacity,
() {
super.fullScreenChatOverlayOpacity = value;
},
);
}
late final _$autocompleteAtom = Atom(
name: '_SettingsStoreBase.autocomplete',
context: context,
);
@override
bool get autocomplete {
_$autocompleteAtom.reportRead();
return super.autocomplete;
}
@override
set autocomplete(bool value) {
_$autocompleteAtom.reportWrite(value, super.autocomplete, () {
super.autocomplete = value;
});
}
late final _$showTwitchEmotesAtom = Atom(
name: '_SettingsStoreBase.showTwitchEmotes',
context: context,
@ -927,22 +713,26 @@ mixin _$SettingsStore on _SettingsStoreBase, Store {
});
}
late final _$showRecentMessagesAtom = Atom(
name: '_SettingsStoreBase.showRecentMessages',
late final _$emoteMenuButtonOnLeftAtom = Atom(
name: '_SettingsStoreBase.emoteMenuButtonOnLeft',
context: context,
);
@override
bool get showRecentMessages {
_$showRecentMessagesAtom.reportRead();
return super.showRecentMessages;
bool get emoteMenuButtonOnLeft {
_$emoteMenuButtonOnLeftAtom.reportRead();
return super.emoteMenuButtonOnLeft;
}
@override
set showRecentMessages(bool value) {
_$showRecentMessagesAtom.reportWrite(value, super.showRecentMessages, () {
super.showRecentMessages = value;
});
set emoteMenuButtonOnLeft(bool value) {
_$emoteMenuButtonOnLeftAtom.reportWrite(
value,
super.emoteMenuButtonOnLeft,
() {
super.emoteMenuButtonOnLeft = value;
},
);
}
late final _$persistChatTabsAtom = Atom(
@ -981,6 +771,216 @@ mixin _$SettingsStore on _SettingsStoreBase, Store {
});
}
late final _$landscapeChatLeftSideAtom = Atom(
name: '_SettingsStoreBase.landscapeChatLeftSide',
context: context,
);
@override
bool get landscapeChatLeftSide {
_$landscapeChatLeftSideAtom.reportRead();
return super.landscapeChatLeftSide;
}
@override
set landscapeChatLeftSide(bool value) {
_$landscapeChatLeftSideAtom.reportWrite(
value,
super.landscapeChatLeftSide,
() {
super.landscapeChatLeftSide = value;
},
);
}
late final _$landscapeForceVerticalChatAtom = Atom(
name: '_SettingsStoreBase.landscapeForceVerticalChat',
context: context,
);
@override
bool get landscapeForceVerticalChat {
_$landscapeForceVerticalChatAtom.reportRead();
return super.landscapeForceVerticalChat;
}
@override
set landscapeForceVerticalChat(bool value) {
_$landscapeForceVerticalChatAtom.reportWrite(
value,
super.landscapeForceVerticalChat,
() {
super.landscapeForceVerticalChat = value;
},
);
}
late final _$landscapeCutoutAtom = Atom(
name: '_SettingsStoreBase.landscapeCutout',
context: context,
);
@override
LandscapeCutoutType get landscapeCutout {
_$landscapeCutoutAtom.reportRead();
return super.landscapeCutout;
}
@override
set landscapeCutout(LandscapeCutoutType value) {
_$landscapeCutoutAtom.reportWrite(value, super.landscapeCutout, () {
super.landscapeCutout = value;
});
}
late final _$chatWidthAtom = Atom(
name: '_SettingsStoreBase.chatWidth',
context: context,
);
@override
double get chatWidth {
_$chatWidthAtom.reportRead();
return super.chatWidth;
}
@override
set chatWidth(double value) {
_$chatWidthAtom.reportWrite(value, super.chatWidth, () {
super.chatWidth = value;
});
}
late final _$fullScreenChatOverlayOpacityAtom = Atom(
name: '_SettingsStoreBase.fullScreenChatOverlayOpacity',
context: context,
);
@override
double get fullScreenChatOverlayOpacity {
_$fullScreenChatOverlayOpacityAtom.reportRead();
return super.fullScreenChatOverlayOpacity;
}
@override
set fullScreenChatOverlayOpacity(double value) {
_$fullScreenChatOverlayOpacityAtom.reportWrite(
value,
super.fullScreenChatOverlayOpacity,
() {
super.fullScreenChatOverlayOpacity = value;
},
);
}
late final _$keepScreenAwakeAtom = Atom(
name: '_SettingsStoreBase.keepScreenAwake',
context: context,
);
@override
bool get keepScreenAwake {
_$keepScreenAwakeAtom.reportRead();
return super.keepScreenAwake;
}
@override
set keepScreenAwake(bool value) {
_$keepScreenAwakeAtom.reportWrite(value, super.keepScreenAwake, () {
super.keepScreenAwake = value;
});
}
late final _$autocompleteAtom = Atom(
name: '_SettingsStoreBase.autocomplete',
context: context,
);
@override
bool get autocomplete {
_$autocompleteAtom.reportRead();
return super.autocomplete;
}
@override
set autocomplete(bool value) {
_$autocompleteAtom.reportWrite(value, super.autocomplete, () {
super.autocomplete = value;
});
}
late final _$showRecentMessagesAtom = Atom(
name: '_SettingsStoreBase.showRecentMessages',
context: context,
);
@override
bool get showRecentMessages {
_$showRecentMessagesAtom.reportRead();
return super.showRecentMessages;
}
@override
set showRecentMessages(bool value) {
_$showRecentMessagesAtom.reportWrite(value, super.showRecentMessages, () {
super.showRecentMessages = value;
});
}
late final _$autoSyncChatDelayAtom = Atom(
name: '_SettingsStoreBase.autoSyncChatDelay',
context: context,
);
@override
bool get autoSyncChatDelay {
_$autoSyncChatDelayAtom.reportRead();
return super.autoSyncChatDelay;
}
@override
set autoSyncChatDelay(bool value) {
_$autoSyncChatDelayAtom.reportWrite(value, super.autoSyncChatDelay, () {
super.autoSyncChatDelay = value;
});
}
late final _$chatDelayAtom = Atom(
name: '_SettingsStoreBase.chatDelay',
context: context,
);
@override
double get chatDelay {
_$chatDelayAtom.reportRead();
return super.chatDelay;
}
@override
set chatDelay(double value) {
_$chatDelayAtom.reportWrite(value, super.chatDelay, () {
super.chatDelay = value;
});
}
late final _$syncedChatDelayAtom = Atom(
name: '_SettingsStoreBase.syncedChatDelay',
context: context,
);
@override
double get syncedChatDelay {
_$syncedChatDelayAtom.reportRead();
return super.syncedChatDelay;
}
@override
set syncedChatDelay(double value) {
_$syncedChatDelayAtom.reportWrite(value, super.syncedChatDelay, () {
super.syncedChatDelay = value;
});
}
late final _$mutedWordsAtom = Atom(
name: '_SettingsStoreBase.mutedWords',
context: context,
@ -1185,7 +1185,6 @@ launchUrlExternal: ${launchUrlExternal},
showVideo: ${showVideo},
defaultToHighestQuality: ${defaultToHighestQuality},
useTextureRendering: ${useTextureRendering},
keepScreenAwake: ${keepScreenAwake},
useNativePlayer: ${useNativePlayer},
showOverlay: ${showOverlay},
toggleableOverlay: ${toggleableOverlay},
@ -1198,18 +1197,8 @@ fontSize: ${fontSize},
showDeletedMessages: ${showDeletedMessages},
showChatMessageDividers: ${showChatMessageDividers},
timestampType: ${timestampType},
autoSyncChatDelay: ${autoSyncChatDelay},
chatDelay: ${chatDelay},
syncedChatDelay: ${syncedChatDelay},
highlightFirstTimeChatter: ${highlightFirstTimeChatter},
showUserNotices: ${showUserNotices},
emoteMenuButtonOnLeft: ${emoteMenuButtonOnLeft},
landscapeChatLeftSide: ${landscapeChatLeftSide},
landscapeForceVerticalChat: ${landscapeForceVerticalChat},
landscapeCutout: ${landscapeCutout},
chatWidth: ${chatWidth},
fullScreenChatOverlayOpacity: ${fullScreenChatOverlayOpacity},
autocomplete: ${autocomplete},
showTwitchEmotes: ${showTwitchEmotes},
showTwitchBadges: ${showTwitchBadges},
show7TVEmotes: ${show7TVEmotes},
@ -1217,9 +1206,20 @@ showBTTVEmotes: ${showBTTVEmotes},
showBTTVBadges: ${showBTTVBadges},
showFFZEmotes: ${showFFZEmotes},
showFFZBadges: ${showFFZBadges},
showRecentMessages: ${showRecentMessages},
emoteMenuButtonOnLeft: ${emoteMenuButtonOnLeft},
persistChatTabs: ${persistChatTabs},
secondaryTabs: ${secondaryTabs},
landscapeChatLeftSide: ${landscapeChatLeftSide},
landscapeForceVerticalChat: ${landscapeForceVerticalChat},
landscapeCutout: ${landscapeCutout},
chatWidth: ${chatWidth},
fullScreenChatOverlayOpacity: ${fullScreenChatOverlayOpacity},
keepScreenAwake: ${keepScreenAwake},
autocomplete: ${autocomplete},
showRecentMessages: ${showRecentMessages},
autoSyncChatDelay: ${autoSyncChatDelay},
chatDelay: ${chatDelay},
syncedChatDelay: ${syncedChatDelay},
mutedWords: ${mutedWords},
matchWholeWord: ${matchWholeWord},
shareCrashLogsAndAnalytics: ${shareCrashLogsAndAnalytics},

View file

@ -20,7 +20,7 @@ class VideoSettings extends StatelessWidget {
children: [
const SectionHeader('Player', isFirst: true),
SettingsListSwitch(
title: 'Enable video',
title: 'Show video player',
value: settingsStore.showVideo,
onChanged: (newValue) => settingsStore.showVideo = newValue,
),
@ -51,14 +51,6 @@ class VideoSettings extends StatelessWidget {
onChanged: (newValue) =>
settingsStore.useTextureRendering = newValue,
),
SettingsListSwitch(
title: 'Keep screen awake',
subtitle: const Text(
'Prevents the screen from sleeping while a channel is open.',
),
value: settingsStore.keepScreenAwake,
onChanged: (newValue) => settingsStore.keepScreenAwake = newValue,
),
const SectionHeader('Overlay'),
SettingsListSwitch(
title: 'Use custom video overlay',
@ -69,9 +61,9 @@ class VideoSettings extends StatelessWidget {
onChanged: (newValue) => settingsStore.showOverlay = newValue,
),
SettingsListSwitch(
title: 'Long-press player to toggle overlay',
title: 'Toggle overlay on long-press',
subtitle: const Text(
'Allows switching between Twitch\'s overlay and the custom overlay.',
'Switch between Twitch\'s overlay and the custom overlay.',
),
value: settingsStore.toggleableOverlay,
onChanged: (newValue) =>

View file

@ -38,10 +38,12 @@ class SectionHeader extends StatelessWidget {
Text(
text.toUpperCase(),
style: TextStyle(
fontSize: fontSize ?? 13,
fontWeight: FontWeight.w600,
letterSpacing: 0.5,
color: context.colorScheme.onSurfaceVariant,
fontSize: fontSize ?? 12,
fontWeight: FontWeight.w500,
letterSpacing: 0.8,
color: context.colorScheme.onSurfaceVariant.withValues(
alpha: 0.6,
),
),
),
],

View file

@ -41,7 +41,7 @@ class _SettingsPageLayoutState extends State<SettingsPageLayout> {
// Responsive values based on orientation
final listPadding = EdgeInsets.only(
top: isPortrait ? 116 : 92,
top: isPortrait ? 124 : 100,
bottom: widget.hasBottomPadding ? context.safePaddingBottom + 8 : 0,
);