46 lines
1.1 KiB
Dart
46 lines
1.1 KiB
Dart
|
import 'package:flutter/material.dart';
|
||
|
import 'package:softplayer_web/components/menubar.dart';
|
||
|
|
||
|
class HomePage extends StatefulWidget {
|
||
|
const HomePage({super.key});
|
||
|
final String title = "home";
|
||
|
|
||
|
@override
|
||
|
State<HomePage> createState() => _HomePage();
|
||
|
}
|
||
|
|
||
|
class _HomePage extends State<HomePage> {
|
||
|
int _counter = 0;
|
||
|
void _incrementCounter() {
|
||
|
setState(() {
|
||
|
_counter++;
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Scaffold(
|
||
|
appBar: MenuPanel(tab: TabName.home),
|
||
|
body: Center(
|
||
|
child: Column(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: <Widget>[
|
||
|
const Text(
|
||
|
'You have pushed the button this many times:',
|
||
|
),
|
||
|
Text(
|
||
|
'$_counter',
|
||
|
style: Theme.of(context).textTheme.headlineMedium,
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
floatingActionButton: FloatingActionButton(
|
||
|
onPressed: _incrementCounter,
|
||
|
tooltip: 'Increment',
|
||
|
child: const Icon(Icons.tv),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|