Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/custom-storage-locations-293 #294

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

tiptr
Copy link
Owner

@tiptr tiptr commented Jan 23, 2022

Closes #293
This also does some other minor improvements and bugfixes:

  • fixed dashboard leisure of the day -> not every day the same anymore
  • fixed timer playlist scroll bug
  • new placeholder, if playlist is empty
  • phase indicators only for productive phases in timer

@tiptr tiptr self-assigned this Jan 23, 2022
@tiptr tiptr added the flutter label Jan 23, 2022
@tiptr tiptr added this to the Future Releases milestone Jan 23, 2022
@tiptr tiptr changed the title feature/custom-storage-locations-293 WIP: feature/custom-storage-locations-293 Jan 23, 2022
@tiptr tiptr changed the title WIP: feature/custom-storage-locations-293 feature/custom-storage-locations-293 Jan 23, 2022
Copy link
Collaborator

@MarcEngelmannTUM MarcEngelmannTUM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments, where things could be improved, but those are minor. Otherwise, I did not have the time to fully test this, but the code looks good.

return SizedBox(
width: 150,
child: StepProgressIndicator(
totalSteps: totalProdSteps,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, a more adaptive Widget would be useful to prevent an overflow when selecting a large phasecount in the settings

.textStyle2
.withOnBackgroundHard
.withBold
.withOverflow(TextOverflow.ellipsis),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ellipsis is default, this line can be removed

activity.pathToImage ??
// For now, the crazy cat is the default when no path is present
'assets/leisure/leisure-fun-smiling-cats.svg',
color: Colors.cyan),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be the tertiary color

// Leisure description
Text(
activity.descriptionLong ?? activity.descriptionShort,
overflow: TextOverflow.visible,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a TextStyle called settingsInfoTextStyle to display longer descriptive texts. You can use it here (and rename it)

import 'package:shared_preferences/shared_preferences.dart';

class SharedPreferencesData {
static late SharedPreferences _prefs;
static late String _defaultStorageLocation;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default values are stored in a different file (settings_constants.dart). This class always returns nullables and the default value has to be used in the calling location, if null is returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom storage locations
2 participants