Stand 2024-12-09 - 2
This commit is contained in:
parent
26b1486bc6
commit
f4025af50b
13 changed files with 210 additions and 103 deletions
12
i18n/de.json
12
i18n/de.json
|
@ -11,8 +11,20 @@
|
||||||
"title": "Dashboard"
|
"title": "Dashboard"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"buttons": {
|
||||||
|
"delete": "Löschen",
|
||||||
|
"cancel": "Abbrechen",
|
||||||
|
"save": "Speichern"
|
||||||
|
},
|
||||||
"spacer": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
|
"spacer": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
|
||||||
},
|
},
|
||||||
|
"dashboard": {
|
||||||
|
"business": {
|
||||||
|
"area": {
|
||||||
|
"title_edit_area": "Fläche bearbeiten"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"start": {
|
"start": {
|
||||||
"links": {
|
"links": {
|
||||||
"massnahmen": {
|
"massnahmen": {
|
||||||
|
|
|
@ -145,8 +145,6 @@ class ListRepository {
|
||||||
void buildListMeasureSingle() {
|
void buildListMeasureSingle() {
|
||||||
List<MeasureGeneral> measuresAll = isar.measureGenerals.where().findAll();
|
List<MeasureGeneral> measuresAll = isar.measureGenerals.where().findAll();
|
||||||
|
|
||||||
List<ListMeasureSingle> lms = [];
|
|
||||||
|
|
||||||
isar.write((isar) {
|
isar.write((isar) {
|
||||||
isar.listMeasureSingles.clear();
|
isar.listMeasureSingles.clear();
|
||||||
});
|
});
|
||||||
|
@ -164,7 +162,7 @@ class ListRepository {
|
||||||
|
|
||||||
for (final cat in cats) {
|
for (final cat in cats) {
|
||||||
final ListMeasureSingle single = ListMeasureSingle()
|
final ListMeasureSingle single = ListMeasureSingle()
|
||||||
..id = isar.listMeasureSingles.autoIncrement()
|
..id = measure.id
|
||||||
..name = measure.name
|
..name = measure.name
|
||||||
..description = types.description
|
..description = types.description
|
||||||
..measureCategory = cat.measureCategory
|
..measureCategory = cat.measureCategory
|
||||||
|
@ -179,12 +177,6 @@ class ListRepository {
|
||||||
isar.listMeasureSingles.put(single);
|
isar.listMeasureSingles.put(single);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*final ListMeasureSingle single = ListMeasureSingle()
|
|
||||||
..id = isar.listMeasureSingles.autoIncrement()
|
|
||||||
..name = measure.name
|
|
||||||
..description = types.description
|
|
||||||
..measureCategory =*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,11 @@ import 'package:expansion_tile_card/expansion_tile_card.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_breadcrumb/flutter_breadcrumb.dart';
|
import 'package:flutter_breadcrumb/flutter_breadcrumb.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:isar/isar.dart';
|
||||||
import 'package:screen_breakpoints/screen_breakpoints.dart';
|
import 'package:screen_breakpoints/screen_breakpoints.dart';
|
||||||
|
|
||||||
import '../../../config/config.dart';
|
import '../../../config/config.dart';
|
||||||
|
import '../../../consts/consts.dart';
|
||||||
import '../../../packages/ambito_theme/ambito_theme.dart';
|
import '../../../packages/ambito_theme/ambito_theme.dart';
|
||||||
import '../../../widgets/appbar/ambito_appbar.dart';
|
import '../../../widgets/appbar/ambito_appbar.dart';
|
||||||
import '../../ambito_page.dart';
|
import '../../ambito_page.dart';
|
||||||
|
@ -35,7 +37,7 @@ class MeasureDetailPageState extends State<MeasureDetailPage> {
|
||||||
final ScrollController scrollController = ScrollController();
|
final ScrollController scrollController = ScrollController();
|
||||||
bool showBackToTopButton = false;
|
bool showBackToTopButton = false;
|
||||||
final Map<String, GlobalKey<ExpansionTileCardState>> expansionKeys = {};
|
final Map<String, GlobalKey<ExpansionTileCardState>> expansionKeys = {};
|
||||||
MeasureTypes? massnahme;
|
MeasureGeneral? measureGeneral;
|
||||||
List<Widget> contentItems = [];
|
List<Widget> contentItems = [];
|
||||||
final Set<String> visibleItems = {};
|
final Set<String> visibleItems = {};
|
||||||
bool collapsed = false;
|
bool collapsed = false;
|
||||||
|
@ -47,6 +49,15 @@ class MeasureDetailPageState extends State<MeasureDetailPage> {
|
||||||
//massnahme = MeasureRepository().get(int.parse(id)) as MeasureTypes;
|
//massnahme = MeasureRepository().get(int.parse(id)) as MeasureTypes;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
List<MeasureGeneral> generals = isar.measureGenerals.where().findAll();
|
||||||
|
|
||||||
|
logger.d(generals.map((el) => el.id));
|
||||||
|
|
||||||
|
measureGeneral =
|
||||||
|
isar.measureGenerals.where().idEqualTo(widget.id).findFirst();
|
||||||
|
|
||||||
|
logger.d(measureGeneral);
|
||||||
|
|
||||||
scrollController.addListener(() {
|
scrollController.addListener(() {
|
||||||
const showOffset = 10.0;
|
const showOffset = 10.0;
|
||||||
setState(
|
setState(
|
||||||
|
@ -63,7 +74,7 @@ class MeasureDetailPageState extends State<MeasureDetailPage> {
|
||||||
breakpoint: Breakpoint.fromContext(context),
|
breakpoint: Breakpoint.fromContext(context),
|
||||||
theme: theme,
|
theme: theme,
|
||||||
),
|
),
|
||||||
body: (context.breakpoint != myBreakpoints.sm)
|
/*body: (context.breakpoint != myBreakpoints.sm)
|
||||||
? _buildInfoPage(context, massnahme)
|
? _buildInfoPage(context, massnahme)
|
||||||
: _tabbedInfoPage(context, massnahme),
|
: _tabbedInfoPage(context, massnahme),
|
||||||
floatingActionButton: (context.breakpoint != myBreakpoints.sm)
|
floatingActionButton: (context.breakpoint != myBreakpoints.sm)
|
||||||
|
@ -83,7 +94,7 @@ class MeasureDetailPageState extends State<MeasureDetailPage> {
|
||||||
color: theme.currentColorScheme.onPrimary),
|
color: theme.currentColorScheme.onPrimary),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: null,
|
: null,*/
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
23
lib/src/widgets/buttons/cancel_button.dart
Normal file
23
lib/src/widgets/buttons/cancel_button.dart
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import 'package:ambito/src/extensions/extensions.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../packages/ambito_theme/ambito_theme.dart';
|
||||||
|
import 'outline_button.dart';
|
||||||
|
|
||||||
|
class CancelButton extends StatelessWidget {
|
||||||
|
const CancelButton({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final AmbitoTheme theme = getTheme(context);
|
||||||
|
return WidgetOutlineButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
title: context.translate('pages.general.buttons.cancel'),
|
||||||
|
backgroundColor: theme.currentColorScheme.tertiary,
|
||||||
|
foregroundColor: theme.currentColorScheme.error,
|
||||||
|
borderColor: theme.currentColorScheme.error,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
23
lib/src/widgets/buttons/delete_button.dart
Normal file
23
lib/src/widgets/buttons/delete_button.dart
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import 'package:ambito/src/extensions/extensions.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../packages/ambito_theme/ambito_theme.dart';
|
||||||
|
import 'outline_button.dart';
|
||||||
|
|
||||||
|
class DeleteButton extends StatelessWidget {
|
||||||
|
final VoidCallback onPressed;
|
||||||
|
|
||||||
|
const DeleteButton({super.key, required this.onPressed});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final AmbitoTheme theme = getTheme(context);
|
||||||
|
return WidgetOutlineButton(
|
||||||
|
onPressed: onPressed,
|
||||||
|
title: context.translate('pages.general.buttons.delete'),
|
||||||
|
backgroundColor: theme.currentColorScheme.error,
|
||||||
|
foregroundColor: theme.currentColorScheme.onError,
|
||||||
|
borderColor: theme.currentColorScheme.error,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
27
lib/src/widgets/buttons/delete_buttons_group.dart
Normal file
27
lib/src/widgets/buttons/delete_buttons_group.dart
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../packages/ambito_theme/ambito_theme.dart';
|
||||||
|
import 'cancel_button.dart';
|
||||||
|
import 'delete_button.dart';
|
||||||
|
|
||||||
|
class DeleteButtonsGroup extends StatelessWidget {
|
||||||
|
final VoidCallback onPressed;
|
||||||
|
|
||||||
|
const DeleteButtonsGroup({super.key, required this.onPressed});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final AmbitoTheme theme = getTheme(context);
|
||||||
|
return Align(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
const CancelButton(),
|
||||||
|
theme.horizontalSpacer,
|
||||||
|
DeleteButton(onPressed: onPressed),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
23
lib/src/widgets/buttons/save_button.dart
Normal file
23
lib/src/widgets/buttons/save_button.dart
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import 'package:ambito/src/extensions/extensions.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../packages/ambito_theme/ambito_theme.dart';
|
||||||
|
import 'outline_button.dart';
|
||||||
|
|
||||||
|
class SaveButton extends StatelessWidget {
|
||||||
|
final VoidCallback onPressed;
|
||||||
|
|
||||||
|
const SaveButton({super.key, required this.onPressed});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final AmbitoTheme theme = getTheme(context);
|
||||||
|
return WidgetOutlineButton(
|
||||||
|
onPressed: onPressed,
|
||||||
|
title: context.translate('pages.general.buttons.save'),
|
||||||
|
backgroundColor: theme.currentColorScheme.secondary,
|
||||||
|
foregroundColor: theme.currentColorScheme.onPrimary,
|
||||||
|
borderColor: theme.currentColorScheme.secondary,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
28
lib/src/widgets/buttons/save_buttons_group.dart
Normal file
28
lib/src/widgets/buttons/save_buttons_group.dart
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
import 'package:ambito/src/widgets/buttons/cancel_button.dart';
|
||||||
|
import 'package:ambito/src/widgets/buttons/save_button.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../packages/ambito_theme/ambito_theme.dart';
|
||||||
|
|
||||||
|
class SaveButtonsGroup extends StatelessWidget {
|
||||||
|
final VoidCallback onPressed;
|
||||||
|
|
||||||
|
const SaveButtonsGroup({super.key, required this.onPressed});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final AmbitoTheme theme = getTheme(context);
|
||||||
|
|
||||||
|
return Align(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
const CancelButton(),
|
||||||
|
theme.horizontalSpacer,
|
||||||
|
SaveButton(onPressed: onPressed),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,17 +16,19 @@ class TextButtonElement extends StatelessWidget {
|
||||||
|
|
||||||
return TextButton(
|
return TextButton(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
WidgetStateProperty.all(theme.currentColorScheme.secondary),
|
WidgetStateProperty.all(theme.currentColorScheme.secondary),
|
||||||
padding: WidgetStateProperty.all<EdgeInsets>(
|
padding: WidgetStateProperty.all<EdgeInsets>(
|
||||||
const EdgeInsets.all(16),
|
const EdgeInsets.all(16),
|
||||||
),
|
),
|
||||||
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
|
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
|
||||||
RoundedRectangleBorder(
|
RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
8.0,
|
8.0,
|
||||||
),
|
),
|
||||||
))),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
child: Text(
|
child: Text(
|
||||||
context.translate(title),
|
context.translate(title),
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
import 'package:ambito/src/widgets/buttons/delete_buttons_group.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../../../entity/area/area_repository.dart';
|
import '../../../entity/area/area_repository.dart';
|
||||||
import '../../../packages/ambito_api/base_api.dart';
|
import '../../../packages/ambito_api/base_api.dart';
|
||||||
import '../../../packages/ambito_theme/ambito_theme.dart';
|
import '../../../packages/ambito_theme/ambito_theme.dart';
|
||||||
import '../../buttons/outline_button.dart';
|
|
||||||
|
|
||||||
class DeleteAreaDialog extends StatelessWidget {
|
class DeleteAreaDialog extends StatelessWidget {
|
||||||
const DeleteAreaDialog({super.key, required this.id});
|
const DeleteAreaDialog({super.key, required this.id});
|
||||||
|
@ -45,37 +45,13 @@ class DeleteAreaDialog extends StatelessWidget {
|
||||||
style: theme.bodyMedium,
|
style: theme.bodyMedium,
|
||||||
),
|
),
|
||||||
theme.verticalSpacerMax,
|
theme.verticalSpacerMax,
|
||||||
Align(
|
DeleteButtonsGroup(onPressed: () {
|
||||||
alignment: Alignment.centerRight,
|
AreaRepository().delete(id);
|
||||||
child: Row(
|
BaseApi().deleteContent('area', id).then((_) {
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
Navigator.pop(context);
|
||||||
children: [
|
Get.offAndToNamed('/dashboard/flaechen/1');
|
||||||
WidgetOutlineButton(
|
});
|
||||||
onPressed: () {
|
}),
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
title: 'Abbrechen',
|
|
||||||
backgroundColor: theme.currentColorScheme.tertiary,
|
|
||||||
foregroundColor: theme.currentColorScheme.error,
|
|
||||||
borderColor: theme.currentColorScheme.error,
|
|
||||||
),
|
|
||||||
theme.horizontalSpacer,
|
|
||||||
WidgetOutlineButton(
|
|
||||||
onPressed: () {
|
|
||||||
AreaRepository().delete(id);
|
|
||||||
BaseApi().deleteContent('area', id).then((_) {
|
|
||||||
Navigator.pop(context);
|
|
||||||
Get.offAndToNamed('/dashboard/flaechen/1');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
title: 'Löschen',
|
|
||||||
backgroundColor: theme.currentColorScheme.error,
|
|
||||||
foregroundColor: theme.currentColorScheme.onError,
|
|
||||||
borderColor: theme.currentColorScheme.error,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:ambito/src/widgets/buttons/outline_button.dart';
|
import 'package:ambito/src/widgets/buttons/save_buttons_group.dart';
|
||||||
|
import 'package:ambito/src/widgets/texts/text_headline.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
|
@ -54,62 +55,29 @@ class EditAreaDialog extends StatelessWidget {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
theme.verticalSpacer,
|
theme.verticalSpacer,
|
||||||
Text(
|
const TextHeadline(
|
||||||
'Fläche bearbeiten',
|
text:
|
||||||
style: theme.headlineMedium.copyWith(
|
'pages.dashboard.business.area.title_edit_area'),
|
||||||
color: theme.currentColorScheme.onSurface,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
theme.verticalSpacer,
|
theme.verticalSpacer,
|
||||||
Align(
|
SaveButtonsGroup(onPressed: () {
|
||||||
alignment: Alignment.centerRight,
|
Area area = isar.areas.get(id)!;
|
||||||
child: Row(
|
area.description = _controllerDescription.value.text;
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
area.name = _controllerName.value.text;
|
||||||
children: [
|
area.size = _controllerSize.value.text;
|
||||||
WidgetOutlineButton(
|
AreaRepository().put(area);
|
||||||
onPressed: () {
|
BaseApi()
|
||||||
Navigator.pop(context);
|
.patchContent('area', id, area.toJson())
|
||||||
},
|
.then((_) {
|
||||||
title: 'Abbrechen',
|
Navigator.pop(context);
|
||||||
backgroundColor: theme
|
Get.offAndToNamed('/dashboard/flaechen/1');
|
||||||
.currentColorScheme.surface
|
});
|
||||||
.withOpacity(.1),
|
}),
|
||||||
foregroundColor:
|
|
||||||
theme.currentColorScheme.primary,
|
|
||||||
borderColor: theme.currentColorScheme.primary,
|
|
||||||
),
|
|
||||||
theme.horizontalSpacer,
|
|
||||||
WidgetOutlineButton(
|
|
||||||
onPressed: () {
|
|
||||||
Area area = isar.areas.get(id)!;
|
|
||||||
area.description =
|
|
||||||
_controllerDescription.value.text;
|
|
||||||
area.name = _controllerName.value.text;
|
|
||||||
area.size = _controllerSize.value.text;
|
|
||||||
AreaRepository().put(area);
|
|
||||||
BaseApi()
|
|
||||||
.patchContent('area', id, area.toJson())
|
|
||||||
.then((_) {
|
|
||||||
Navigator.pop(context);
|
|
||||||
Get.offAndToNamed('/dashboard/flaechen/1');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
title: 'Speichern',
|
|
||||||
backgroundColor:
|
|
||||||
theme.currentColorScheme.secondary,
|
|
||||||
foregroundColor:
|
|
||||||
theme.currentColorScheme.onPrimary,
|
|
||||||
borderColor: theme.currentColorScheme.secondary,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
theme.verticalSpacer,
|
theme.verticalSpacer,
|
||||||
Card(
|
Card(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
color: theme.currentColorScheme.tertiary,
|
color: theme.currentColorScheme.tertiary,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
|
0
lib/src/widgets/fields/text_field_with_controller.dart
Normal file
0
lib/src/widgets/fields/text_field_with_controller.dart
Normal file
22
lib/src/widgets/texts/text_headline.dart
Normal file
22
lib/src/widgets/texts/text_headline.dart
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:ambito/src/extensions/extensions.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../packages/ambito_theme/ambito_theme.dart';
|
||||||
|
|
||||||
|
class TextHeadline extends StatelessWidget {
|
||||||
|
const TextHeadline({super.key, required this.text});
|
||||||
|
|
||||||
|
final String text;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final AmbitoTheme theme = getTheme(context);
|
||||||
|
|
||||||
|
return Text(
|
||||||
|
context.translate(text),
|
||||||
|
style: theme.headlineMedium.copyWith(
|
||||||
|
color: theme.currentColorScheme.onSurface,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue