How does Android Studio refactor a stateless widget to a stateful widget code example

Example 1: How does Android Studio refactor a stateless widget to a stateful widget

Already have a Stateless widget and want to convert it to a 
Stateful one? Just click your Stateless widget class and 
press alt + Enter on AS or ctrl + . on VS code to get an 
option to convert it to a Statefulwidget!

Example 2: how does android studio refactor a stateful widget to a stateless widget flutter

class Counter extends StatelessWidget {
//   @override
//   _CounterState createState() => _CounterState();
// }

// class _CounterState extends State<Counter> {
  @override
  Widget build(BuildContext context) {
    return Container(
      
    );
  }
}

Tags:

Misc Example