Skip to content

use_key_in_widget_constructors is not handling super_parameters #58694

Closed
@asashour

Description

@asashour

For the below code with SDK main

import 'package:flutter/material.dart';

class MyWidget extends StatelessWidget {
  const MyWidget({super.key});

  @override
  Widget build(BuildContext context) {
    throw UnimplementedError();
  }
}

Expected behavior
No lint

Actual behavior
Lint at the const saying: Use key in widget constructors

Metadata

Metadata

Assignees

No one assigned

    Labels

    devexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions