Stand 2024-11-18

This commit is contained in:
Jens Reinemuth 2024-11-18 16:07:50 +01:00
parent f3d53c90e5
commit f6990e4e12
10 changed files with 120 additions and 69 deletions

View file

@ -50,7 +50,7 @@
"title": "Förderungen"
},
"advisor": {
"title": "Ansprechpartner"
"title": "Berater"
},
"factsheet": {
"title": "Factsheet",

View file

@ -166,6 +166,7 @@ extension MeasureExtension on Measure {
return CachedNetworkImageProvider(files![0].url!);
}
}
return null;
}
CachedNetworkImage? getFullImage() {

View file

@ -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,

View file

@ -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,
]),

View file

@ -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(),
],
),
],
),

View file

@ -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,25 +16,28 @@ 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,
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.title'),
style: theme.currentThemeData.textTheme.titleMedium,
),
theme.verticalSpacer,
Text(
context.translate('page.actionDetailPage.background.areaType'),
style: theme.currentThemeData.textTheme.titleSmall,
context
.translate('page.actionDetailPage.background.areaType'),
style: theme.currentThemeData.textTheme.labelSmall,
),
theme.verticalSpacerSmall,
Text(
@ -42,7 +46,8 @@ class BackgroundCard extends StatelessWidget {
),
theme.verticalSpacer,
Text(
context.translate('page.actionDetailPage.background.target'),
context
.translate('page.actionDetailPage.background.target'),
style: theme.currentThemeData.textTheme.titleSmall,
),
theme.verticalSpacerSmall,
@ -54,6 +59,8 @@ class BackgroundCard extends StatelessWidget {
),
),
),
],
),
);
}
}

View file

@ -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(
initiallyExpanded: true,
elevation: 0,
expandedTextColor: theme.currentColorScheme.outline,
baseColor: theme.currentColorScheme.secondary,
expandedColor: theme.currentColorScheme.secondary,
title: Text(
massnahme.name ?? '',
style: theme.currentThemeData.textTheme.headlineMedium,
context.translate('page.actionDetailPage.description.title'),
style: theme.currentThemeData.textTheme.labelMedium,
),
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
theme.verticalSpacer,
Text(
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,
),
),
),
],
),
]),
);
}
}

View file

@ -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),

View file

@ -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:

View file

@ -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: