cpd_2022_energy/lib/widgets/MyTest.dart

30 lines
740 B
Dart

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}');
}
),
],
),
)
);
}
}