The To-Do App is a Flutter-based application designed to help users manage their tasks efficiently. It allows users to create tasks with scheduled notifications, toggle between light and dark themes, and view their tasks in a list. The app ensures that notifications for tasks are sent even if the app is inactive or closed.
- Add Tasks: Users can enter tasks and set a due date and time.
- Scheduled Notifications: Notifications are scheduled and sent even if the app is not running.
- Theming: Users can switch between light and dark themes.
- Task Management: View a list of tasks, and delete them when completed.
To set up the project on your local machine, follow these instructions:
Ensure you have the following installed:
- Flutter SDK
- Dart SDK
- Android Studio or Visual Studio Code with Flutter and Dart plugins
Clone the repository to your local machine:
git clone https://github.com/yourusername/todoapp.git
cd todoappNavigate to the project directory and install the required dependencies:
flutter pub getTo run the app on an emulator or a connected device, use:
flutter run-
Permissions and Services: Update your
AndroidManifest.xmlfile to include the necessary permissions and services:<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <application android:label="To-Do App" android:icon="@mipmap/ic_launcher"> <receiver android:name="me.carda.notifications.notifications.NotificationReceiver" android:exported="true"/> <service android:name="me.carda.notifications.services.NotificationService" android:exported="true"/> </application>
-
Notification Channel: Ensure you have set up a notification channel in your code.
-
Request Permissions: Request notification permissions in your iOS app. Update
Info.plistto include:<key>UIBackgroundModes</key> <array> <string>fetch</string> <string>remote-notification</string> </array>
-
Local Notifications: Make sure to configure local notifications for iOS as required.
- Entry Point: Sets up the application, initializes notifications, and handles theme switching.
- UI for Tasks: Displays the list of tasks, allows users to add new tasks, and manage existing ones.
- Notification Handling: Schedules notifications for tasks based on user input.
- Model Class: Represents a task with a title and due date/time.
- flutter_local_notifications: Handles local notifications.
- intl: Provides internationalization and localization support for formatting dates and times.
- timezone: Manages timezones for scheduling notifications.
- Adding a Task: Enter the task title and select a due date and time. The task will be added to the list and a notification will be scheduled.
- Deleting a Task: Swipe to delete tasks from the list.
- Toggling Themes: Use the app bar button to switch between light and dark themes.
We welcome contributions to improve the app. To contribute:
- Fork the Repository: Create your own copy of the project.
- Create a Branch: Work on a new feature or bug fix in a separate branch.
- Submit a Pull Request: Submit a pull request with a description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions, issues, or suggestions, please open an issue on the GitHub repository or contact me at muhammadasimchattha@gmail.com.