Stand 2024-11-18
This commit is contained in:
parent
f3d53c90e5
commit
f6990e4e12
10 changed files with 120 additions and 69 deletions
|
@ -50,7 +50,7 @@
|
|||
"title": "Förderungen"
|
||||
},
|
||||
"advisor": {
|
||||
"title": "Ansprechpartner"
|
||||
"title": "Berater"
|
||||
},
|
||||
"factsheet": {
|
||||
"title": "Factsheet",
|
||||
|
|
|
@ -166,6 +166,7 @@ extension MeasureExtension on Measure {
|
|||
return CachedNetworkImageProvider(files![0].url!);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
CachedNetworkImage? getFullImage() {
|
||||
|
|
|
@ -64,7 +64,7 @@ class AmbitoThemeLarge extends AmbitoTheme {
|
|||
letterSpacing: 0.1,
|
||||
),
|
||||
labelMedium: GoogleFonts.openSans(
|
||||
fontSize: 24,
|
||||
fontSize: 20,
|
||||
height: 1.33,
|
||||
fontWeight: FontWeight.w500,
|
||||
letterSpacing: 0.15,
|
||||
|
|
|
@ -125,31 +125,31 @@ class ActionDetailPageState extends State<ActionDetailPage> {
|
|||
Expanded(
|
||||
child: Column(children: [
|
||||
DescriptionCard(
|
||||
massnahme: massnahme!,
|
||||
massnahme: massnahme,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
BackgroundCard(
|
||||
massnahme: massnahme!,
|
||||
massnahme: massnahme,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
PresetsCard(
|
||||
massnahme: massnahme!,
|
||||
massnahme: massnahme,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
BiodiverisityCard(
|
||||
massnahme: massnahme!,
|
||||
massnahme: massnahme,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
CreationCard(
|
||||
massnahme: massnahme!,
|
||||
massnahme: massnahme,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
MaintenanceCard(
|
||||
massnahme: massnahme!,
|
||||
massnahme: massnahme,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
FundingCard(
|
||||
massnahme: massnahme!,
|
||||
massnahme: massnahme,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
]),
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import 'package:ambito/src/extensions/extensions.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_linkify/flutter_linkify.dart';
|
||||
import 'package:linkify/linkify.dart';
|
||||
|
||||
import '../../../../entity/entities.dart';
|
||||
import '../../../../packages/ambito_theme/ambito_theme.dart';
|
||||
|
@ -17,10 +19,10 @@ class AdvisorCard extends StatelessWidget {
|
|||
width: double.infinity,
|
||||
child: Card(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
elevation: 0,
|
||||
color: theme.currentColorScheme.tertiary,
|
||||
color: greenColors['primary']!.withOpacity(.1),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
|
@ -28,12 +30,28 @@ class AdvisorCard extends StatelessWidget {
|
|||
children: [
|
||||
Text(
|
||||
context.translate('page.actionDetailPage.advisor.title'),
|
||||
style: theme.currentThemeData.textTheme.titleMedium,
|
||||
style: theme.currentThemeData.textTheme.labelMedium
|
||||
?.copyWith(color: theme.currentColorScheme.primary),
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
theme.verticalSpacerSmall,
|
||||
Text(
|
||||
'Max Mustermann',
|
||||
style: theme.currentThemeData.textTheme.bodyMedium
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
Linkify(
|
||||
text: 'EMail: max@mustermann.de',
|
||||
style: theme.currentThemeData.textTheme.bodyMedium,
|
||||
linkifiers: const [
|
||||
EmailLinkifier(),
|
||||
],
|
||||
),
|
||||
Linkify(
|
||||
text: 'Tel: +4917666554433',
|
||||
style: theme.currentThemeData.textTheme.bodyMedium,
|
||||
linkifiers: const [
|
||||
PhoneNumberLinkifier(),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:ambito/src/extensions/extensions.dart';
|
||||
import 'package:expansion_tile_card/expansion_tile_card.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../entity/entities.dart';
|
||||
|
@ -15,44 +16,50 @@ class BackgroundCard extends StatelessWidget {
|
|||
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
child: Card(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0),
|
||||
),
|
||||
child: ExpansionTileCard(
|
||||
initiallyExpanded: true,
|
||||
elevation: 0,
|
||||
color: theme.currentColorScheme.secondary,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context.translate('page.actionDetailPage.background.title'),
|
||||
style: theme.currentThemeData.textTheme.titleMedium,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
Text(
|
||||
context.translate('page.actionDetailPage.background.areaType'),
|
||||
style: theme.currentThemeData.textTheme.titleSmall,
|
||||
),
|
||||
theme.verticalSpacerSmall,
|
||||
Text(
|
||||
massnahme.factsheetLocation.toString(),
|
||||
style: theme.currentThemeData.textTheme.bodyMedium,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
Text(
|
||||
context.translate('page.actionDetailPage.background.target'),
|
||||
style: theme.currentThemeData.textTheme.titleSmall,
|
||||
),
|
||||
theme.verticalSpacerSmall,
|
||||
Text(
|
||||
massnahme.factsheetTarget.toString(),
|
||||
style: theme.currentThemeData.textTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
expandedTextColor: theme.currentColorScheme.outline,
|
||||
baseColor: theme.currentColorScheme.secondary,
|
||||
expandedColor: theme.currentColorScheme.secondary,
|
||||
title: Text(
|
||||
context.translate('page.actionDetailPage.background.title'),
|
||||
style: theme.currentThemeData.textTheme.labelMedium,
|
||||
),
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
context
|
||||
.translate('page.actionDetailPage.background.areaType'),
|
||||
style: theme.currentThemeData.textTheme.labelSmall,
|
||||
),
|
||||
theme.verticalSpacerSmall,
|
||||
Text(
|
||||
massnahme.factsheetLocation.toString(),
|
||||
style: theme.currentThemeData.textTheme.bodyMedium,
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
Text(
|
||||
context
|
||||
.translate('page.actionDetailPage.background.target'),
|
||||
style: theme.currentThemeData.textTheme.titleSmall,
|
||||
),
|
||||
theme.verticalSpacerSmall,
|
||||
Text(
|
||||
massnahme.factsheetTarget.toString(),
|
||||
style: theme.currentThemeData.textTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:ambito/src/extensions/extensions.dart';
|
||||
import 'package:expansion_tile_card/expansion_tile_card.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
@ -16,24 +17,29 @@ class DescriptionCard extends StatelessWidget {
|
|||
return SizedBox(
|
||||
width: double.infinity,
|
||||
child: ExpansionTileCard(
|
||||
elevation: 0,
|
||||
baseColor: theme.currentColorScheme.secondary,
|
||||
title: Text(
|
||||
massnahme.name ?? '',
|
||||
style: theme.currentThemeData.textTheme.headlineMedium,
|
||||
),
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
theme.verticalSpacer,
|
||||
Text(
|
||||
massnahme.factsheetDefinition ?? '',
|
||||
style: theme.currentThemeData.textTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
initiallyExpanded: true,
|
||||
elevation: 0,
|
||||
expandedTextColor: theme.currentColorScheme.outline,
|
||||
baseColor: theme.currentColorScheme.secondary,
|
||||
expandedColor: theme.currentColorScheme.secondary,
|
||||
title: Text(
|
||||
context.translate('page.actionDetailPage.description.title'),
|
||||
style: theme.currentThemeData.textTheme.labelMedium,
|
||||
),
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
|
||||
child: Text(
|
||||
massnahme.factsheetDefinition ?? '',
|
||||
style: theme.currentThemeData.textTheme.bodyMedium,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@ class MaterialCard extends StatelessWidget {
|
|||
width: double.infinity,
|
||||
child: Card(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
elevation: 0,
|
||||
color: theme.currentColorScheme.tertiary,
|
||||
color: greenColors['primary']!.withOpacity(.1),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
|
@ -28,7 +28,8 @@ class MaterialCard extends StatelessWidget {
|
|||
children: [
|
||||
Text(
|
||||
context.translate('page.actionDetailPage.material.title'),
|
||||
style: theme.currentThemeData.textTheme.titleMedium,
|
||||
style: theme.currentThemeData.textTheme.labelMedium
|
||||
?.copyWith(color: theme.currentColorScheme.primary),
|
||||
),
|
||||
theme.verticalSpacer,
|
||||
_getSortedMaterials(context),
|
||||
|
|
16
pubspec.lock
16
pubspec.lock
|
@ -387,6 +387,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.36.2"
|
||||
flutter_linkify:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_linkify
|
||||
sha256: "74669e06a8f358fee4512b4320c0b80e51cffc496607931de68d28f099254073"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
@ -682,6 +690,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
linkify:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: linkify
|
||||
sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -56,6 +56,8 @@ dependencies:
|
|||
screen_breakpoints: ^1.0.5
|
||||
provider: ^6.1.2
|
||||
expansion_tile_card: ^3.0.0
|
||||
flutter_linkify: ^6.0.0
|
||||
linkify: ^5.0.0
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
|
|
Loading…
Reference in a new issue