mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-18 15:25:27 +02:00
improvements
This commit is contained in:
parent
107ad34406
commit
c6f22ab282
@ -4,10 +4,11 @@
|
||||
"generalError": "Ein Fehler ist aufgetreten",
|
||||
"generalCancelButtonLabel": "Abbrechen",
|
||||
"generalContinueButtonLabel": "Weiter",
|
||||
"generalSaveButtonLabel": "Speichern",
|
||||
"generalUnderstoodButtonLabel": "OK",
|
||||
"generalLoadingLabel": "Wird geladen...",
|
||||
"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!",
|
||||
"welcomeScreenSubtitle": "Was hab ich heute gemacht?",
|
||||
|
@ -7,7 +7,8 @@
|
||||
"generalSaveButtonLabel": "Save",
|
||||
"generalUnderstoodButtonLabel": "OK",
|
||||
"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!",
|
||||
"welcomeScreenSubtitle": "What did I do today?",
|
||||
|
@ -98,7 +98,7 @@ class _MemoryMapScreenState extends State<MemoryMapScreen> with Loadable {
|
||||
const SheetIndicator(),
|
||||
const SizedBox(height: MEDIUM_SPACE),
|
||||
Text(
|
||||
localizations.generalSwipeForMore,
|
||||
localizations.generalSwipeUpForMore,
|
||||
style: getBodyTextTextStyle(context),
|
||||
),
|
||||
],
|
||||
|
@ -36,6 +36,8 @@ class MemorySheet extends StatefulWidget {
|
||||
final supabase = Supabase.instance.client;
|
||||
|
||||
class _MemorySheetState extends State<MemorySheet> with Loadable {
|
||||
bool isExpanded = false;
|
||||
|
||||
Future<void> deleteFile() async {
|
||||
await FileManager.deleteFile(widget.memory.filePath);
|
||||
|
||||
@ -130,6 +132,16 @@ class _MemorySheetState extends State<MemorySheet> with Loadable {
|
||||
final backgroundColor = getSheetColor(context);
|
||||
|
||||
return ExpandableBottomSheet(
|
||||
onIsContractedCallback: () {
|
||||
setState(() {
|
||||
isExpanded = false;
|
||||
});
|
||||
},
|
||||
onIsExtendedCallback: () {
|
||||
setState(() {
|
||||
isExpanded = true;
|
||||
});
|
||||
},
|
||||
background: GestureDetector(
|
||||
onTap: () => Navigator.pop(context),
|
||||
),
|
||||
@ -239,9 +251,22 @@ class _MemorySheetState extends State<MemorySheet> with Loadable {
|
||||
),
|
||||
if (widget.memory.location != null) ...[
|
||||
const SizedBox(height: SMALL_SPACE),
|
||||
Text(
|
||||
localizations.generalSwipeForMore,
|
||||
style: getBodyTextTextStyle(context),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
isExpanded
|
||||
? context.platformIcons.downArrow
|
||||
: context.platformIcons.upArrow,
|
||||
),
|
||||
const SizedBox(width: TINY_SPACE),
|
||||
Text(
|
||||
isExpanded
|
||||
? localizations.generalSwipeDownToClose
|
||||
: localizations.generalSwipeUpForMore,
|
||||
style: getBodyTextTextStyle(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
|
@ -36,6 +36,7 @@ class HelpSheet extends StatefulWidget {
|
||||
|
||||
class _HelpSheetState extends State<HelpSheet> {
|
||||
bool isShowingSheet = false;
|
||||
BuildContext? buildContext;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -48,6 +49,15 @@ class _HelpSheetState extends State<HelpSheet> {
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
if (isShowingSheet && buildContext != null) {
|
||||
Navigator.pop(buildContext!);
|
||||
}
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(covariant HelpSheet oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
@ -92,10 +102,22 @@ class _HelpSheetState extends State<HelpSheet> {
|
||||
semanticsDismissible: false,
|
||||
),
|
||||
context: context,
|
||||
builder: (_) => HelpSheetForm(
|
||||
helpContent: widget.helpContent,
|
||||
title: widget.title,
|
||||
),
|
||||
builder: (buildContext) {
|
||||
this.buildContext = buildContext;
|
||||
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
Navigator.pop(buildContext);
|
||||
Navigator.pop(context);
|
||||
|
||||
return false;
|
||||
},
|
||||
child: HelpSheetForm(
|
||||
helpContent: widget.helpContent,
|
||||
title: widget.title,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
if (widget.onSheetHidden != null) {
|
||||
@ -118,7 +140,7 @@ class _HelpSheetState extends State<HelpSheet> {
|
||||
final hasSheetBeShownAlready =
|
||||
await UserHelpSheetsManager.getIfAlreadyShown(widget.helpID);
|
||||
|
||||
if (!hasSheetBeShownAlready) {
|
||||
if (!hasSheetBeShownAlready && !isShowingSheet) {
|
||||
showSheet();
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class ModalSheet extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(vertical: MEDIUM_SPACE),
|
||||
padding: const EdgeInsets.only(top: MEDIUM_SPACE),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@ -29,7 +29,10 @@ class ModalSheet extends StatelessWidget {
|
||||
color: getSheetColor(context),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: LARGE_SPACE),
|
||||
child: child,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: MEDIUM_SPACE),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
cupertino: (_, __) => CupertinoPopupSurface(
|
||||
isSurfacePainted: false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user