Files
progetto-m335-flutter/lib/pages/testUI.dart
2023-09-27 14:17:52 +02:00

30 lines
545 B
Dart

import 'package:flutter/material.dart';
class TestUI extends StatefulWidget {
const TestUI({super.key});
@override
State<TestUI> createState() => _TestUIState();
}
class _TestUIState extends State<TestUI> {
int _test = 0;
void _onPressed() {
setState(() {
_test = 1;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(children: [
FloatingActionButton(onPressed: _onPressed),
Text('$_test'),
],),
),
);
}
}