import 'package:flutter/material.dart';
class NewUpdatePage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _NewUpdatePage();
}
}
class _NewUpdatePage extends State<NewUpdatePage> {
int index = 0;
@override
Widget build(BuildContext context) {
return Center(
child: Column(
children: <Widget>[
Text('index = $index'),
FlatButton(
child: Text('button'),
onPressed: () {
setState(() {
index++;
});
},
),
],
),
);
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.