simbrief own card in ui

This commit is contained in:
2024-11-08 23:02:28 +01:00
parent 4ab8b70524
commit bcd10ed512

View File

@@ -220,27 +220,72 @@ class ExpectationInputPageState extends State<ExpectationInputPage> {
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: Column( child: Column(
children: [ children: [
const Card( // IntrinsicHeight Widget hinzufügen
elevation: 2, IntrinsicHeight(
child: Padding( child: Row(
padding: EdgeInsets.all(16.0), crossAxisAlignment: CrossAxisAlignment.stretch, // Stretch hinzufügen
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, // Welcome Card - nimmt 60% der Breite
children: [ Expanded(
Text( flex: 3,
'Welcome to IFR Buddy!', child: Card(
style: TextStyle( elevation: 2,
fontSize: 18, fontWeight: FontWeight.bold), child: Padding(
textAlign: TextAlign.left, padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Text(
'Welcome to IFR Buddy!',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
SizedBox(height: 10),
Text(
'Just an easy tool for writing down IFR clearances without a pen.',
style: TextStyle(fontSize: 16),
),
],
),
),
), ),
SizedBox(height: 10), ),
Text( const SizedBox(width: 16), // Abstand zwischen den Cards
'Just an easy tool for writing down IFR clearances without a pen.', // SimBrief Card - nimmt 40% der Breite
style: TextStyle(fontSize: 16), Expanded(
textAlign: TextAlign.left, flex: 2,
child: Card(
elevation: 2,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'SimBrief Import',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const SizedBox(height: 10),
TextFormField(
controller: _simbriefIdController,
decoration: const InputDecoration(
labelText: 'SimBrief Pilot ID',
border: OutlineInputBorder(),
),
),
const SizedBox(height: 10),
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: _fetchSimbriefData,
child: const Text('Load SimBrief Data'),
),
),
],
),
),
), ),
], ),
), ],
), ),
), ),
const SizedBox(height: 16), const SizedBox(height: 16),