),

],

);

Code after migration (setState added to onPressed):

import

'package:flutter/material.dart'

void

main

()

runApp

MyApp

());

class

MyApp

extends

StatelessWidget

@override

Widget

build

BuildContext

context

return

MaterialApp

title:

'Flutter Demo'

theme:

ThemeData

primarySwatch:

Colors

blue

),

home:

Counter

(),

);