mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-19 07:35:26 +02:00
improvements
This commit is contained in:
parent
107ad34406
commit
c6f22ab282
@ -4,10 +4,11 @@
|
|||||||
"generalError": "Ein Fehler ist aufgetreten",
|
"generalError": "Ein Fehler ist aufgetreten",
|
||||||
"generalCancelButtonLabel": "Abbrechen",
|
"generalCancelButtonLabel": "Abbrechen",
|
||||||
"generalContinueButtonLabel": "Weiter",
|
"generalContinueButtonLabel": "Weiter",
|
||||||
|
"generalSaveButtonLabel": "Speichern",
|
||||||
"generalUnderstoodButtonLabel": "OK",
|
"generalUnderstoodButtonLabel": "OK",
|
||||||
"generalLoadingLabel": "Wird geladen...",
|
"generalLoadingLabel": "Wird geladen...",
|
||||||
"generalSwipeForMore": "Wische hoch für mehr",
|
"generalSwipeForMore": "Wische hoch für mehr",
|
||||||
"generalSaveButtonLabel": "Speichern",
|
"generalSwipeDownToClose": "Wische runter um zu schließen",
|
||||||
|
|
||||||
"welcomeScreenDescription": "Finde heraus was du den ganzen Tag gemacht hast und erlebe Erinnerungen wieder, die du komplett vergessen hast!",
|
"welcomeScreenDescription": "Finde heraus was du den ganzen Tag gemacht hast und erlebe Erinnerungen wieder, die du komplett vergessen hast!",
|
||||||
"welcomeScreenSubtitle": "Was hab ich heute gemacht?",
|
"welcomeScreenSubtitle": "Was hab ich heute gemacht?",
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
"generalSaveButtonLabel": "Save",
|
"generalSaveButtonLabel": "Save",
|
||||||
"generalUnderstoodButtonLabel": "OK",
|
"generalUnderstoodButtonLabel": "OK",
|
||||||
"generalLoadingLabel": "Loading...",
|
"generalLoadingLabel": "Loading...",
|
||||||
"generalSwipeForMore": "Swipe up for more",
|
"generalSwipeUpForMore": "Swipe up for more",
|
||||||
|
"generalSwipeDownToClose": "Swipe down to close this sheet",
|
||||||
|
|
||||||
"welcomeScreenDescription": "Find out what you did all the days and unlock moments you completely forgot!",
|
"welcomeScreenDescription": "Find out what you did all the days and unlock moments you completely forgot!",
|
||||||
"welcomeScreenSubtitle": "What did I do today?",
|
"welcomeScreenSubtitle": "What did I do today?",
|
||||||
|
@ -98,7 +98,7 @@ class _MemoryMapScreenState extends State<MemoryMapScreen> with Loadable {
|
|||||||
const SheetIndicator(),
|
const SheetIndicator(),
|
||||||
const SizedBox(height: MEDIUM_SPACE),
|
const SizedBox(height: MEDIUM_SPACE),
|
||||||
Text(
|
Text(
|
||||||
localizations.generalSwipeForMore,
|
localizations.generalSwipeUpForMore,
|
||||||
style: getBodyTextTextStyle(context),
|
style: getBodyTextTextStyle(context),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -36,6 +36,8 @@ class MemorySheet extends StatefulWidget {
|
|||||||
final supabase = Supabase.instance.client;
|
final supabase = Supabase.instance.client;
|
||||||
|
|
||||||
class _MemorySheetState extends State<MemorySheet> with Loadable {
|
class _MemorySheetState extends State<MemorySheet> with Loadable {
|
||||||
|
bool isExpanded = false;
|
||||||
|
|
||||||
Future<void> deleteFile() async {
|
Future<void> deleteFile() async {
|
||||||
await FileManager.deleteFile(widget.memory.filePath);
|
await FileManager.deleteFile(widget.memory.filePath);
|
||||||
|
|
||||||
@ -130,6 +132,16 @@ class _MemorySheetState extends State<MemorySheet> with Loadable {
|
|||||||
final backgroundColor = getSheetColor(context);
|
final backgroundColor = getSheetColor(context);
|
||||||
|
|
||||||
return ExpandableBottomSheet(
|
return ExpandableBottomSheet(
|
||||||
|
onIsContractedCallback: () {
|
||||||
|
setState(() {
|
||||||
|
isExpanded = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onIsExtendedCallback: () {
|
||||||
|
setState(() {
|
||||||
|
isExpanded = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
background: GestureDetector(
|
background: GestureDetector(
|
||||||
onTap: () => Navigator.pop(context),
|
onTap: () => Navigator.pop(context),
|
||||||
),
|
),
|
||||||
@ -239,11 +251,24 @@ class _MemorySheetState extends State<MemorySheet> with Loadable {
|
|||||||
),
|
),
|
||||||
if (widget.memory.location != null) ...[
|
if (widget.memory.location != null) ...[
|
||||||
const SizedBox(height: SMALL_SPACE),
|
const SizedBox(height: SMALL_SPACE),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Icon(
|
||||||
|
isExpanded
|
||||||
|
? context.platformIcons.downArrow
|
||||||
|
: context.platformIcons.upArrow,
|
||||||
|
),
|
||||||
|
const SizedBox(width: TINY_SPACE),
|
||||||
Text(
|
Text(
|
||||||
localizations.generalSwipeForMore,
|
isExpanded
|
||||||
|
? localizations.generalSwipeDownToClose
|
||||||
|
: localizations.generalSwipeUpForMore,
|
||||||
style: getBodyTextTextStyle(context),
|
style: getBodyTextTextStyle(context),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -36,6 +36,7 @@ class HelpSheet extends StatefulWidget {
|
|||||||
|
|
||||||
class _HelpSheetState extends State<HelpSheet> {
|
class _HelpSheetState extends State<HelpSheet> {
|
||||||
bool isShowingSheet = false;
|
bool isShowingSheet = false;
|
||||||
|
BuildContext? buildContext;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -48,6 +49,15 @@ class _HelpSheetState extends State<HelpSheet> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
if (isShowingSheet && buildContext != null) {
|
||||||
|
Navigator.pop(buildContext!);
|
||||||
|
}
|
||||||
|
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didUpdateWidget(covariant HelpSheet oldWidget) {
|
void didUpdateWidget(covariant HelpSheet oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
@ -92,11 +102,23 @@ class _HelpSheetState extends State<HelpSheet> {
|
|||||||
semanticsDismissible: false,
|
semanticsDismissible: false,
|
||||||
),
|
),
|
||||||
context: context,
|
context: context,
|
||||||
builder: (_) => HelpSheetForm(
|
builder: (buildContext) {
|
||||||
|
this.buildContext = buildContext;
|
||||||
|
|
||||||
|
return WillPopScope(
|
||||||
|
onWillPop: () async {
|
||||||
|
Navigator.pop(buildContext);
|
||||||
|
Navigator.pop(context);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
child: HelpSheetForm(
|
||||||
helpContent: widget.helpContent,
|
helpContent: widget.helpContent,
|
||||||
title: widget.title,
|
title: widget.title,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
if (widget.onSheetHidden != null) {
|
if (widget.onSheetHidden != null) {
|
||||||
widget.onSheetHidden!();
|
widget.onSheetHidden!();
|
||||||
@ -118,7 +140,7 @@ class _HelpSheetState extends State<HelpSheet> {
|
|||||||
final hasSheetBeShownAlready =
|
final hasSheetBeShownAlready =
|
||||||
await UserHelpSheetsManager.getIfAlreadyShown(widget.helpID);
|
await UserHelpSheetsManager.getIfAlreadyShown(widget.helpID);
|
||||||
|
|
||||||
if (!hasSheetBeShownAlready) {
|
if (!hasSheetBeShownAlready && !isShowingSheet) {
|
||||||
showSheet();
|
showSheet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ class ModalSheet extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
padding: const EdgeInsets.symmetric(vertical: MEDIUM_SPACE),
|
padding: const EdgeInsets.only(top: MEDIUM_SPACE),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@ -29,8 +29,11 @@ class ModalSheet extends StatelessWidget {
|
|||||||
color: getSheetColor(context),
|
color: getSheetColor(context),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.symmetric(vertical: LARGE_SPACE),
|
padding: const EdgeInsets.symmetric(vertical: LARGE_SPACE),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: MEDIUM_SPACE),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
cupertino: (_, __) => CupertinoPopupSurface(
|
cupertino: (_, __) => CupertinoPopupSurface(
|
||||||
isSurfacePainted: false,
|
isSurfacePainted: false,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user