From f3e97ce8d18019dcd280a96225a02b6928d20888 Mon Sep 17 00:00:00 2001 From: Hesham Al Nahas Date: Tue, 10 Dec 2024 15:41:02 +0200 Subject: [PATCH] fix all warning --- .vscode/settings.json | 6 ++++++ lib/models/FolderNameDialog.dart | 5 +---- lib/models/NoteButton.dart | 5 ++--- lib/models/isRtlBackIcon.dart | 1 + lib/models/popupMenu.dart | 3 ++- lib/{prioityColors.dart => priorityColors.dart} | 0 lib/screens/EditNotePage.dart | 1 + lib/screens/notePage/NotePage.dart | 2 +- lib/screens/notePage/widgets/task.dart | 2 +- pubspec.yaml | 2 +- 10 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 .vscode/settings.json rename lib/{prioityColors.dart => priorityColors.dart} (100%) diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..23560ef --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "cSpell.words": [ + "Amiri", + "Jozoor" + ] +} \ No newline at end of file diff --git a/lib/models/FolderNameDialog.dart b/lib/models/FolderNameDialog.dart index 4c64b3c..a7b0d67 100644 --- a/lib/models/FolderNameDialog.dart +++ b/lib/models/FolderNameDialog.dart @@ -6,6 +6,7 @@ import '../functions/isRtlTextDirection.dart'; import '../translations/translations.dart'; import 'MultiLineText.dart'; +// ignore: must_be_immutable class FolderNameDialog extends StatelessWidget { final Map locale; final Function onSubmit; @@ -102,8 +103,4 @@ class FolderNameDialog extends StatelessWidget { ); } - @override - void dispose() { - folderNameController.dispose; - } } diff --git a/lib/models/NoteButton.dart b/lib/models/NoteButton.dart index 47c5672..29c0c96 100644 --- a/lib/models/NoteButton.dart +++ b/lib/models/NoteButton.dart @@ -4,9 +4,8 @@ import 'package:note_files/collection/Note.dart'; import 'package:note_files/functions/boolFn.dart'; import 'package:note_files/requiredData.dart'; -import '../collection/isarCURD.dart'; import '../models/FolderOrNoteButton.dart'; -import '../prioityColors.dart'; +import '../priorityColors.dart'; import '../screens/notePage/NotePage.dart'; import 'FadeRoute.dart'; import 'MultiLineText.dart'; @@ -36,7 +35,7 @@ class NoteButton extends StatelessWidget { final String noteTime = formatDate(note.date!, [yy, "/", mm, "/", dd, " ", hh, ":", nn]); final String noteContent = note.content??""; final int noteId = note.id; - final IsarService db = requiredData.db; + // final IsarService db = requiredData.db; final TextDirection titleDirection = note.isTitleRtl??false ? TextDirection.rtl :TextDirection.ltr; final TextDirection contentDirection = note.isContentRtl??false ? TextDirection.rtl :TextDirection.ltr; final int? parentFolderId = note.parentFolderId; diff --git a/lib/models/isRtlBackIcon.dart b/lib/models/isRtlBackIcon.dart index 6ee1b8a..e643bfd 100644 --- a/lib/models/isRtlBackIcon.dart +++ b/lib/models/isRtlBackIcon.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; +// ignore: must_be_immutable class IsRtlBackIcon extends StatelessWidget { bool isRtl; IsRtlBackIcon({super.key, this.isRtl = false}); diff --git a/lib/models/popupMenu.dart b/lib/models/popupMenu.dart index 82c60d0..7042d96 100644 --- a/lib/models/popupMenu.dart +++ b/lib/models/popupMenu.dart @@ -3,6 +3,7 @@ import 'package:provider/provider.dart'; import '../provider/searchProvider.dart'; +// ignore: must_be_immutable class MyPopUpMenu extends StatefulWidget { String initialText; final List popList; @@ -40,6 +41,6 @@ class _MyPopUpMenuState extends State { ), ), ); - ; + } } diff --git a/lib/prioityColors.dart b/lib/priorityColors.dart similarity index 100% rename from lib/prioityColors.dart rename to lib/priorityColors.dart diff --git a/lib/screens/EditNotePage.dart b/lib/screens/EditNotePage.dart index eb3ccf7..47bd34d 100644 --- a/lib/screens/EditNotePage.dart +++ b/lib/screens/EditNotePage.dart @@ -16,6 +16,7 @@ import '../models/priorityMenu.dart'; import '../provider/PriorityProvider.dart'; import '../translations/translations.dart'; +// ignore: must_be_immutable class EditNote extends StatelessWidget { final int? parentFolderId; diff --git a/lib/screens/notePage/NotePage.dart b/lib/screens/notePage/NotePage.dart index 0dac6a4..24eb883 100644 --- a/lib/screens/notePage/NotePage.dart +++ b/lib/screens/notePage/NotePage.dart @@ -9,7 +9,7 @@ import '../../collection/isarCURD.dart'; import '../../models/FadeRoute.dart'; import '../../models/MyWarningDialog.dart'; import '../../models/styles.dart'; -import '../../prioityColors.dart'; +import '../../priorityColors.dart'; import '../../provider/ListViewProvider.dart'; import '../../provider/PriorityProvider.dart'; import '../../translations/translations.dart'; diff --git a/lib/screens/notePage/widgets/task.dart b/lib/screens/notePage/widgets/task.dart index a8d2fbc..99c3e49 100644 --- a/lib/screens/notePage/widgets/task.dart +++ b/lib/screens/notePage/widgets/task.dart @@ -79,7 +79,7 @@ class _TaskState extends State { @override Widget build(BuildContext context) { - final Map locale = requiredData.locale; + // final Map locale = requiredData.locale; return FutureBuilder( future: noteFuture, builder: (context, snapshot) { diff --git a/pubspec.yaml b/pubspec.yaml index 59df2db..1209e07 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.7.9+20 +version: 1.8.0+21 environment: sdk: '>=3.0.6 <4.0.0'