Tweak section header & profile pic widget (#90)

This commit is contained in:
Tommy Chow 2022-06-29 08:03:53 -04:00
parent 6b7afbb31c
commit ed657fbe79
3 changed files with 3 additions and 9 deletions

View file

@ -64,7 +64,6 @@ class _ChatSettingsState extends State<ChatSettings> {
),
const SectionHeader(
'Layout',
fontSize: 12.0,
padding: sectionPadding,
),
SwitchListTile.adaptive(
@ -113,7 +112,6 @@ class _ChatSettingsState extends State<ChatSettings> {
),
const SectionHeader(
'Emotes',
fontSize: 12.0,
padding: sectionPadding,
),
SwitchListTile.adaptive(
@ -125,7 +123,6 @@ class _ChatSettingsState extends State<ChatSettings> {
),
const SectionHeader(
'Message Appearance',
fontSize: 12.0,
padding: sectionPadding,
),
SwitchListTile.adaptive(
@ -166,7 +163,6 @@ class _ChatSettingsState extends State<ChatSettings> {
),
const SectionHeader(
'Message Sizing',
fontSize: 12.0,
padding: sectionPadding,
),
ExpansionTile(

View file

@ -21,14 +21,13 @@ class ProfilePicture extends StatelessWidget {
future: context.read<TwitchApi>().getUser(userLogin: userLogin, headers: context.read<AuthStore>().headersTwitch),
builder: (context, AsyncSnapshot<UserTwitch> snapshot) {
return AnimatedOpacity(
opacity: snapshot.hasData ? 1 : 0,
duration: const Duration(milliseconds: 500),
opacity: snapshot.connectionState == ConnectionState.done && snapshot.hasData ? 1.0 : 0.0,
curve: Curves.easeIn,
child: CircleAvatar(
radius: radius,
backgroundColor: Colors.transparent,
foregroundImage: snapshot.connectionState == ConnectionState.done && snapshot.hasData
? CachedNetworkImageProvider(snapshot.data!.profileImageUrl)
: null,
foregroundImage: snapshot.hasData ? CachedNetworkImageProvider(snapshot.data!.profileImageUrl) : null,
),
);
},

View file

@ -19,7 +19,6 @@ class SectionHeader extends StatelessWidget {
child: Text(
text.toUpperCase(),
style: TextStyle(
color: DefaultTextStyle.of(context).style.color?.withOpacity(0.8),
fontSize: fontSize,
fontWeight: FontWeight.w600,
letterSpacing: 0.5,