diff --git a/apps/jaspr_pad/lib/components/elements/button.dart b/apps/jaspr_pad/lib/components/elements/button.dart index b4471ecf..399d929c 100644 --- a/apps/jaspr_pad/lib/components/elements/button.dart +++ b/apps/jaspr_pad/lib/components/elements/button.dart @@ -18,8 +18,8 @@ class Button extends StatefulComponent { this.hideIcon = false, this.dialog = false, this.iconAffinity = IconAffinity.left, - Key? key, - }) : super(key: key); + super.key, + }); final String? id; final String? label; diff --git a/apps/jaspr_pad/lib/components/elements/dialog.dart b/apps/jaspr_pad/lib/components/elements/dialog.dart index eacc7431..bd1b7f29 100644 --- a/apps/jaspr_pad/lib/components/elements/dialog.dart +++ b/apps/jaspr_pad/lib/components/elements/dialog.dart @@ -45,7 +45,7 @@ void closeDialog(BuildContext context, {required String slotId, dynamic result}) } class Dialog extends StatelessComponent { - const Dialog({required this.title, required this.content, required this.actions, Key? key}) : super(key: key); + const Dialog({required this.title, required this.content, required this.actions, super.key}); final String title; final Component content; @@ -68,7 +68,7 @@ class Dialog extends StatelessComponent { } class DialogSlot extends StatefulComponent { - const DialogSlot({required this.slotId, Key? key}) : super(key: key); + const DialogSlot({required this.slotId, super.key}); final String slotId; diff --git a/apps/jaspr_pad/lib/components/elements/hidden.dart b/apps/jaspr_pad/lib/components/elements/hidden.dart index 8dc79e41..d63d82e1 100644 --- a/apps/jaspr_pad/lib/components/elements/hidden.dart +++ b/apps/jaspr_pad/lib/components/elements/hidden.dart @@ -5,8 +5,8 @@ class Hidden extends StatelessComponent { required this.hidden, required this.child, this.visibilityMode = false, - Key? key, - }) : super(key: key); + super.key, + }); final bool hidden; final Component child; diff --git a/apps/jaspr_pad/lib/components/elements/markdown.dart b/apps/jaspr_pad/lib/components/elements/markdown.dart index eb686c74..fdd85830 100644 --- a/apps/jaspr_pad/lib/components/elements/markdown.dart +++ b/apps/jaspr_pad/lib/components/elements/markdown.dart @@ -41,7 +41,7 @@ class InlineBrackets extends InlineSyntax { } class Markdown extends StatefulComponent { - const Markdown({required this.markdown, this.blockSyntaxes, Key? key}) : super(key: key); + const Markdown({required this.markdown, this.blockSyntaxes, super.key}); final String markdown; diff --git a/apps/jaspr_pad/lib/components/elements/menu.dart b/apps/jaspr_pad/lib/components/elements/menu.dart index b61c6113..8e5a1ab9 100644 --- a/apps/jaspr_pad/lib/components/elements/menu.dart +++ b/apps/jaspr_pad/lib/components/elements/menu.dart @@ -6,7 +6,7 @@ import '../utils/node_reader.dart'; import 'button.dart'; class MenuItem extends StatelessComponent { - const MenuItem({required this.label, Key? key}) : super(key: key); + const MenuItem({required this.label, super.key}); final String label; @@ -30,7 +30,7 @@ class MenuItem extends StatelessComponent { } class Menu extends StatelessComponent { - const Menu({required this.items, required this.onItemSelected, Key? key}) : super(key: key); + const Menu({required this.items, required this.onItemSelected, super.key}); final List items; final void Function(int) onItemSelected; @@ -43,7 +43,7 @@ class Menu extends StatelessComponent { } class MenuElement extends StatelessElement { - MenuElement(Menu component) : super(component); + MenuElement(Menu super.component); @override Menu get component => super.component as Menu; diff --git a/apps/jaspr_pad/lib/components/elements/snackbar.dart b/apps/jaspr_pad/lib/components/elements/snackbar.dart index a72c1ddd..d1f6bf6f 100644 --- a/apps/jaspr_pad/lib/components/elements/snackbar.dart +++ b/apps/jaspr_pad/lib/components/elements/snackbar.dart @@ -7,7 +7,7 @@ import '../utils/node_reader.dart'; final snackBarProvider = StateProvider((ref) => null); class SnackBar extends StatefulComponent { - const SnackBar({Key? key}) : super(key: key); + const SnackBar({super.key}); @override State createState() => SnackBarState(); diff --git a/apps/jaspr_pad/lib/components/elements/splitter.dart b/apps/jaspr_pad/lib/components/elements/splitter.dart index 7fd20307..e68cd2ef 100644 --- a/apps/jaspr_pad/lib/components/elements/splitter.dart +++ b/apps/jaspr_pad/lib/components/elements/splitter.dart @@ -6,7 +6,7 @@ import '../../adapters/html.dart' as html; import '../utils/node_reader.dart'; class Splitter extends StatefulComponent { - const Splitter({required this.children, this.horizontal = true, this.initialSizes, Key? key}) : super(key: key); + const Splitter({required this.children, this.horizontal = true, this.initialSizes, super.key}); final List children; final bool horizontal; diff --git a/apps/jaspr_pad/lib/components/elements/tab_bar.dart b/apps/jaspr_pad/lib/components/elements/tab_bar.dart index dd978547..6d6f732f 100644 --- a/apps/jaspr_pad/lib/components/elements/tab_bar.dart +++ b/apps/jaspr_pad/lib/components/elements/tab_bar.dart @@ -14,8 +14,8 @@ class TabBar extends StatefulComponent { required this.onSelected, required this.tabs, this.leading, - Key? key, - }) : super(key: key); + super.key, + }); final String id; final int selected; diff --git a/apps/jaspr_pad/lib/components/elements/textfield.dart b/apps/jaspr_pad/lib/components/elements/textfield.dart index 9084c37c..89d6d2c5 100644 --- a/apps/jaspr_pad/lib/components/elements/textfield.dart +++ b/apps/jaspr_pad/lib/components/elements/textfield.dart @@ -4,8 +4,7 @@ import '../../adapters/mdc.dart'; import '../utils/node_reader.dart'; class TextField extends StatefulComponent { - const TextField({required this.label, this.placeholder, this.onChange, this.expand = false, Key? key}) - : super(key: key); + const TextField({required this.label, this.placeholder, this.onChange, this.expand = false, super.key}); final String label; final String? placeholder; diff --git a/apps/jaspr_pad/lib/components/playground/editing/editor.dart b/apps/jaspr_pad/lib/components/playground/editing/editor.dart index 99f78cc1..a7725bf0 100644 --- a/apps/jaspr_pad/lib/components/playground/editing/editor.dart +++ b/apps/jaspr_pad/lib/components/playground/editing/editor.dart @@ -30,8 +30,8 @@ class Editor extends StatefulComponent { required this.documents, this.onDocumentChanged, this.onSelectionChanged, - Key? key, - }) : super(key: key); + super.key, + }); final String? activeDoc; final List documents; diff --git a/apps/jaspr_pad/lib/components/playground/footer.dart b/apps/jaspr_pad/lib/components/playground/footer.dart index f07cd3f9..caeb2901 100644 --- a/apps/jaspr_pad/lib/components/playground/footer.dart +++ b/apps/jaspr_pad/lib/components/playground/footer.dart @@ -1,7 +1,7 @@ import 'package:jaspr/jaspr.dart'; class PlaygroundFooter extends StatelessComponent { - const PlaygroundFooter({Key? key}) : super(key: key); + const PlaygroundFooter({super.key}); @override Iterable build(BuildContext context) sync* { diff --git a/apps/jaspr_pad/lib/components/playground/header.dart b/apps/jaspr_pad/lib/components/playground/header.dart index 7c9b4111..73aee809 100644 --- a/apps/jaspr_pad/lib/components/playground/header.dart +++ b/apps/jaspr_pad/lib/components/playground/header.dart @@ -10,7 +10,7 @@ import '../elements/button.dart'; import '../elements/menu.dart'; class PlaygroundHeader extends StatelessComponent { - const PlaygroundHeader({Key? key}) : super(key: key); + const PlaygroundHeader({super.key}); @override Iterable build(BuildContext context) sync* { @@ -100,7 +100,7 @@ class PlaygroundHeader extends StatelessComponent { } class SamplesMenuButton extends StatelessComponent with SyncProviderDependencies { - const SamplesMenuButton({Key? key}) : super(key: key); + const SamplesMenuButton({super.key}); @override Iterable get preloadDependencies => [syncSamplesProvider]; diff --git a/apps/jaspr_pad/lib/components/playground/main_section.dart b/apps/jaspr_pad/lib/components/playground/main_section.dart index af149787..767b0944 100644 --- a/apps/jaspr_pad/lib/components/playground/main_section.dart +++ b/apps/jaspr_pad/lib/components/playground/main_section.dart @@ -9,7 +9,7 @@ import 'panels/output_panel.dart'; import 'panels/tutorial_panel.dart'; class MainSection extends StatelessComponent { - const MainSection({Key? key}) : super(key: key); + const MainSection({super.key}); @override Iterable build(BuildContext context) sync* { diff --git a/apps/jaspr_pad/lib/components/playground/output/execution_iframe.dart b/apps/jaspr_pad/lib/components/playground/output/execution_iframe.dart index 49708ba4..d025c82e 100644 --- a/apps/jaspr_pad/lib/components/playground/output/execution_iframe.dart +++ b/apps/jaspr_pad/lib/components/playground/output/execution_iframe.dart @@ -6,7 +6,7 @@ import 'execution_service.dart'; import 'execution_service.imports.dart'; class ExecutionIFrame extends StatelessComponent { - const ExecutionIFrame({Key? key}) : super(key: key); + const ExecutionIFrame({super.key}); @override Iterable build(BuildContext context) sync* { diff --git a/apps/jaspr_pad/lib/components/playground/panels/console_panel.dart b/apps/jaspr_pad/lib/components/playground/panels/console_panel.dart index 96aaef04..835400dd 100644 --- a/apps/jaspr_pad/lib/components/playground/panels/console_panel.dart +++ b/apps/jaspr_pad/lib/components/playground/panels/console_panel.dart @@ -4,7 +4,7 @@ import 'package:jaspr_riverpod/jaspr_riverpod.dart'; import '../output/execution_service.dart'; class ConsolePanel extends StatelessComponent { - const ConsolePanel({Key? key}) : super(key: key); + const ConsolePanel({super.key}); @override Iterable build(BuildContext context) sync* { diff --git a/apps/jaspr_pad/lib/components/playground/panels/document_panel.dart b/apps/jaspr_pad/lib/components/playground/panels/document_panel.dart index 0cd84ee6..45d13acc 100644 --- a/apps/jaspr_pad/lib/components/playground/panels/document_panel.dart +++ b/apps/jaspr_pad/lib/components/playground/panels/document_panel.dart @@ -6,7 +6,7 @@ import '../../../providers/docu_provider.dart'; import '../../elements/markdown.dart'; class DocumentPanel extends StatelessComponent { - const DocumentPanel({Key? key}) : super(key: key); + const DocumentPanel({super.key}); @override Iterable build(BuildContext context) sync* { @@ -19,7 +19,7 @@ class DocumentPanel extends StatelessComponent { } class _DocumentHintMarkdown extends StatefulComponent { - const _DocumentHintMarkdown(this.info, {Key? key}) : super(key: key); + const _DocumentHintMarkdown(this.info); final HoverInfo info; diff --git a/apps/jaspr_pad/lib/components/playground/panels/issues_panel.dart b/apps/jaspr_pad/lib/components/playground/panels/issues_panel.dart index ca4409c1..974b065b 100644 --- a/apps/jaspr_pad/lib/components/playground/panels/issues_panel.dart +++ b/apps/jaspr_pad/lib/components/playground/panels/issues_panel.dart @@ -6,7 +6,7 @@ import '../../../providers/edit_provider.dart'; import '../../../providers/issues_provider.dart'; class IssuesPanel extends StatelessComponent { - const IssuesPanel({Key? key}) : super(key: key); + const IssuesPanel({super.key}); @override Iterable build(BuildContext context) sync* { @@ -19,7 +19,7 @@ class IssuesPanel extends StatelessComponent { } class IssueItem extends StatelessComponent { - const IssueItem(this.issue, {Key? key}) : super(key: key); + const IssueItem(this.issue, {super.key}); final Issue issue; diff --git a/apps/jaspr_pad/lib/components/playground/panels/output_panel.dart b/apps/jaspr_pad/lib/components/playground/panels/output_panel.dart index 6e2b7f49..866b39e0 100644 --- a/apps/jaspr_pad/lib/components/playground/panels/output_panel.dart +++ b/apps/jaspr_pad/lib/components/playground/panels/output_panel.dart @@ -5,7 +5,7 @@ import '../../../providers/project_provider.dart'; import '../output/execution_iframe.dart'; class OutputPanel extends StatelessComponent { - const OutputPanel({Key? key}) : super(key: key); + const OutputPanel({super.key}); @override Iterable build(BuildContext context) sync* { diff --git a/apps/jaspr_pad/lib/components/playground/panels/output_split_view.dart b/apps/jaspr_pad/lib/components/playground/panels/output_split_view.dart index aeaa4ade..dadfdbfc 100644 --- a/apps/jaspr_pad/lib/components/playground/panels/output_split_view.dart +++ b/apps/jaspr_pad/lib/components/playground/panels/output_split_view.dart @@ -17,7 +17,7 @@ enum OutputTabsState { closed, ui, issues, docs, console } final tabsStateProvider = StateProvider((ref) => OutputTabsState.closed); class OutputSplitView extends StatelessComponent { - const OutputSplitView({required this.child, Key? key}) : super(key: key); + const OutputSplitView({required this.child, super.key}); final Component child; @@ -50,7 +50,7 @@ class OutputSplitView extends StatelessComponent { } class EditorTabs extends StatelessComponent { - const EditorTabs({Key? key}) : super(key: key); + const EditorTabs({super.key}); @override Iterable build(BuildContext context) sync* { @@ -127,7 +127,7 @@ class EditorTabs extends StatelessComponent { } class EditorTab extends StatelessComponent { - const EditorTab({required this.id, required this.label, required this.value, Key? key}) : super(key: key); + const EditorTab({required this.id, required this.label, required this.value, super.key}); final String id; final String label; @@ -156,7 +156,7 @@ class EditorTab extends StatelessComponent { } class EditorTabWindow extends StatelessComponent { - const EditorTabWindow({Key? key}) : super(key: key); + const EditorTabWindow({super.key}); @override Iterable build(BuildContext context) sync* { diff --git a/apps/jaspr_pad/lib/components/playground/panels/tutorial_panel.dart b/apps/jaspr_pad/lib/components/playground/panels/tutorial_panel.dart index ce01a22c..bd7e4a39 100644 --- a/apps/jaspr_pad/lib/components/playground/panels/tutorial_panel.dart +++ b/apps/jaspr_pad/lib/components/playground/panels/tutorial_panel.dart @@ -9,7 +9,7 @@ import '../../elements/hidden.dart'; import '../../elements/markdown.dart'; class TutorialPanel extends StatelessComponent { - const TutorialPanel({Key? key}) : super(key: key); + const TutorialPanel({super.key}); @override Iterable build(BuildContext context) sync* { diff --git a/apps/jaspr_pad/lib/components/playground/playground.dart b/apps/jaspr_pad/lib/components/playground/playground.dart index 42d7dbcb..0a7c7f7f 100644 --- a/apps/jaspr_pad/lib/components/playground/playground.dart +++ b/apps/jaspr_pad/lib/components/playground/playground.dart @@ -9,7 +9,7 @@ import 'header.dart'; import 'main_section.dart'; class Playground extends StatelessComponent { - const Playground({Key? key}) : super(key: key); + const Playground({super.key}); @override Iterable build(BuildContext context) sync* { diff --git a/apps/jaspr_pad/lib/main.dart b/apps/jaspr_pad/lib/main.dart index a2adfa87..9b710234 100644 --- a/apps/jaspr_pad/lib/main.dart +++ b/apps/jaspr_pad/lib/main.dart @@ -31,7 +31,7 @@ void main() { ..addMiddleware((handler) { var router = Router(notFoundHandler: handler); router.mount('/api', apiRouter); - return router; + return router.call; }); } @@ -50,7 +50,7 @@ Handler get apiRouter { router.get('/tutorial/', getTutorial); router.get('/download', downloadProject); - return router; + return router.call; } Handler mappedHandler(FutureOr Function(T request) handler) { diff --git a/apps/jaspr_pad/samples/bulma/button.dart b/apps/jaspr_pad/samples/bulma/button.dart index 93f093fe..44bff721 100644 --- a/apps/jaspr_pad/samples/bulma/button.dart +++ b/apps/jaspr_pad/samples/bulma/button.dart @@ -14,8 +14,8 @@ class Button extends StatelessComponent { this.isLoading = false, this.isBlock = false, this.isDisabled = false, - Key? key, - }) : super(key: key); + super.key, + }); final Component child; final VoidCallback onPressed; @@ -45,7 +45,7 @@ class Button extends StatelessComponent { } class IconLabel extends StatelessComponent { - const IconLabel({required this.icon, required this.label, Key? key}) : super(key: key); + const IconLabel({required this.icon, required this.label, super.key}); final String icon; final String label; @@ -63,7 +63,7 @@ class IconLabel extends StatelessComponent { /// Bulma Button Group Component class ButtonGroup extends StatelessComponent { - const ButtonGroup({required this.children, this.isAttached = false, Key? key}) : super(key: key); + const ButtonGroup({required this.children, this.isAttached = false, super.key}); final List