mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
[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.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
class Assets {
|
abstract final class Assets {
|
||||||
static const activities = 'assets/activities.json';
|
static const activities = 'assets/activities.json';
|
||||||
static const destinations = 'assets/destinations.json';
|
static const destinations = 'assets/destinations.json';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
class Routes {
|
abstract final class Routes {
|
||||||
static const home = '/';
|
static const home = '/';
|
||||||
static const login = '/login';
|
static const login = '/login';
|
||||||
static const search = '/$searchRelative';
|
static const search = '/$searchRelative';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AppColors {
|
abstract final class AppColors {
|
||||||
static const black1 = Color(0xFF101010);
|
static const black1 = Color(0xFF101010);
|
||||||
static const white1 = Color(0xFFFFF7FA);
|
static const white1 = Color(0xFFFFF7FA);
|
||||||
static const grey1 = Color(0xFFF2F2F2);
|
static const grey1 = Color(0xFFF2F2F2);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import 'colors.dart';
|
|||||||
import '../ui/tag_chip.dart';
|
import '../ui/tag_chip.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AppTheme {
|
abstract final class AppTheme {
|
||||||
static const _textTheme = TextTheme(
|
static const _textTheme = TextTheme(
|
||||||
headlineLarge: TextStyle(
|
headlineLarge: TextStyle(
|
||||||
fontSize: 32,
|
fontSize: 32,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import 'dart:io';
|
|||||||
import '../model/activity/activity.dart';
|
import '../model/activity/activity.dart';
|
||||||
import '../model/destination/destination.dart';
|
import '../model/destination/destination.dart';
|
||||||
|
|
||||||
class Assets {
|
abstract final class Assets {
|
||||||
static const _activities = '../app/assets/activities.json';
|
static const _activities = '../app/assets/activities.json';
|
||||||
static const _destinations = '../app/assets/destinations.json';
|
static const _destinations = '../app/assets/destinations.json';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import '../model/user/user.dart';
|
import '../model/user/user.dart';
|
||||||
|
|
||||||
class Constants {
|
abstract final class Constants {
|
||||||
/// Email for the hardcoded login.
|
/// Email for the hardcoded login.
|
||||||
static const email = 'email@example.com';
|
static const email = 'email@example.com';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user