'Shortcut to extract flutter widget into a new file

I use Android Studio. I have a few Flutter widgets in one file. Is it a way to extract a widget into its own DART file very quickly, like a shortcut?

For example, how to extract HomePage from such a file?

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'my_chart.dart';
import 'my_schedule.dart';
import 'my_slider.dart';

void main() => runApp(ChangeNotifierProvider(
      create: (context) => MySchedule(),
      child: HomePage(),
    ));

// TODO extract HomePage to a new file via a shortcut
class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.white,
        appBar: AppBar(
          title: Center(
            child: Text('Change Piechart Dynamically'),
          ),
        ),
        body: Column(
          children: <Widget>[
            Expanded(
              child: MyChart(),
            ),
            Expanded(
              child: MySlider(),
            )
          ],
        ),
      ),
    );
  }
}


Solution 1:[1]

The New Shortcut Key to Extract Widget In Android Studio Chipmunk | 2021.2.1 is Ctrl + Alt + E

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Malick Aftab ツ