Tweak font weights & styles
This commit is contained in:
parent
254968a2d6
commit
e0b2fcc0b3
11 changed files with 76 additions and 88 deletions
|
|
@ -264,7 +264,7 @@ class TwitchApi {
|
|||
if (userData.isNotEmpty) {
|
||||
return UserTwitch.fromJson(userData.first);
|
||||
} else {
|
||||
return Future.error('User does not exist');
|
||||
return Future.error('User does not exist!');
|
||||
}
|
||||
} else {
|
||||
return Future.error('Failed to get user: ${decoded['message']}');
|
||||
|
|
@ -422,7 +422,7 @@ class TwitchApi {
|
|||
return [];
|
||||
}
|
||||
} else {
|
||||
return Future.error('User does not exist');
|
||||
return Future.error('User does not exist!');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class MyApp extends StatelessWidget {
|
|||
titleTextStyle: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: Colors.black,
|
||||
),
|
||||
iconTheme: IconThemeData(color: Colors.black),
|
||||
|
|
@ -116,7 +116,7 @@ class MyApp extends StatelessWidget {
|
|||
titleTextStyle: const TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontWeight: FontWeight.w800,
|
||||
),
|
||||
),
|
||||
colorScheme: ColorScheme.fromSwatch(
|
||||
|
|
@ -138,7 +138,7 @@ class MyApp extends StatelessWidget {
|
|||
titleTextStyle: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontWeight: FontWeight.w800,
|
||||
),
|
||||
),
|
||||
colorScheme: ColorScheme.fromSwatch(
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class _VideoChatState extends State<VideoChat> {
|
|||
final appBar = AppBar(
|
||||
title: Text(
|
||||
regexEnglish.hasMatch(_chatStore.displayName) ? _chatStore.displayName : _chatStore.displayName + ' (${_chatStore.channelName})',
|
||||
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||||
style: const TextStyle(fontSize: 20),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
|
|
|
|||
|
|
@ -37,12 +37,7 @@ class _HomeState extends State<Home> {
|
|||
'Search',
|
||||
];
|
||||
|
||||
return Text(
|
||||
titles[_homeStore.selectedIndex],
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w800,
|
||||
),
|
||||
);
|
||||
return Text(titles[_homeStore.selectedIndex]);
|
||||
},
|
||||
),
|
||||
actions: [
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class _SearchState extends State<Search> {
|
|||
autocorrect: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
hintText: 'Search for a channel or category',
|
||||
hintText: 'Find a channel or category',
|
||||
contentPadding: const EdgeInsets.all(10.0),
|
||||
border: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15.0)),
|
||||
|
|
@ -64,12 +64,10 @@ class _SearchState extends State<Search> {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (_searchStore.searchHistory.isNotEmpty)
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Text(
|
||||
'HISTORY',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SectionHeader(
|
||||
'History',
|
||||
padding: headerPadding,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Expanded(
|
||||
child: ListView(
|
||||
|
|
@ -105,6 +103,7 @@ class _SearchState extends State<Search> {
|
|||
child: SectionHeader(
|
||||
'Channels',
|
||||
padding: headerPadding,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SearchResultsChannels(
|
||||
|
|
@ -115,6 +114,7 @@ class _SearchState extends State<Search> {
|
|||
child: SectionHeader(
|
||||
'Categories',
|
||||
padding: headerPadding,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SearchResultsCategories(searchStore: _searchStore),
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class CategoryStreams extends StatelessWidget {
|
|||
centerTitle: true,
|
||||
title: Text(
|
||||
listStore.categoryInfo!.name,
|
||||
style: Theme.of(context).textTheme.headline6?.copyWith(fontWeight: FontWeight.bold),
|
||||
style: Theme.of(context).textTheme.headline6?.copyWith(fontWeight: FontWeight.w800),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:frosty/constants/constants.dart';
|
||||
import 'package:frosty/core/auth/auth_store.dart';
|
||||
import 'package:frosty/screens/settings/stores/settings_store.dart';
|
||||
import 'package:frosty/screens/settings/widgets/blocked_users.dart';
|
||||
import 'package:frosty/widgets/block_button.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
class AccountSettings extends StatelessWidget {
|
||||
|
|
@ -178,7 +180,10 @@ class ProfileCard extends StatelessWidget {
|
|||
leading: CircleAvatar(
|
||||
foregroundImage: CachedNetworkImageProvider(authStore.user.details!.profileImageUrl),
|
||||
),
|
||||
title: Text(authStore.user.details!.displayName),
|
||||
title: Text(
|
||||
authStore.user.details!.displayName,
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
trailing: OutlinedButton.icon(
|
||||
onPressed: () => _showLogoutDialog(context),
|
||||
icon: const Icon(Icons.logout_outlined),
|
||||
|
|
@ -206,3 +211,51 @@ class ProfileCard extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
class BlockedUsers extends StatelessWidget {
|
||||
final AuthStore authStore;
|
||||
|
||||
const BlockedUsers({
|
||||
Key? key,
|
||||
required this.authStore,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Blocked Users'),
|
||||
),
|
||||
body: RefreshIndicator(
|
||||
onRefresh: () async {
|
||||
HapticFeedback.lightImpact();
|
||||
await authStore.user.refreshBlockedUsers(headers: authStore.headersTwitch);
|
||||
},
|
||||
child: Observer(
|
||||
builder: (context) {
|
||||
if (authStore.user.blockedUsers.isEmpty) {
|
||||
return const Center(
|
||||
child: Text('You don\'t have any blocked users.'),
|
||||
);
|
||||
}
|
||||
return ListView(
|
||||
children: authStore.user.blockedUsers.map(
|
||||
(user) {
|
||||
final displayName = regexEnglish.hasMatch(user.displayName) ? user.displayName : user.displayName + ' (${user.userLogin})';
|
||||
return ListTile(
|
||||
title: Text(displayName),
|
||||
trailing: BlockButton(
|
||||
authStore: authStore,
|
||||
targetUser: displayName,
|
||||
targetUserId: user.userId,
|
||||
),
|
||||
);
|
||||
},
|
||||
).toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:frosty/constants/constants.dart';
|
||||
import 'package:frosty/screens/settings/stores/settings_store.dart';
|
||||
import 'package:frosty/widgets/section_header.dart';
|
||||
|
||||
class ChatSettings extends StatefulWidget {
|
||||
final SettingsStore settingsStore;
|
||||
|
|
@ -83,13 +84,7 @@ class _ChatSettingsState extends State<ChatSettings> {
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
const Padding(
|
||||
padding: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 5.0),
|
||||
child: Text(
|
||||
'Message Appearance',
|
||||
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0),
|
||||
),
|
||||
),
|
||||
const SectionHeader('Message Appearance'),
|
||||
ExpansionTile(
|
||||
title: const Text(
|
||||
'Preview',
|
||||
|
|
|
|||
|
|
@ -21,10 +21,7 @@ class Settings extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text(
|
||||
'Settings',
|
||||
style: TextStyle(fontWeight: FontWeight.w800),
|
||||
),
|
||||
title: const Text('Settings'),
|
||||
actions: [
|
||||
if (Platform.isAndroid)
|
||||
IconButton(
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:frosty/constants/constants.dart';
|
||||
import 'package:frosty/core/auth/auth_store.dart';
|
||||
import 'package:frosty/widgets/block_button.dart';
|
||||
|
||||
class BlockedUsers extends StatelessWidget {
|
||||
final AuthStore authStore;
|
||||
|
||||
const BlockedUsers({
|
||||
Key? key,
|
||||
required this.authStore,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Blocked Users'),
|
||||
),
|
||||
body: RefreshIndicator(
|
||||
onRefresh: () async {
|
||||
HapticFeedback.lightImpact();
|
||||
await authStore.user.refreshBlockedUsers(headers: authStore.headersTwitch);
|
||||
},
|
||||
child: Observer(
|
||||
builder: (context) {
|
||||
if (authStore.user.blockedUsers.isEmpty) {
|
||||
return const Center(
|
||||
child: Text('You don\'t have any blocked users.'),
|
||||
);
|
||||
}
|
||||
return ListView(
|
||||
children: authStore.user.blockedUsers.map(
|
||||
(user) {
|
||||
final displayName = regexEnglish.hasMatch(user.displayName) ? user.displayName : user.displayName + ' (${user.userLogin})';
|
||||
return ListTile(
|
||||
title: Text(displayName),
|
||||
trailing: BlockButton(
|
||||
authStore: authStore,
|
||||
targetUser: displayName,
|
||||
targetUserId: user.userId,
|
||||
),
|
||||
);
|
||||
},
|
||||
).toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,12 +4,14 @@ class SectionHeader extends StatelessWidget {
|
|||
final String text;
|
||||
final EdgeInsets padding;
|
||||
final double fontSize;
|
||||
final FontWeight fontWeight;
|
||||
|
||||
const SectionHeader(
|
||||
this.text, {
|
||||
Key? key,
|
||||
this.padding = const EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 5.0),
|
||||
this.fontSize = 18.0,
|
||||
this.fontWeight = FontWeight.w600,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -20,7 +22,7 @@ class SectionHeader extends StatelessWidget {
|
|||
text,
|
||||
style: TextStyle(
|
||||
fontSize: fontSize,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontWeight: fontWeight,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue