From 90cd385ef47548dcb7720781e805d5156a710604 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Thu, 5 Dec 2024 21:39:19 +0800 Subject: [PATCH] [compass_app] Mark classes used for namespacing as `abstract final` (#2540) As they are just used for namespacing static properties, these classes shouldn't be extended, implemented, or instantiated. --- compass_app/app/lib/config/assets.dart | 2 +- compass_app/app/lib/routing/routes.dart | 2 +- compass_app/app/lib/ui/core/themes/colors.dart | 2 +- compass_app/app/lib/ui/core/themes/theme.dart | 2 +- compass_app/server/lib/config/assets.dart | 2 +- compass_app/server/lib/config/constants.dart | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compass_app/app/lib/config/assets.dart b/compass_app/app/lib/config/assets.dart index b60059e0a..cbbbc4ed1 100644 --- a/compass_app/app/lib/config/assets.dart +++ b/compass_app/app/lib/config/assets.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -class Assets { +abstract final class Assets { static const activities = 'assets/activities.json'; static const destinations = 'assets/destinations.json'; } diff --git a/compass_app/app/lib/routing/routes.dart b/compass_app/app/lib/routing/routes.dart index bba607532..86ea0b789 100644 --- a/compass_app/app/lib/routing/routes.dart +++ b/compass_app/app/lib/routing/routes.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -class Routes { +abstract final class Routes { static const home = '/'; static const login = '/login'; static const search = '/$searchRelative'; diff --git a/compass_app/app/lib/ui/core/themes/colors.dart b/compass_app/app/lib/ui/core/themes/colors.dart index 9e42e36ec..8c98c8c70 100644 --- a/compass_app/app/lib/ui/core/themes/colors.dart +++ b/compass_app/app/lib/ui/core/themes/colors.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; -class AppColors { +abstract final class AppColors { static const black1 = Color(0xFF101010); static const white1 = Color(0xFFFFF7FA); static const grey1 = Color(0xFFF2F2F2); diff --git a/compass_app/app/lib/ui/core/themes/theme.dart b/compass_app/app/lib/ui/core/themes/theme.dart index 34ae0c989..98483bcfc 100644 --- a/compass_app/app/lib/ui/core/themes/theme.dart +++ b/compass_app/app/lib/ui/core/themes/theme.dart @@ -6,7 +6,7 @@ import 'colors.dart'; import '../ui/tag_chip.dart'; import 'package:flutter/material.dart'; -class AppTheme { +abstract final class AppTheme { static const _textTheme = TextTheme( headlineLarge: TextStyle( fontSize: 32, diff --git a/compass_app/server/lib/config/assets.dart b/compass_app/server/lib/config/assets.dart index 6ee55cf86..e2bec536d 100644 --- a/compass_app/server/lib/config/assets.dart +++ b/compass_app/server/lib/config/assets.dart @@ -8,7 +8,7 @@ import 'dart:io'; import '../model/activity/activity.dart'; import '../model/destination/destination.dart'; -class Assets { +abstract final class Assets { static const _activities = '../app/assets/activities.json'; static const _destinations = '../app/assets/destinations.json'; diff --git a/compass_app/server/lib/config/constants.dart b/compass_app/server/lib/config/constants.dart index 60f35b40d..a3cc6d67d 100644 --- a/compass_app/server/lib/config/constants.dart +++ b/compass_app/server/lib/config/constants.dart @@ -4,7 +4,7 @@ import '../model/user/user.dart'; -class Constants { +abstract final class Constants { /// Email for the hardcoded login. static const email = 'email@example.com';