1
0
mirror of https://github.com/flutter/samples.git synced 2026-05-20 22:17:17 +00:00

Flutter 3.29 beta (#2571)

This commit is contained in:
Eric Windmill
2025-02-12 18:08:01 -05:00
committed by GitHub
parent d62c784789
commit 719fd72c38
685 changed files with 76244 additions and 53721 deletions

View File

@@ -1,10 +1,7 @@
import 'package:flutter/material.dart';
class CounterDemo extends StatefulWidget {
const CounterDemo({
super.key,
required this.counter,
});
const CounterDemo({super.key, required this.counter});
final ValueNotifier<int> counter;
@@ -24,15 +21,14 @@ class _CounterDemoState extends State<CounterDemo> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
const Text('You have pushed the button this many times:'),
ValueListenableBuilder(
valueListenable: widget.counter,
builder: (context, value, child) => Text(
'$value',
style: Theme.of(context).textTheme.headlineMedium,
),
builder:
(context, value, child) => Text(
'$value',
style: Theme.of(context).textTheme.headlineMedium,
),
),
],
),