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

NitroXen minor fixed #1

Merged
merged 4 commits into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/app/age_calculate/age_calculator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class _AgeCalculatorState extends State<AgeCalculator> {
}

setState(() {
_calculatedAge = "$years years ||$months months||$days days";
_calculatedAge = "$years years $months months $days days";
});
}

Expand Down Expand Up @@ -101,7 +101,7 @@ class _AgeCalculatorState extends State<AgeCalculator> {
child: Center(
child: Text(
_selectedDate == null
? "0 years ||0 months||0 days"
? "0 years 0 months 0 days"
: _calculatedAge,
style: const TextStyle(
fontSize: 22,
Expand Down
11 changes: 9 additions & 2 deletions lib/app/countdown_timer/countdown_timer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ class _CountdownTimerState extends State<CountdownTimer> {
_isRunning = true;
});

_timer = Timer.periodic(const Duration(milliseconds: 10), (timer) {
_timer = Timer.periodic(const Duration(milliseconds: 100), (timer) {
if (_milliseconds > 0) {
setState(() {
_milliseconds -= 10;
_milliseconds -= 100;
});
_saveTimerState();
} else {
Expand Down Expand Up @@ -83,6 +83,13 @@ class _CountdownTimerState extends State<CountdownTimer> {
_saveTimerState();
}

@override
void dispose() {
_resetTimer();

super.dispose();
}

String _formatTime(int milliseconds) {
final hours = (milliseconds ~/ 3600000).toString().padLeft(2, '0');
final minutes = ((milliseconds ~/ 60000) % 60).toString().padLeft(2, '0');
Expand Down
10 changes: 8 additions & 2 deletions lib/app/cube_timer/cube_timer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class _TimerStateApp extends State<TimerApp> {
_isRunning = true;
});

_timer = Timer.periodic(const Duration(milliseconds: 10), (timer) {
_timer = Timer.periodic(const Duration(milliseconds: 100), (timer) {
setState(() {
_milliseconds += 10;
_milliseconds += 100;
});
_saveTimerState();
});
Expand All @@ -55,6 +55,12 @@ class _TimerStateApp extends State<TimerApp> {
});
}

@override
void dispose() {
_resetTimer();
super.dispose();
}

String _formatTime(int milliseconds) {
final minutes = (milliseconds ~/ 60000).toString().padLeft(2, '0');
final seconds = ((milliseconds ~/ 1000) % 60).toString().padLeft(2, '0');
Expand Down
2 changes: 1 addition & 1 deletion lib/screen/home/screen/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class _HomePageState extends State<HomePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 15),
HomePageText(text: 'Calculetor'),
HomePageText(text: 'Calculator'),
SizedBox(height: 10),
],
),
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,10 @@ packages:
dependency: transitive
description:
name: uuid
sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90"
sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77
url: "https://pub.dev"
source: hosted
version: "4.4.2"
version: "4.5.0"
vector_math:
dependency: transitive
description:
Expand Down