Skip to content

Commit

Permalink
Fixed bug, improve UI
Browse files Browse the repository at this point in the history
  • Loading branch information
guyluz11 committed Jul 15, 2024
1 parent 23c5741 commit 191f486
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 23 deletions.
1 change: 0 additions & 1 deletion lib/presentation/atoms/animated_text_atom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class _AnimatedTextAtomState extends State<AnimatedTextAtom> {
TypewriterAnimatedText(
text,
textStyle: textTheme.headlineMedium,
speed: const Duration(milliseconds: 40),
),
],
onFinished: () {
Expand Down
13 changes: 8 additions & 5 deletions lib/presentation/atoms/progress_tracker_atom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ class ProgressTrackerAtom extends StatelessWidget {
bool active = true;

for (final String state in states) {
final bool isCurrentState = state == currentState;
statusList.add(
Status(
name: state,
icon: state == currentState ? FontAwesomeIcons.caretDown : null,
name: isCurrentState
? state[0].toUpperCase() + state.substring(1)
: state,
icon: isCurrentState ? FontAwesomeIcons.caretDown : null,
active: active,
),
);
if (state == currentState) {
if (isCurrentState) {
active = false;
}
}
Expand All @@ -33,8 +36,8 @@ class ProgressTrackerAtom extends StatelessWidget {
return ProgressTracker(
currentIndex: currentIndex,
statusList: statusList,
activeColor: colorScheme.onSurface,
inActiveColor: colorScheme.outlineVariant,
activeColor: colorScheme.primary,
inActiveColor: colorScheme.secondaryContainer,
);
}
}
29 changes: 16 additions & 13 deletions lib/presentation/organisms/intro/welcome_organism.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ class WelcomeOrganism extends StatelessWidget {
imageColor: AppThemeData.logoBackgroundColor,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const TextAtom(
'Approve all permissions for smooth experience',
),
ButtonAtom(
variant: ButtonVariant.mediumEmphasisOutlined,
text: 'Permissions',
onPressed: () => openAlertDialog(
context,
const PermissionsOrganism(),
),
),
],
),
const SeparatorAtom(),
const TextAtom(
'About the app',
Expand All @@ -43,19 +59,6 @@ class WelcomeOrganism extends StatelessWidget {
"Enjoy",
),
const SeparatorAtom(),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
ButtonAtom(
variant: ButtonVariant.mediumEmphasisOutlined,
text: 'Permissions',
onPressed: () => openAlertDialog(
context,
const PermissionsOrganism(),
),
),
],
),
],
),
),
Expand Down
9 changes: 5 additions & 4 deletions lib/presentation/organisms/timer_organism.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class TimerStateManager {
PlayerController.instance.play(SoundType.sessionCompleted);
VibrationController.instance.vibrate(VibrationType.medium);
case TimerState.breakTime:
break;
case TimerState.readyToStart:
PlayerController.instance.play(SoundType.breakEnded);
}
Expand Down Expand Up @@ -244,10 +245,10 @@ class TimerOrganismState extends State<TimerOrganism> {
}

enum TimerState {
study('Study'),
getReadyForBreak('Before Break'),
breakTime('Break Time'),
readyToStart('Complete'),
study('study'),
getReadyForBreak('transition'),
breakTime('break'),
readyToStart('done'),
;

const TimerState(this.spacedName);
Expand Down

0 comments on commit 191f486

Please sign in to comment.