Skip to content

(Dart) Highlight colors for Class and Constructor Calls #4091

Open
@Husseink-hagag

Description

@Husseink-hagag

Describe the issue

The current output lacks color for class names and constructor calls so most lines are displayed in the same color, which significantly impacts readability and makes it challenging to distinguish between different code components. In contrast

Which language seems to have the issue?

Dart (the issue is impacting Flutter)

Are you using highlight or highlightAuto?

highlight

...

Sample Code to Reproduce

import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold (
      appBar: AppBar(
        title: const Text('Scaffold Example'),
      ),
      body: const Center(
        child: Text('Hello, World!'),
      ),
      drawer: Drawer(
        child: ListView(
          children: const <Widget>[
            ListTile(title: Text('Home')),
            ListTile(title: Text('Profile')),
          ],
        ),
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: const [
          BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
          BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Search'),
        ],
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {},
        child: Icon(Icons.add),
      ),
    ),
  ));
}

Expected behavior
Highlight colors for Class and Constructor Calls

Additional context

Here are two images:
(1) - displaying the current output from the Highlight library , where all elements appear in the same color, making it difficult to read.
(2) - a different library, which shows custom colors for classes and constructors. Both images feature code written in Dart for Flutter.

highlight

other

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions