cpd_2022_energy/lib/widgets/MyTest.dart

30 lines
740 B
Dart
Raw Normal View History

2022-11-07 18:52:21 +01:00
import 'package:energy_bilance/models/MyInputModel.dart';
import 'package:energy_bilance/widgets/MyCustomForm.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MyTest extends StatelessWidget {
const MyTest({super.key});
@override
Widget build(BuildContext context) {
return Material(
child:
ChangeNotifierProvider(create: (context) => MyInputModel(),
child: Column(
children: [
const MyCustomForm(),
Consumer<MyInputModel>(
builder: (context, input, child){
return Text('Das ist die Eingabe: ${input.currentText}');
}
),
],
),
)
);
}
}