2022-11-09 01:47:40 +01:00
|
|
|
import 'package:energy/widgets/InputFieldWidget.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
import '../models/CalculateModels.dart';
|
|
|
|
|
|
|
|
class InputWidget extends StatelessWidget {
|
|
|
|
const InputWidget({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final model = Provider.of<CalculateModels>(context);
|
|
|
|
|
|
|
|
return Column(children: [
|
|
|
|
Row(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: AppBar(
|
|
|
|
automaticallyImplyLeading: false,
|
|
|
|
title: const Text(
|
2022-11-09 02:19:45 +01:00
|
|
|
"Bitte geben Sie die Werte an die Berechent werden sollen",
|
2022-11-09 01:47:40 +01:00
|
|
|
),
|
|
|
|
)),
|
|
|
|
]),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
Row(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
InputFieldWidget("Anfangsgeschwindigkeit", "Eingabe in m/s",
|
|
|
|
model.setStartVelocity),
|
|
|
|
const SizedBox(width: 5),
|
|
|
|
InputFieldWidget(
|
|
|
|
"Endgeschwindigkeit", "Eingabe in m/s", model.setEndVelocity)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
Row(
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
InputFieldWidget(
|
|
|
|
"Anfangshöhe", " Eingabe in m", model.setStartHeight),
|
|
|
|
const SizedBox(width: 5),
|
|
|
|
InputFieldWidget("Endhöhe", "Eingabe in m", model.setEndHeight),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
InputFieldWidget("Gewicht", "Eingabe in kg", model.setWeight),
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|