2022-11-08 22:11:18 +01:00
|
|
|
import 'package:energy_bilance/widgets/ExpandedNumberInputWidget.dart';
|
2022-11-07 18:52:21 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
2022-11-08 22:11:18 +01:00
|
|
|
import '../models/EnergyBilanceModel.dart';
|
|
|
|
|
2022-11-07 18:52:21 +01:00
|
|
|
class MyInputWidget extends StatelessWidget {
|
|
|
|
const MyInputWidget({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final model = Provider.of<EnergyBilanceModel>(context);
|
|
|
|
|
2022-11-08 22:11:18 +01:00
|
|
|
return Column(
|
2022-11-07 18:52:21 +01:00
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
2022-11-07 22:12:21 +01:00
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
2022-11-07 18:52:21 +01:00
|
|
|
children: [
|
2022-11-08 22:11:18 +01:00
|
|
|
ExpandedNumberInputWidget("Anfangsgeschwindigkeit", "in m/s", model.setStartVelocity),
|
|
|
|
ExpandedNumberInputWidget("Endgeschwindigkeit", "in m/s", model.setEndVelocity)
|
2022-11-07 18:52:21 +01:00
|
|
|
],
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
children: [
|
2022-11-08 22:11:18 +01:00
|
|
|
ExpandedNumberInputWidget("Anfangshöhe", "in m", model.setStartHeight),
|
|
|
|
ExpandedNumberInputWidget("Endhöhe", "in m", model.setEndHeight),
|
2022-11-07 18:52:21 +01:00
|
|
|
],
|
|
|
|
),
|
2022-11-08 22:11:18 +01:00
|
|
|
ExpandedNumberInputWidget("Gewicht", "in kg", model.setWeight),
|
2022-11-07 18:52:21 +01:00
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|