This commit is contained in:
toly
2023-10-27 17:25:31 +08:00
parent 95e510d814
commit a1a70fae78
108 changed files with 7593 additions and 355 deletions

View File

@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';
class CounterPage extends StatelessWidget {
final int counter;
final VoidCallback onAddTap;
const CounterPage({super.key, required this.counter, required this.onAddTap});
@override
Widget build(BuildContext context) {
return Scaffold(
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: onAddTap,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}
}