Browse Source

Merge pull request #425 from Leptopoda/feature/custom_theme

neon, neon_news, neon_notifications: use error color of the theme
pull/428/head
Nikolas Rimikis 2 years ago committed by GitHub
parent
commit
3e09339549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/neon/neon/lib/src/pages/home.dart
  2. 4
      packages/neon/neon/lib/src/pages/settings.dart
  3. 2
      packages/neon/neon/lib/src/widgets/cached_image.dart
  4. 4
      packages/neon/neon_news/lib/widgets/feeds_view.dart
  5. 6
      packages/neon/neon_notifications/lib/pages/main.dart

6
packages/neon/neon/lib/src/pages/home.dart

@ -77,6 +77,8 @@ class _HomePageState extends State<HomePage> {
}
Future _showProblem(final String title) async {
final colorScheme = Theme.of(context).colorScheme;
await showDialog(
context: context,
builder: (final context) => AlertDialog(
@ -84,8 +86,8 @@ class _HomePageState extends State<HomePage> {
actions: [
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.red,
foregroundColor: Theme.of(context).colorScheme.onPrimary,
backgroundColor: colorScheme.error,
foregroundColor: colorScheme.onError,
),
onPressed: () {
Navigator.of(context).pop();

4
packages/neon/neon/lib/src/pages/settings.dart

@ -118,10 +118,10 @@ class _SettingsPageState extends State<SettingsPage> {
!pushNotificationsEnabledEnabledSnapshot.requireData) ...[
NeonTextSettingsTile(
text: AppLocalizations.of(context).globalOptionsPushNotificationsEnabledDisabledNotice,
style: const TextStyle(
style: TextStyle(
fontWeight: FontWeight.w600,
fontStyle: FontStyle.italic,
color: Colors.red,
color: Theme.of(context).colorScheme.error,
),
),
],

2
packages/neon/neon/lib/src/widgets/cached_image.dart

@ -71,7 +71,7 @@ class _NeonCachedImageState extends State<NeonCachedImage> {
},
onlyIcon: true,
iconSize: widget.size?.shortestSide,
color: widget.iconColor ?? Colors.red,
color: widget.iconColor ?? Theme.of(context).colorScheme.error,
);
}
return SizedBox(

4
packages/neon/neon_news/lib/widgets/feeds_view.dart

@ -74,8 +74,8 @@ class NewsFeedsView extends StatelessWidget {
iconSize: 30,
icon: Text(
feed.updateErrorCount.toString(),
style: const TextStyle(
color: Colors.red,
style: TextStyle(
color: Theme.of(context).colorScheme.error,
),
),
),

6
packages/neon/neon_notifications/lib/pages/main.dart

@ -92,6 +92,8 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
final accountsBloc = Provider.of<AccountsBloc>(context, listen: false);
await accountsBloc.activeAppsBloc.setActiveApp(app.id);
} else {
final colorScheme = Theme.of(context).colorScheme;
await showDialog(
context: context,
builder: (final context) => AlertDialog(
@ -99,8 +101,8 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
actions: [
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.red,
foregroundColor: Theme.of(context).colorScheme.onPrimary,
backgroundColor: colorScheme.error,
foregroundColor: colorScheme.onError,
),
onPressed: () {
Navigator.of(context).pop();

Loading…
Cancel
Save