Skip to content

Commit

Permalink
Refactor colors (#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisPhilippeHeon authored Feb 3, 2025
1 parent f93cbfb commit ae42cb0
Show file tree
Hide file tree
Showing 68 changed files with 883 additions and 927 deletions.
12 changes: 6 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ PODS:
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreExtension (11.4.1):
- FirebaseCore (~> 11.0)
- FirebaseCoreInternal (11.7.0):
- FirebaseCoreInternal (11.8.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseCrashlytics (11.4.0):
- FirebaseCore (~> 11.4)
Expand All @@ -84,7 +84,7 @@ PODS:
- FirebaseSharedSwift (~> 11.0)
- GoogleUtilities/Environment (~> 8.0)
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseRemoteConfigInterop (11.7.0)
- FirebaseRemoteConfigInterop (11.8.0)
- FirebaseSessions (11.4.0):
- FirebaseCore (~> 11.4)
- FirebaseCoreExtension (~> 11.4)
Expand All @@ -94,7 +94,7 @@ PODS:
- GoogleUtilities/UserDefaults (~> 8.0)
- nanopb (~> 3.30910.0)
- PromisesSwift (~> 2.1)
- FirebaseSharedSwift (11.7.0)
- FirebaseSharedSwift (11.8.0)
- Flutter (1.0.0)
- flutter_inappwebview_ios (0.0.1):
- Flutter
Expand Down Expand Up @@ -305,13 +305,13 @@ SPEC CHECKSUMS:
FirebaseAnalytics: 3feef9ae8733c567866342a1000691baaa7cad49
FirebaseCore: e0510f1523bc0eb21653cac00792e1e2bd6f1771
FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e
FirebaseCoreInternal: d6c17dafc8dc33614733a8b52df78fcb4394c881
FirebaseCoreInternal: df24ce5af28864660ecbd13596fc8dd3a8c34629
FirebaseCrashlytics: 41bbdd2b514a8523cede0c217aee6ef7ecf38401
FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414
FirebaseRemoteConfig: 7655681d02417bc9b287338edb9d721ff79e1a4a
FirebaseRemoteConfigInterop: ca12abf9da0003efd3a476b2dff4f7a04fd31b4f
FirebaseRemoteConfigInterop: 98897a64aa372eac3c5b3fe2816594ccfaac55ef
FirebaseSessions: 3f56f177d9e53a85021d16b31f9a111849d1dd8b
FirebaseSharedSwift: a45efd84d60ebbfdcdbaebc66948af3630459e62
FirebaseSharedSwift: 672954eac7b141d6954fab9a32d45d6b1d922df8
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
Expand Down
4 changes: 2 additions & 2 deletions lib/features/app/error/not_found/not_found_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import 'package:flutter/material.dart';

// Package imports:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:notredame/theme/app_palette.dart';
import 'package:stacked/stacked.dart';

// Project imports:
import 'package:notredame/features/app/error/not_found/not_found_viewmodel.dart';
import 'package:notredame/utils/app_theme.dart';

class NotFoundView extends StatefulWidget {
final String? pageName;
Expand Down Expand Up @@ -64,7 +64,7 @@ class _NotFoundState extends State<NotFoundView> {
),
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.primary,
backgroundColor: AppPalette.etsLightRed,
),
onPressed: () {
model.navigateToDashboard();
Expand Down
6 changes: 2 additions & 4 deletions lib/features/app/error/outage/outage_view.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:notredame/theme/app_theme.dart';

// Package imports:
import 'package:stacked/stacked.dart';
Expand All @@ -9,8 +10,6 @@ import 'package:notredame/features/app/error/outage/outage_viewmodel.dart';
import 'package:notredame/features/app/error/outage/widgets/outage_image_section.dart';
import 'package:notredame/features/app/error/outage/widgets/outage_social_section.dart';
import 'package:notredame/features/app/error/outage/widgets/outage_text_section.dart';
import 'package:notredame/utils/app_theme.dart';
import 'package:notredame/utils/utils.dart';

class OutageView extends StatelessWidget {
const OutageView({super.key});
Expand All @@ -20,8 +19,7 @@ class OutageView extends StatelessWidget {
ViewModelBuilder<OutageViewModel>.nonReactive(
viewModelBuilder: () => OutageViewModel(context),
builder: (context, model, child) => Scaffold(
backgroundColor: Utils.getColorByBrightness(
context, AppTheme.etsLightRed, AppTheme.primaryDark),
backgroundColor: context.theme.appColors.backgroundVibrant,
body: Stack(
children: [
SafeArea(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import 'package:flutter/material.dart';

// Project imports:
import 'package:notredame/utils/app_theme.dart';
import 'package:notredame/theme/app_theme.dart';

class OutageImageSection extends StatelessWidget {
const OutageImageSection({super.key});
Expand All @@ -15,9 +15,7 @@ class OutageImageSection extends StatelessWidget {
"assets/animations/outage.gif",
excludeFromSemantics: true,
width: 500,
color: Theme.of(context).brightness == Brightness.light
? Colors.white
: AppTheme.etsLightRed,
color: context.theme.appColors.outageGif,
));
}
}
17 changes: 9 additions & 8 deletions lib/features/app/error/outage/widgets/outage_social_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:notredame/constants/urls.dart';
import 'package:notredame/utils/locator.dart';
import 'package:notredame/features/app/integration/launch_url_service.dart';
import 'package:notredame/theme/app_palette.dart';

class OutageSocialSection extends StatelessWidget {
OutageSocialSection({super.key});
Expand All @@ -23,30 +24,30 @@ class OutageSocialSection extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
IconButton(
icon: const FaIcon(
icon: FaIcon(
FontAwesomeIcons.earthAmericas,
color: Colors.white,
color: AppPalette.grey.white,
),
onPressed: () =>
_launchUrlService.launchInBrowser(Urls.clubWebsite)),
IconButton(
icon: const FaIcon(
icon: FaIcon(
FontAwesomeIcons.github,
color: Colors.white,
color: AppPalette.grey.white,
),
onPressed: () =>
_launchUrlService.launchInBrowser(Urls.clubGithub)),
IconButton(
icon: const FaIcon(
icon: FaIcon(
Icons.mail_outline,
color: Colors.white,
color: AppPalette.grey.white,
),
onPressed: () =>
_launchUrlService.writeEmail(Urls.clubEmail, "")),
IconButton(
icon: const FaIcon(
icon: FaIcon(
FontAwesomeIcons.discord,
color: Colors.white,
color: AppPalette.grey.white,
),
onPressed: () =>
_launchUrlService.launchInBrowser(Urls.clubDiscord))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter/material.dart';

// Package imports:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:notredame/theme/app_palette.dart';

class OutageTextSection extends StatelessWidget {
final VoidCallback refreshOutageConfig;
Expand All @@ -22,13 +23,13 @@ class OutageTextSection extends StatelessWidget {
Text(
AppIntl.of(context)!.service_outage,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 18, color: Colors.white),
style: TextStyle(fontSize: 18, color: AppPalette.grey.white),
),
const SizedBox(height: 3),
Text(
AppIntl.of(context)!.service_outage_contact,
textAlign: TextAlign.center,
style: const TextStyle(color: Colors.white),
style: TextStyle(color: AppPalette.grey.white),
),
SizedBox(height: buttonPlacement),
ElevatedButton(
Expand Down
10 changes: 5 additions & 5 deletions lib/features/app/integration/launch_url_service.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Flutter imports:
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:notredame/theme/app_palette.dart';

// Package imports:
import 'package:url_launcher/url_launcher.dart' as url_launch;

// Project imports:
import 'package:notredame/features/more/settings/settings_manager.dart';
import 'package:notredame/utils/app_theme.dart';
import 'package:notredame/utils/locator.dart';

class LaunchUrlService {
Expand Down Expand Up @@ -38,13 +38,13 @@ class LaunchUrlService {
// Android
dismissButtonStyle: DismissButtonStyle.CLOSE,
enableUrlBarHiding: true,
toolbarBackgroundColor: AppTheme.accent,
navigationBarColor: AppTheme.primaryDark,
toolbarBackgroundColor: AppPalette.etsLightRed,
navigationBarColor: AppPalette.grey.black,

// iOS
barCollapsingEnabled: true,
preferredControlTintColor: AppTheme.lightThemeBackground,
preferredBarTintColor: AppTheme.accent,
preferredControlTintColor: AppPalette.grey.white,
preferredBarTintColor: AppPalette.etsLightRed,
)
);
}
Expand Down
3 changes: 1 addition & 2 deletions lib/features/app/navigation/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Route<dynamic> generateRoute(RouteSettings routeSettings) {
case RouterPaths.faq:
return MaterialPageRoute(
settings: RouteSettings(name: routeSettings.name),
builder: (_) =>
FaqView(backgroundColor: routeSettings.arguments! as Color));
builder: (_) => FaqView());
case RouterPaths.dashboard:
return PageRouteBuilder(
settings: RouteSettings(
Expand Down
16 changes: 6 additions & 10 deletions lib/features/app/startup/startup_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import 'package:flutter/material.dart';

// Package imports:
import 'package:flutter_svg/flutter_svg.dart';
import 'package:notredame/theme/app_theme.dart';
import 'package:stacked/stacked.dart';

// Project imports:
import 'package:notredame/features/app/startup/startup_viewmodel.dart';
import 'package:notredame/utils/app_theme.dart';
import 'package:notredame/utils/utils.dart';
import 'package:notredame/theme/app_palette.dart';

class StartUpView extends StatelessWidget {
const StartUpView({super.key});
Expand All @@ -21,8 +21,7 @@ class StartUpView extends StatelessWidget {
model.handleStartUp();
},
builder: (context, model, child) => Scaffold(
backgroundColor: Utils.getColorByBrightness(
context, AppTheme.etsLightRed, AppTheme.primaryDark),
backgroundColor: context.theme.appColors.backgroundVibrant,
body: SafeArea(
minimum: const EdgeInsets.all(20),
child: Center(
Expand All @@ -37,18 +36,15 @@ class StartUpView extends StatelessWidget {
width: 90,
height: 90,
colorFilter: ColorFilter.mode(
Theme.of(context).brightness ==
Brightness.light
? Colors.white
: AppTheme.etsLightRed,
context.theme.appColors.loginAccent,
BlendMode.srcIn),
)),
const SizedBox(
height: 15,
),
const CircularProgressIndicator(
CircularProgressIndicator(
valueColor:
AlwaysStoppedAnimation<Color>(Colors.white))
AlwaysStoppedAnimation<Color>(AppPalette.grey.white))
],
),
),
Expand Down
10 changes: 3 additions & 7 deletions lib/features/app/widgets/base_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:notredame/features/app/integration/networking_service.dart';
import 'package:notredame/features/app/widgets/navigation/bottom_bar.dart';
import 'package:notredame/features/app/widgets/navigation/navigation_rail.dart';
import 'package:notredame/utils/app_theme.dart';
import 'package:notredame/theme/app_theme.dart';
import 'package:notredame/utils/loading.dart';
import 'package:notredame/utils/locator.dart';
import 'package:notredame/utils/utils.dart';

/// Basic Scaffold to avoid boilerplate code in the application.
/// Contains a loader controlled by [_isLoading]
Expand Down Expand Up @@ -135,9 +134,7 @@ class _BaseScaffoldState extends State<BaseScaffold> {
children: [
if (widget._showBottomBar)
ColoredBox(
color: Theme.of(context).brightness == Brightness.light
? AppTheme.lightTheme().navigationRailTheme.backgroundColor!
: AppTheme.darkTheme().navigationRailTheme.backgroundColor!,
color: context.theme.appColors.navBar,
child: SafeArea(
top: false, bottom: false, right: false, child: NavRail()),
),
Expand Down Expand Up @@ -171,8 +168,7 @@ class _BaseScaffoldState extends State<BaseScaffold> {
alignment: Alignment.center,
children: [
Container(
color: Utils.getColorByBrightness(context,
AppTheme.lightThemeBackground, AppTheme.darkThemeBackground),
color: context.theme.appColors.backgroundAlt,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height / 30,
),
Expand Down
8 changes: 4 additions & 4 deletions lib/features/app/widgets/navigation/base_navigation_bar.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';

import '../../../../utils/locator.dart';
import '../../analytics/analytics_service.dart';
import '../../navigation/navigation_service.dart';
import '../../navigation/router_paths.dart';
import 'package:notredame/utils/locator.dart';
import 'package:notredame/features/app/analytics/analytics_service.dart';
import 'package:notredame/features/app/navigation/navigation_service.dart';
import 'package:notredame/features/app/navigation/router_paths.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

enum NavigationView {
Expand Down
Loading

0 comments on commit ae42cb0

Please sign in to comment.