Skip to content

Colors.dart from MDC-103 conflicts with Google's recommended best practices #200

Closed
@jpe90

Description

@jpe90

Google's Effective Dart guidelines state Hungarian notation should be avoided, but Colors.dart in MD-103 uses them for variable names of constant color values (see below). The code should adhere to the guidelines unless there is a reason Hungarian notation is recommended in this situation, in which cases the guidelines should be amended to clarify.

import 'package:flutter/material.dart';

const kShrinePink50 = const Color(0xFFFEEAE6);
const kShrinePink100 = const Color(0xFFFEDBD0);
const kShrinePink300 = const Color(0xFFFBB8AC);
const kShrinePink400 = const Color(0xFFEAA4A4);

const kShrineBrown900 = const Color(0xFF442B2D);

const kShrineErrorRed = const Color(0xFFC5032B);

const kShrineSurfaceWhite = const Color(0xFFFFFBFA);
const kShrineBackgroundWhite = Colors.white;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions