Skip to content

Commit

Permalink
Task Done Feature Enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-Thakur-369 committed Nov 7, 2023
1 parent e9018a2 commit 8d6cb65
Show file tree
Hide file tree
Showing 24 changed files with 1,664 additions and 1,067 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
"java.configuration.updateBuildConfiguration": "disabled"
}
5 changes: 4 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ flutter {

dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
}
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21'
classpath 'com.google.gms:google-services:4.3.10'
}
8 changes: 6 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
android:label="todo"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:showWhenLocked="true"
android:turnScreenOn="true"
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
Expand All @@ -19,10 +23,10 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
Expand Down
12 changes: 0 additions & 12 deletions android/app/src/main/res/drawable/launch_background.xml

This file was deleted.

2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ subprojects {

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
5 changes: 3 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Mon Nov 06 23:48:39 IST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
31 changes: 25 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ PODS:
- BoringSSL-GRPC/Implementation (0.0.24):
- BoringSSL-GRPC/Interface (= 0.0.24)
- BoringSSL-GRPC/Interface (0.0.24)
- cloud_firestore (4.12.1):
- cloud_firestore (4.12.2):
- Firebase/Firestore (= 10.16.0)
- firebase_core
- Flutter
Expand All @@ -653,11 +653,11 @@ PODS:
- Firebase/Firestore (10.16.0):
- Firebase/CoreOnly
- FirebaseFirestore (~> 10.16.0)
- firebase_auth (4.12.0):
- firebase_auth (4.12.1):
- Firebase/Auth (= 10.16.0)
- firebase_core
- Flutter
- firebase_core (2.20.0):
- firebase_core (2.21.0):
- Firebase/CoreOnly (= 10.16.0)
- Flutter
- FirebaseAppCheckInterop (10.17.0)
Expand Down Expand Up @@ -690,6 +690,8 @@ PODS:
- Flutter (1.0.0)
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_share (0.0.1):
- Flutter
- fluttertoast (0.0.2):
- Flutter
- Toast
Expand Down Expand Up @@ -786,8 +788,13 @@ PODS:
- nanopb/encode (= 2.30909.0)
- nanopb/decode (2.30909.0)
- nanopb/encode (2.30909.0)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- PromisesObjC (2.3.1)
- RecaptchaInterop (100.0.0)
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
Expand All @@ -799,8 +806,11 @@ DEPENDENCIES:
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- Flutter (from `Flutter`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_share (from `.symlinks/plugins/flutter_share/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)

SPEC REPOS:
Expand Down Expand Up @@ -837,28 +847,35 @@ EXTERNAL SOURCES:
:path: Flutter
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_share:
:path: ".symlinks/plugins/flutter_share/ios"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
google_sign_in_ios:
:path: ".symlinks/plugins/google_sign_in_ios/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"

SPEC CHECKSUMS:
abseil: 926fb7a82dc6d2b8e1f2ed7f3a718bce691d1e46
AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570
BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33
cloud_firestore: abc819b936be92e6167aec1a8983d1e48ded2674
cloud_firestore: 8adb36c2bc754352c717984153ecd7e6c6898047
Firebase: 25899099b77d255a636e3579c3d9dce10ec150d5
firebase_auth: 015dab4ffe9e4d97f7d84a3373ad4c8a7712c5c7
firebase_core: 2e0e89436a00b664a23bebb08859e5fede7215e9
firebase_auth: ff474dcf17bee5762106162e0791433024890ada
firebase_core: 68027ba03585e3efe1608e35d3ab2777a64eabe9
FirebaseAppCheckInterop: 534d033d8d0436b4ab066a8205013d271e18a2b9
FirebaseAuth: 3862d87d4d58deff08f705d471896a2f66e8bbf0
FirebaseCore: 65a801af84cca84361ef9eac3fd868656968a53b
FirebaseCoreInternal: 2cf9202e226e3f78d2bf6d56c472686b935bfb7f
FirebaseFirestore: 17bd5c8a0ea4be0fcae5a6f95f817983623adb4a
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_share: 4be0208963c60b537e6255ed2ce1faae61cd9ac2
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
google_sign_in_ios: 1256ff9d941db546373826966720b0c24804bcdd
GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a
Expand All @@ -869,8 +886,10 @@ SPEC CHECKSUMS:
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2
leveldb-library: f03246171cce0484482ec291f88b6d563699ee06
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196

Expand Down
11 changes: 11 additions & 0 deletions ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
import UIKit
import Flutter
import flutter_local_notifications

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in
GeneratedPluginRegistrant.register(with: registry)
}
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}

GeneratedPluginRegistrant.register(with: self)
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
10 changes: 7 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ import 'package:todo/providers/time_provider.dart';
import 'package:todo/screens/home_screen.dart';
import 'package:todo/screens/signin_screen.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:todo/utilities/notification_service.dart';
import 'firebase_options.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
NotificationService().initNotification();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);

runApp(
MultiProvider(
providers: [
Expand All @@ -27,12 +30,13 @@ void main() async {
ChangeNotifierProvider(
create: (context) => DatesProvider(),
),
ChangeNotifierProvider(
ChangeNotifierProvider(
create: (context) => SelectedBoxProvider(),
),
ChangeNotifierProvider(
ChangeNotifierProvider(
create: (context) => TimeProvider(),
),ChangeNotifierProvider(
),
ChangeNotifierProvider(
create: (context) => TaskProvider(),
),
],
Expand Down
10 changes: 5 additions & 5 deletions lib/screens/bottomsheet_updatetask.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TextEditingController reminder = TextEditingController();

AdditionslFeature feature = AdditionslFeature();

final _formkey1 = GlobalKey<FormState>();
final _formkey3 = GlobalKey<FormState>();

List<String> options = [
'5 Minutes early',
Expand All @@ -33,7 +33,7 @@ List<String> options = [

Future<void> Updatetask(String docId, BuildContext context) async {
print("running program");
if (_formkey1.currentState != null && _formkey1.currentState!.validate()) {
if (_formkey3.currentState != null && _formkey3.currentState!.validate()) {
NoteModel n = NoteModel(
id: docId,
title: title.text,
Expand Down Expand Up @@ -178,7 +178,7 @@ void updatesheet(BuildContext context, String docId, String uid) async {
Padding(
padding: const EdgeInsets.all(10.0),
child: Form(
key: _formkey1,
key: _formkey3,
child: Column(
children: [
CustomTextFormField(
Expand Down Expand Up @@ -362,8 +362,8 @@ void updatesheet(BuildContext context, String docId, String uid) async {
CustomElevatedButton(
message: "Update Task",
function: () async {
if (_formkey1.currentState != null &&
_formkey1.currentState!.validate()) {
if (_formkey3.currentState != null &&
_formkey3.currentState!.validate()) {
await Updatetask(docId, context);
}
}),
Expand Down
Loading

0 comments on commit 8d6cb65

Please sign in to comment.