Skip to content

Commit

Permalink
change to super parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
its-me-abhishek committed Dec 16, 2023
1 parent a4b2166 commit 115dee2
Show file tree
Hide file tree
Showing 33 changed files with 67 additions and 74 deletions.
4 changes: 2 additions & 2 deletions lib/config/theme_switcher_clipper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ class ThemeSwitcherClipper extends StatefulWidget {
final Function(bool) onTap;

const ThemeSwitcherClipper({
Key? key,
super.key,
required this.isDarkMode,
required this.onTap,
required Icon child,
}) : super(key: key);
});

@override
_ThemeSwitcherClipperState createState() => _ThemeSwitcherClipperState();
Expand Down
2 changes: 1 addition & 1 deletion lib/drawer/filter_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:taskwarrior/widgets/tag_filter.dart';

// ignore: must_be_immutable
class FilterDrawer extends StatelessWidget {
FilterDrawer(this.filters, {Key? key}) : super(key: key);
FilterDrawer(this.filters, {super.key});
var tileColor = AppSettings.isDarkMode
? const Color.fromARGB(255, 48, 46, 46)
: const Color.fromARGB(255, 220, 216, 216);
Expand Down
4 changes: 2 additions & 2 deletions lib/drawer/nav_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class NavDrawer extends StatefulWidget {
final Function() notifyParent;

const NavDrawer({
Key? key,
super.key,
required this.storageWidget,
required this.notifyParent,
}) : super(key: key);
});

@override
_NavDrawerState createState() => _NavDrawerState();
Expand Down
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Future init() async {
}

class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
// ignore: library_private_types_in_public_api
_MyAppState createState() => _MyAppState();
Expand Down Expand Up @@ -134,7 +134,7 @@ class CheckOnboardingStatus extends StatelessWidget {
final OnboardingController onboardingController =
Get.put(OnboardingController());

CheckOnboardingStatus({Key? key}) : super(key: key);
CheckOnboardingStatus({super.key});

@override
Widget build(BuildContext context) {
Expand Down
8 changes: 4 additions & 4 deletions lib/model/storage/storage_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class TagMetadata {
}

class StorageWidget extends StatefulWidget {
const StorageWidget({Key? key, required this.profile, required this.child})
: super(key: key);
const StorageWidget({super.key, required this.profile, required this.child});

final Directory profile;
final Widget child;
Expand Down Expand Up @@ -428,8 +427,9 @@ class _StorageWidgetState extends State<StorageWidget> {
}

class InheritedStorage extends InheritedModel<String> {
// ignore: use_super_parameters
const InheritedStorage({
Key? key,
super.key,
required this.storage,
required this.tasks,
required this.pendingTags,
Expand Down Expand Up @@ -462,7 +462,7 @@ class InheritedStorage extends InheritedModel<String> {
required this.tabAlias,
required this.serverCertExists,
required child,
}) : super(key: key, child: child);
}) : super(child: child);

final Storage storage;
final List<Task> tasks;
Expand Down
10 changes: 5 additions & 5 deletions lib/services/task_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import 'package:taskwarrior/widgets/taskdetails.dart';
import 'package:taskwarrior/widgets/taskw.dart';

class DetailRoute extends StatefulWidget {
const DetailRoute(this.uuid, {Key? key}) : super(key: key);
const DetailRoute(this.uuid, {super.key});

final String uuid;

Expand Down Expand Up @@ -199,8 +199,8 @@ class AttributeWidget extends StatelessWidget {
required this.name,
required this.value,
required this.callback,
Key? key,
}) : super(key: key);
super.key,
});

final String name;
final dynamic value;
Expand Down Expand Up @@ -320,8 +320,8 @@ class TagsWidget extends StatelessWidget {
required this.name,
required this.value,
required this.callback,
Key? key,
}) : super(key: key);
super.key,
});

final String name;
final dynamic value;
Expand Down
3 changes: 1 addition & 2 deletions lib/services/task_list_tem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import '../model/storage/storage_widget.dart';

class TaskListItem extends StatefulWidget {
const TaskListItem(this.task,
{this.pendingFilter = false, Key? key, required this.darkmode})
: super(key: key);
{this.pendingFilter = false, super.key, required this.darkmode});

final Task task;
final bool pendingFilter;
Expand Down
7 changes: 3 additions & 4 deletions lib/taskserver/ntaskserver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import 'package:taskwarrior/widgets/taskserver.dart';
import 'package:url_launcher/url_launcher.dart';

class ManageTaskServer extends StatefulWidget {
const ManageTaskServer({Key? key}) : super(key: key);
const ManageTaskServer({super.key});

@override
State<ManageTaskServer> createState() => _ManageTaskServerState();
Expand Down Expand Up @@ -692,10 +692,9 @@ class PemWidget extends StatefulWidget {
const PemWidget(
{required this.storage,
required this.pem,
Key? key,
super.key,
required this.optionString,
required this.listTileTitle})
: super(key: key);
required this.listTileTitle});

final Storage storage;
final String pem;
Expand Down
2 changes: 1 addition & 1 deletion lib/views/Onboarding/onboarding_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:taskwarrior/views/Onboarding/Components/size_config.dart';
import 'package:taskwarrior/views/home/home.dart';

class OnboardingScreen extends StatefulWidget {
const OnboardingScreen({Key? key}) : super(key: key);
const OnboardingScreen({super.key});

@override
State<OnboardingScreen> createState() => _OnboardingScreenState();
Expand Down
2 changes: 1 addition & 1 deletion lib/views/about/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:taskwarrior/widgets/pallete.dart';
import 'package:url_launcher/url_launcher.dart';

class AboutPage extends StatefulWidget {
const AboutPage({Key? key}) : super(key: key);
const AboutPage({super.key});
@override
// ignore: library_private_types_in_public_api
_AboutPageState createState() => _AboutPageState();
Expand Down
2 changes: 1 addition & 1 deletion lib/views/home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Filters {
class HomePage extends StatefulWidget {
static const String routeName = '/home';

const HomePage({Key? key}) : super(key: key);
const HomePage({super.key});
@override
_HomePageState createState() => _HomePageState();
}
Expand Down
6 changes: 3 additions & 3 deletions lib/views/profile/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:taskwarrior/widgets/taskdetails.dart';
class ProfilePage extends StatefulWidget {
static const String routeName = '/profile';

const ProfilePage({Key? key}) : super(key: key);
const ProfilePage({super.key});
@override
// ignore: library_private_types_in_public_api
_ProfilePageState createState() => _ProfilePageState();
Expand Down Expand Up @@ -156,8 +156,8 @@ class ProfilesColumn extends StatelessWidget {
this.export,
this.copy,
this.delete, {
Key? key,
}) : super(key: key);
super.key,
});

final Map profilesMap;
final String currentProfile;
Expand Down
2 changes: 1 addition & 1 deletion lib/views/reports/pages/burndown_daily.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'package:taskwarrior/widgets/taskdetails/profiles_widget.dart';
import 'package:path_provider/path_provider.dart';

class BurnDownDaily extends StatefulWidget {
const BurnDownDaily({Key? key}) : super(key: key);
const BurnDownDaily({super.key});

@override
State<BurnDownDaily> createState() => _BurnDownDailyState();
Expand Down
2 changes: 1 addition & 1 deletion lib/views/reports/pages/burndown_monthly.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'package:taskwarrior/views/reports/widgets/commonChartIndicator.dart';
import 'package:taskwarrior/widgets/taskdetails/profiles_widget.dart';

class BurnDownMonthlt extends StatefulWidget {
const BurnDownMonthlt({Key? key}) : super(key: key);
const BurnDownMonthlt({super.key});

@override
State<BurnDownMonthlt> createState() => _BurnDownMonthltState();
Expand Down
2 changes: 1 addition & 1 deletion lib/views/reports/pages/burndown_weekly.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'package:taskwarrior/widgets/taskdetails/profiles_widget.dart';
import 'package:path_provider/path_provider.dart';

class BurnDownWeekly extends StatefulWidget {
const BurnDownWeekly({Key? key}) : super(key: key);
const BurnDownWeekly({super.key});

@override
State<BurnDownWeekly> createState() => _BurnDownWeeklyState();
Expand Down
4 changes: 2 additions & 2 deletions lib/views/reports/reports_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import 'package:path_provider/path_provider.dart';

class ReportsHome extends StatefulWidget {
const ReportsHome({
Key? key,
}) : super(key: key);
super.key,
});

@override
State<ReportsHome> createState() => _ReportsHomeState();
Expand Down
2 changes: 1 addition & 1 deletion lib/views/reports/widgets/commonChartIndicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:taskwarrior/config/taskwarriorcolors.dart';
///Common widget for Report chart indicator
class CommonChartIndicator extends StatelessWidget {
final String title;
const CommonChartIndicator({Key? key, required this.title}) : super(key: key);
const CommonChartIndicator({super.key, required this.title});

@override
Widget build(BuildContext context) {
Expand Down
5 changes: 2 additions & 3 deletions lib/views/settings/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import 'package:taskwarrior/widgets/pallete.dart';

class SettingsPage extends StatefulWidget {
SettingsPage(
{Key? key,
{super.key,
required this.isSyncOnStartActivel,
required this.isSyncOnTaskCreateActivel})
: super(key: key);
required this.isSyncOnTaskCreateActivel});
bool isSyncOnStartActivel;
bool isSyncOnTaskCreateActivel;

Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/add_Task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'package:taskwarrior/widgets/taskfunctions/taskparser.dart';
import 'package:taskwarrior/widgets/taskw.dart';

class AddTaskBottomSheet extends StatefulWidget {
const AddTaskBottomSheet({Key? key}) : super(key: key);
const AddTaskBottomSheet({super.key});
@override
_AddTaskBottomSheetState createState() => _AddTaskBottomSheetState();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/app_placeholder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:taskwarrior/config/app_settings.dart';
import 'package:taskwarrior/widgets/pallete.dart';

class AppSetupPlaceholder extends StatelessWidget {
const AppSetupPlaceholder({Key? key}) : super(key: key);
const AppSetupPlaceholder({super.key});

@override
Widget build(BuildContext context) {
Expand Down
5 changes: 2 additions & 3 deletions lib/widgets/buildTasks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ import 'pallete.dart';

class TasksBuilder extends StatefulWidget {
const TasksBuilder(
{Key? key,
{super.key,
required this.taskData,
required this.pendingFilter,
required this.searchVisible})
: super(key: key);
required this.searchVisible});

final List<Task> taskData;
final bool pendingFilter;
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/profilefunctions/deleteprofiledialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class DeleteProfileDialog extends StatelessWidget {
const DeleteProfileDialog({
required this.profile,
required this.context,
Key? key,
}) : super(key: key);
super.key,
});

final String profile;
final BuildContext context;
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/profilefunctions/manageprofile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class ManageProfile extends StatelessWidget {
this.export,
this.copy,
this.delete, {
Key? key,
}) : super(key: key);
super.key,
});

final void Function() rename;
final void Function() configure;
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/profilefunctions/renameprofiledialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class RenameProfileDialog extends StatelessWidget {
required this.profile,
required this.alias,
required this.context,
Key? key,
}) : super(key: key);
super.key,
});

final String profile;
final String? alias;
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/profilefunctions/selectprofile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class SelectProfile extends StatelessWidget {
this.currentProfile,
this.profilesMap,
this.selectProfile, {
Key? key,
}) : super(key: key);
super.key,
});

final String currentProfile;
final Map profilesMap;
Expand Down
10 changes: 5 additions & 5 deletions lib/widgets/project_filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import 'package:taskwarrior/config/app_settings.dart';
import 'package:taskwarrior/widgets/taskw.dart';

class InheritedProjects extends InheritedWidget {
// ignore: use_super_parameters
const InheritedProjects({
required this.projects,
required this.projectFilter,
required this.callback,
required child,
Key? key,
}) : super(key: key, child: child);
super.key,
}) : super(child: child);

final Map<String, ProjectNode> projects;
final String projectFilter;
Expand All @@ -32,8 +33,7 @@ class InheritedProjects extends InheritedWidget {

class ProjectsColumn extends StatelessWidget {
const ProjectsColumn(this.projects, this.projectFilter, this.callback,
{Key? key})
: super(key: key);
{super.key});

final Map<String, ProjectNode> projects;
final String projectFilter;
Expand Down Expand Up @@ -132,7 +132,7 @@ class ProjectsColumn extends StatelessWidget {
}

class ProjectTile extends StatelessWidget {
const ProjectTile(this.project, {Key? key}) : super(key: key);
const ProjectTile(this.project, {super.key});

final String project;

Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/tag_filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TagFilters {
}

class TagFiltersWrap extends StatelessWidget {
const TagFiltersWrap(this.filters, {Key? key}) : super(key: key);
const TagFiltersWrap(this.filters, {super.key});

final TagFilters filters;

Expand Down
8 changes: 4 additions & 4 deletions lib/widgets/taskdetails/dateTimePicker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import 'package:taskwarrior/config/app_settings.dart';

class DateTimeWidget extends StatelessWidget {
const DateTimeWidget({
Key? key,
super.key,
required this.name,
required this.value,
required this.callback,
}) : super(key: key);
});

final String name;
final dynamic value;
Expand Down Expand Up @@ -103,8 +103,8 @@ class StartWidget extends StatelessWidget {
required this.name,
required this.value,
required this.callback,
Key? key,
}) : super(key: key);
super.key,
});

final String name;
final dynamic value;
Expand Down
Loading

0 comments on commit 115dee2

Please sign in to comment.