Skip to content

Commit

Permalink
Merge pull request #1 from Kheemwel/dev
Browse files Browse the repository at this point in the history
feat: v2.0 release candidate 1
  • Loading branch information
Kheemwel authored Aug 15, 2024
2 parents 57b152b + f1a386c commit b9e236c
Show file tree
Hide file tree
Showing 103 changed files with 4,749 additions and 616 deletions.
25 changes: 5 additions & 20 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "68bfaea224880b488c617afe30ab12091ea8fa4e"
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
channel: "stable"

project_type: app
Expand All @@ -13,26 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: android
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: ios
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: linux
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: macos
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: web
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
- platform: windows
create_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
base_revision: 68bfaea224880b488c617afe30ab12091ea8fa4e
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49

# User provided section

Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"program": "lib/main.dart",
"deviceId": "chrome",
"args": [
"--webport",
"5050"
"--web-port",
"8880"
]
},
{
Expand Down
13 changes: 10 additions & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>

<application
android:label="DTR App"
android:label="Daily Time Record"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:requestLegacyExternalStorage="true"
>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fonts/Nunito-Black.ttf
Binary file not shown.
Binary file added assets/fonts/Nunito-Bold.ttf
Binary file not shown.
Binary file added assets/fonts/Nunito-ExtraBold.ttf
Binary file not shown.
Binary file added assets/fonts/Nunito-ExtraLight.ttf
Binary file not shown.
Binary file added assets/fonts/Nunito-Italic.ttf
Binary file not shown.
Binary file added assets/fonts/Nunito-Light.ttf
Binary file not shown.
Binary file added assets/fonts/Nunito-Medium.ttf
Binary file not shown.
Binary file added assets/fonts/Nunito-Regular.ttf
Binary file not shown.
Binary file added assets/fonts/Nunito-SemiBold.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Black.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Bold.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Italic.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Light.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Medium.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Regular.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Thin.ttf
Binary file not shown.
3 changes: 3 additions & 0 deletions assets/icons/icon_back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/icon_calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/icon_delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/icon_guide_arrow_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/icon_guide_arrow_up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/icon_home.svg
Binary file added assets/images/app_logo.png
Binary file added assets/images/clapping_hands.png
Binary file added assets/images/party_cone.png
179 changes: 0 additions & 179 deletions lib/calculator_screen.dart

This file was deleted.

8 changes: 8 additions & 0 deletions lib/core/api/datetime_api.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:intl/intl.dart';

extension DateToString on DateTime {
/// Format DateTime to a string using the provided format
String formatToString({String format = 'MM/dd/yyyy'}) {
return DateFormat(format).format(this);
}
}
8 changes: 8 additions & 0 deletions lib/core/api/double_api.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extension DoubleFormatting on double {
String formatToString() {
final formattedValue = toStringAsFixed(2); // Format with two decimal places
final withoutTrailingZeros = formattedValue.replaceAll(
RegExp(r'\.?0+$'), ''); // Remove decimal places if it is only zero
return withoutTrailingZeros;
}
}
34 changes: 34 additions & 0 deletions lib/core/api/timeofday_api.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';

extension TimeOfDayExtensions on TimeOfDay {
/// Convert TimeOfDay to DateTime for formatting
DateTime _toDateTime() {
final now = DateTime.now();
return DateTime(now.year, now.month, now.day, hour, minute);
}

/// Format TimeOfDay to a string using the provided format
String formatToString({String format = 'HH:mm'}) {
final dateTime = _toDateTime();
return DateFormat(format).format(dateTime);
}

/// Check if the time is after the inputted TimeOfDay
bool isAfter(TimeOfDay other) {
final now = DateTime.now();
final thisDateTime = DateTime(now.year, now.month, now.day, hour, minute);
final otherDateTime = DateTime(now.year, now.month, now.day, other.hour, other.minute);

return thisDateTime.isAfter(otherDateTime);
}

/// Check if the time is before the inputted TimeOfDay
bool isBefore(TimeOfDay other) {
final now = DateTime.now();
final thisDateTime = DateTime(now.year, now.month, now.day, hour, minute);
final otherDateTime = DateTime(now.year, now.month, now.day, other.hour, other.minute);

return thisDateTime.isBefore(otherDateTime);
}
}
25 changes: 25 additions & 0 deletions lib/core/constants.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const appLogo = 'assets/images/app_logo.png';
const clappingHands = 'assets/images/clapping_hands.png';
const partyCone = 'assets/images/party_cone.png';

const iconHome = 'assets/icons/icon_home.svg';
const iconDelete = 'assets/icons/icon_delete.svg';
const iconCalendar = 'assets/icons/icon_calendar.svg';
const iconBack = 'assets/icons/icon_back.svg';
const iconGuideArrowUp = 'assets/icons/icon_guide_arrow_up.svg';
const iconGuideArrowDown = 'assets/icons/icon_guide_arrow_down.svg';

const militaryHourFormat = 'HH:mm';

/// List of date formats
final Map<String, String> dateFormats = {
'MM/dd/yyyy': 'MM/dd/yyyy (12/25/2024)',
'yyyy-MM-dd': 'yyyy-MM-dd (2024-12-25)',
'MM-dd-yyyy': 'MM-dd-yyyy (12-25-2024)',
'MMM dd, yyyy': 'MMM dd, yyyy (Dec 25, 2024)',
'MMMM dd, yyyy': 'MMMM dd, yyyy (December 25, 2024)',
'EEEE, MMMM dd, yyyy': 'EEEE, MMMM dd, yyyy (wednesday, December, 25, 2024)',
};

/// List of time formats
final Map<String, String> timeFormats = {'h:mm a': '12-Hour Clock', 'HH:mm': '24-Hour Clock'};
Loading

0 comments on commit b9e236c

Please sign in to comment.