Skip to content

Move to file not moving to existing file even after agreeing to replace it #5218

@FMorschel

Description

@FMorschel

With this code sample:

import 'package:flutter/material.dart';

void main() => runApp(const MaterialApp(home: Home()));

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return const Scaffold();
  }
}

Place the cursor under either Home or _HomeState and with the quick-fix to "Move [it] to file" move it to a new file say a.dart.

After that, place the cursor in the second class and do the same (same file). It will (currently) tell you that the file already exists and ask if you want to replace it. After pressing "yes", it does nothing.

logs.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions