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