diff --git a/lib/screens/settings/sections/chat_settings.dart b/lib/screens/settings/sections/chat_settings.dart index 1ba2fe89..262d9591 100644 --- a/lib/screens/settings/sections/chat_settings.dart +++ b/lib/screens/settings/sections/chat_settings.dart @@ -90,57 +90,66 @@ class _ChatSettingsState extends State { style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0), ), ), - Container( - width: double.infinity, - padding: const EdgeInsets.all(20.0), - margin: const EdgeInsets.all(10.0), - decoration: BoxDecoration( - border: Border.all(color: Colors.deepPurple), - borderRadius: BorderRadius.circular(15.0), + ExpansionTile( + title: const Text( + 'Preview', + style: TextStyle(fontWeight: FontWeight.w500), ), - 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: CachedNetworkImage( - imageUrl: 'https://static-cdn.jtvnw.net/badges/v1/bbbe0db0-a598-423e-86d0-f9fb98ca1933/3', - height: defaultBadgeSize * settingsStore.badgeScale, - width: defaultBadgeSize * settingsStore.badgeScale, - ), + children: [ + Container( + width: double.infinity, + padding: const EdgeInsets.all(20.0), + margin: const EdgeInsets.all(10.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.deepPurple), + borderRadius: BorderRadius.circular(15.0), + ), + 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: CachedNetworkImage( + 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: CachedNetworkImage( + imageUrl: 'https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/3.0', + height: defaultEmoteSize * settingsStore.emoteScale, + width: defaultEmoteSize * settingsStore.emoteScale, + ), + ), + ], ), - const TextSpan(text: ' Badge and emote preview. '), - WidgetSpan( - alignment: PlaceholderAlignment.middle, - child: CachedNetworkImage( - imageUrl: 'https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/3.0', - height: defaultEmoteSize * settingsStore.emoteScale, - width: defaultEmoteSize * settingsStore.emoteScale, - ), - ), - ], - ), - textScaleFactor: settingsStore.messageScale, + textScaleFactor: settingsStore.messageScale, + ), + SizedBox(height: settingsStore.messageSpacing), + Text( + 'Hello! Here\'s a text preview.', + textScaleFactor: settingsStore.messageScale, + ), + SizedBox(height: settingsStore.messageSpacing), + Text( + 'And another for spacing without an emote!', + textScaleFactor: settingsStore.messageScale, + ), + ], ), - SizedBox(height: settingsStore.messageSpacing), - Text( - 'Hello! Here\'s a text preview.', - textScaleFactor: settingsStore.messageScale, - ), - SizedBox(height: settingsStore.messageSpacing), - Text( - 'And another for spacing without an emote!', - textScaleFactor: settingsStore.messageScale, - ), - ], + ), ), - ), + ], ), + const SizedBox(height: 10.0), ListTile( title: Row( children: [