cpd_2022_energy/lib/widgets/MyInputWidget.dart

39 lines
1.2 KiB
Dart
Raw Normal View History

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';
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);
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: [
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: [
ExpandedNumberInputWidget("Anfangshöhe", "in m", model.setStartHeight),
ExpandedNumberInputWidget("Endhöhe", "in m", model.setEndHeight),
2022-11-07 18:52:21 +01:00
],
),
ExpandedNumberInputWidget("Gewicht", "in kg", model.setWeight),
2022-11-07 18:52:21 +01:00
]
);
}
}