diff --git a/src/kaiteki/lib/app.dart b/src/kaiteki/lib/app.dart index 6a576009..c8c50771 100644 --- a/src/kaiteki/lib/app.dart +++ b/src/kaiteki/lib/app.dart @@ -68,7 +68,7 @@ final class KaitekiApp extends ConsumerWidget { routerConfig: ref.watch(routerProvider), supportedLocales: KaitekiLocalizations.supportedLocales, // FIXME(Craftplacer): `kab` results in no MaterialLocalizations - locale: locale != const Locale('kab') ? locale : null, + locale: locale != const Locale("kab") ? locale : null, theme: lightTheme, themeMode: themeMode, title: consts.kAppName, diff --git a/src/kaiteki/lib/text/parsers/social_text_parser.dart b/src/kaiteki/lib/text/parsers/social_text_parser.dart index 70326606..740ed318 100644 --- a/src/kaiteki/lib/text/parsers/social_text_parser.dart +++ b/src/kaiteki/lib/text/parsers/social_text_parser.dart @@ -23,7 +23,7 @@ class SocialTextParser implements TextParser { LinkElement( Uri.parse(url!), children: [TextElement(url)], - ) + ), ]; }); diff --git a/src/kaiteki/lib/text/text_renderer.dart b/src/kaiteki/lib/text/text_renderer.dart index 33ad24dc..fffe993c 100644 --- a/src/kaiteki/lib/text/text_renderer.dart +++ b/src/kaiteki/lib/text/text_renderer.dart @@ -6,8 +6,8 @@ import "package:kaiteki/di.dart"; import "package:kaiteki/preferences/app_preferences.dart"; import "package:kaiteki/text/elements.dart"; import "package:kaiteki/text/parsers.dart"; -import "package:kaiteki/ui/text/unblur_on_hover.dart"; import "package:kaiteki/theming/text_theme.dart"; +import "package:kaiteki/ui/text/unblur_on_hover.dart"; import "package:kaiteki/utils/extensions.dart"; import "package:kaiteki/utils/helpers.dart"; import "package:kaiteki_core/kaiteki_core.dart"; @@ -183,7 +183,7 @@ class TextRenderer { } InlineSpan _overrideGestureDetector( - InlineSpan span, TapGestureRecognizer recognizer) { + InlineSpan span, TapGestureRecognizer recognizer,) { if (span is TextSpan) { return TextSpan( recognizer: recognizer, diff --git a/src/kaiteki/lib/ui/account/settings_screen.dart b/src/kaiteki/lib/ui/account/settings_screen.dart index b56b487f..a639345f 100644 --- a/src/kaiteki/lib/ui/account/settings_screen.dart +++ b/src/kaiteki/lib/ui/account/settings_screen.dart @@ -117,11 +117,11 @@ class _AccountSettingsScreenState extends ConsumerState { : null, ), ListTile( - leading: Icon( + leading: const Icon( Icons.arrow_forward_rounded, // color: Theme.of(context).colorScheme.secondary, ), - title: Text("Move Account"), + title: const Text("Move Account"), onTap: ref.watch(developerMode).value ? () => _onMigrate(ref) : null, diff --git a/src/kaiteki/lib/ui/explore/news_list_tile.dart b/src/kaiteki/lib/ui/explore/news_list_tile.dart index 588dad8b..886911c9 100644 --- a/src/kaiteki/lib/ui/explore/news_list_tile.dart +++ b/src/kaiteki/lib/ui/explore/news_list_tile.dart @@ -1,6 +1,5 @@ import "package:flutter/material.dart"; import "package:kaiteki_core/kaiteki_core.dart"; -import "package:kaiteki_core/model.dart"; import "package:url_launcher/url_launcher.dart"; class NewsListTile extends StatelessWidget { diff --git a/src/kaiteki/lib/ui/main/pages/explore.dart b/src/kaiteki/lib/ui/main/pages/explore.dart index d6e3eac1..8fe42714 100644 --- a/src/kaiteki/lib/ui/main/pages/explore.dart +++ b/src/kaiteki/lib/ui/main/pages/explore.dart @@ -192,7 +192,7 @@ class _ExplorePageState extends ConsumerState { child: TextButton( onPressed: () => setState(() => _expandPosts = !_expandPosts), child: _expandPosts - ? Text("Show fewer posts") + ? const Text("Show fewer posts") : Text("Show ${postCount - _kPostLimit} more"), ), ), @@ -204,7 +204,7 @@ class _ExplorePageState extends ConsumerState { } class _HashtagChip extends ConsumerWidget { - const _HashtagChip(this.hashtag, {super.key}); + const _HashtagChip(this.hashtag); final String hashtag; diff --git a/src/kaiteki/lib/ui/main/pages/notifications.dart b/src/kaiteki/lib/ui/main/pages/notifications.dart index 791cdd7e..d9730140 100644 --- a/src/kaiteki/lib/ui/main/pages/notifications.dart +++ b/src/kaiteki/lib/ui/main/pages/notifications.dart @@ -234,8 +234,8 @@ class _AnnouncementsButton extends ConsumerWidget { children: [ const Icon(Icons.campaign_rounded), const SizedBox(width: 8), - Expanded( - child: const Text("Announcements"), + const Expanded( + child: Text("Announcements"), ), if (unreadCount != null && unreadCount > 0) ...[ const SizedBox(width: 8), @@ -302,8 +302,8 @@ class _FollowRequestsButton extends ConsumerWidget { children: [ const Icon(Icons.person_add_rounded), const SizedBox(width: 8), - Expanded( - child: const Text("Follow Requests"), + const Expanded( + child: Text("Follow Requests"), ), if (count != null && count > 0) ...[ const SizedBox(width: 8), diff --git a/src/kaiteki/lib/ui/media_inspection/screen.dart b/src/kaiteki/lib/ui/media_inspection/screen.dart index d561229b..88adc954 100644 --- a/src/kaiteki/lib/ui/media_inspection/screen.dart +++ b/src/kaiteki/lib/ui/media_inspection/screen.dart @@ -140,7 +140,7 @@ class _MediaInspectionScreenState extends State { onInvoke: (_) => _onPreviousPage(), ), NextPageIntent: CallbackAction( - onInvoke: (_) => _onNextPage()), + onInvoke: (_) => _onNextPage(),), }, child: Consumer( child: Focus( @@ -302,7 +302,6 @@ class _PaginationFab extends StatelessWidget { final Widget child; const _PaginationFab({ - super.key, this.onPressed, this.tooltip, required this.child, diff --git a/src/kaiteki/lib/ui/migration/dialog.dart b/src/kaiteki/lib/ui/migration/dialog.dart index f226afbc..ed530115 100644 --- a/src/kaiteki/lib/ui/migration/dialog.dart +++ b/src/kaiteki/lib/ui/migration/dialog.dart @@ -21,13 +21,13 @@ class _MigrationDialogState extends ConsumerState { final accounts = ref.watch(accountManagerProvider).accounts; return AlertDialog( - title: const Text('Migrate accounts'), + title: const Text("Migrate accounts"), content: ConstrainedBox( constraints: kDialogConstraints, child: Column( mainAxisSize: MainAxisSize.min, children: [ - Text( + const Text( "Select the accounts you want to migrate below and click the Migrate button. Keep the following things in mind:" "\n\n" "• Your old account will display a migration message pointing to your new account.\n" @@ -42,8 +42,8 @@ class _MigrationDialogState extends ConsumerState { user: accounts.first.user, ), ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), + const Padding( + padding: EdgeInsets.symmetric(horizontal: 16.0), child: Icon( Icons.keyboard_double_arrow_right_rounded, size: 48, @@ -63,7 +63,7 @@ class _MigrationDialogState extends ConsumerState { const SizedBox(height: 16), CheckboxListTile( contentPadding: EdgeInsets.zero, - title: Text("I have read and understood the above"), + title: const Text("I have read and understood the above"), value: false, onChanged: (value) => setState(() => _hasRead = value ?? false), controlAffinity: ListTileControlAffinity.leading, @@ -78,7 +78,7 @@ class _MigrationDialogState extends ConsumerState { ), TextButton( onPressed: _hasRead ? () => Navigator.of(context).pop(true) : null, - child: Text('Migrate'), + child: const Text("Migrate"), ), ], ); @@ -88,7 +88,7 @@ class _MigrationDialogState extends ConsumerState { class _AccountPreview extends StatelessWidget { final User user; - const _AccountPreview({super.key, required this.user}); + const _AccountPreview({required this.user}); @override Widget build(BuildContext context) { diff --git a/src/kaiteki/lib/ui/onboarding/pages/account_setup.dart b/src/kaiteki/lib/ui/onboarding/pages/account_setup.dart index d3e4c803..316fbabe 100644 --- a/src/kaiteki/lib/ui/onboarding/pages/account_setup.dart +++ b/src/kaiteki/lib/ui/onboarding/pages/account_setup.dart @@ -47,8 +47,8 @@ class AccountSetupPage extends ConsumerWidget { child: Center( child: ListTile( leading: Image.asset("assets/icons/fediverse.png"), - title: Text("Fediverse"), - subtitle: Text("Mastodon, Pleroma, Misskey, etc."), + title: const Text("Fediverse"), + subtitle: const Text("Mastodon, Pleroma, Misskey, etc."), ), ), ), @@ -62,8 +62,8 @@ class AccountSetupPage extends ConsumerWidget { Brightness.dark => Image.asset("assets/icons/tumblr_white.png"), }, - title: Text("Tumblr"), - subtitle: Text("Coming soon™"), + title: const Text("Tumblr"), + subtitle: const Text("Coming soon™"), enabled: false, ), ), @@ -71,8 +71,8 @@ class AccountSetupPage extends ConsumerWidget { Card.outlined( child: ListTile( leading: Image.asset("assets/icons/bluesky.png"), - title: Text("Bluesky"), - subtitle: Text("Coming soon™"), + title: const Text("Bluesky"), + subtitle: const Text("Coming soon™"), enabled: false, ), ), @@ -100,7 +100,7 @@ class AccountSetupPage extends ConsumerWidget { ), ], ), - ) + ), ], ), ); diff --git a/src/kaiteki/lib/ui/onboarding/pages/preferences_presets.dart b/src/kaiteki/lib/ui/onboarding/pages/preferences_presets.dart index 37f85bf4..6444bbaa 100644 --- a/src/kaiteki/lib/ui/onboarding/pages/preferences_presets.dart +++ b/src/kaiteki/lib/ui/onboarding/pages/preferences_presets.dart @@ -55,8 +55,8 @@ class _PreferencesSetupPageState extends State { Card.outlined( clipBehavior: Clip.antiAlias, child: CheckboxListTile( - title: Text("Settings useful for wellbeing"), - subtitle: Text( + title: const Text("Settings useful for wellbeing"), + subtitle: const Text( "Use less attention-grabbing colors, hide numbers", ), value: _wellbeingPreset, @@ -100,7 +100,7 @@ class _PreferencesSetupPageState extends State { ), ), ], - ) + ), ], ), ); diff --git a/src/kaiteki/lib/ui/onboarding/pages/theme.dart b/src/kaiteki/lib/ui/onboarding/pages/theme.dart index 27817c0d..c4c50569 100644 --- a/src/kaiteki/lib/ui/onboarding/pages/theme.dart +++ b/src/kaiteki/lib/ui/onboarding/pages/theme.dart @@ -79,7 +79,7 @@ class ThemePage extends ConsumerWidget { child: Text(context.l10n.finishButtonLabel), ), ], - ) + ), ], ), ); diff --git a/src/kaiteki/lib/ui/onboarding/screen.dart b/src/kaiteki/lib/ui/onboarding/screen.dart index f7c000c7..83a165e6 100644 --- a/src/kaiteki/lib/ui/onboarding/screen.dart +++ b/src/kaiteki/lib/ui/onboarding/screen.dart @@ -80,7 +80,7 @@ class _OnboardingContainer extends StatelessWidget { alignment: Alignment.bottomLeft, child: AlphaDisclaimer(), ), - ) + ), ], ), ), diff --git a/src/kaiteki/lib/ui/settings/a11y/screen.dart b/src/kaiteki/lib/ui/settings/a11y/screen.dart index cfcf7e1e..2017684c 100644 --- a/src/kaiteki/lib/ui/settings/a11y/screen.dart +++ b/src/kaiteki/lib/ui/settings/a11y/screen.dart @@ -93,7 +93,7 @@ class AccessibilityScreen extends StatelessWidget { leading: const Icon(Icons.text_fields_rounded), min: 1.0, max: 3.0, - title: Text("Post text size"), + title: const Text("Post text size"), provider: postTextSize, divisions: 8, ), diff --git a/src/kaiteki/lib/ui/settings/customization/density_dialog.dart b/src/kaiteki/lib/ui/settings/customization/density_dialog.dart index e01da04e..4abf75f7 100644 --- a/src/kaiteki/lib/ui/settings/customization/density_dialog.dart +++ b/src/kaiteki/lib/ui/settings/customization/density_dialog.dart @@ -30,13 +30,13 @@ class _DensityDialogState extends State { ]; return AlertDialog( - title: Text("Density"), + title: const Text("Density"), contentPadding: const EdgeInsets.only(top: 16.0, bottom: 24.0), content: Column( mainAxisSize: MainAxisSize.min, children: [ RadioListTile( - title: Text("System"), + title: const Text("System"), subtitle: Text( getNameForDensity(VisualDensity.adaptivePlatformDensity) ?? VisualDensity.adaptivePlatformDensity.toString(), diff --git a/src/kaiteki/lib/ui/settings/settings_screen.dart b/src/kaiteki/lib/ui/settings/settings_screen.dart index 2d5db29d..c3c123c3 100644 --- a/src/kaiteki/lib/ui/settings/settings_screen.dart +++ b/src/kaiteki/lib/ui/settings/settings_screen.dart @@ -28,7 +28,7 @@ class SettingsScreen extends StatelessWidget { ), ListTile( leading: const Icon(Icons.auto_awesome_rounded), - title: Text("Smart features"), + title: const Text("Smart features"), onTap: () => context.push("/settings/smart-features"), ), ListTile( diff --git a/src/kaiteki/lib/ui/settings/tweaks_screen.dart b/src/kaiteki/lib/ui/settings/tweaks_screen.dart index 3ef82e12..15d3990d 100644 --- a/src/kaiteki/lib/ui/settings/tweaks_screen.dart +++ b/src/kaiteki/lib/ui/settings/tweaks_screen.dart @@ -31,8 +31,8 @@ class TweaksScreen extends StatelessWidget { PreferenceSwitchListTile( provider: squareEmojis, title: const Text("Square emojis"), - subtitle: Text( - "Forces emojis to be square. Might make long emojis appear squished."), + subtitle: const Text( + "Forces emojis to be square. Might make long emojis appear squished.",), ), ], ), diff --git a/src/kaiteki/lib/ui/share_sheet/sheet.dart b/src/kaiteki/lib/ui/share_sheet/sheet.dart index 3119b146..e6cf84ca 100644 --- a/src/kaiteki/lib/ui/share_sheet/sheet.dart +++ b/src/kaiteki/lib/ui/share_sheet/sheet.dart @@ -1,6 +1,5 @@ import "dart:io"; -import "package:flutter/cupertino.dart"; import "package:flutter/foundation.dart"; import "package:flutter/material.dart"; import "package:flutter/services.dart"; @@ -222,7 +221,6 @@ class _ShareTile extends StatelessWidget { final VoidCallback? onTap; const _ShareTile({ - super.key, required this.icon, required this.text, this.onTap, diff --git a/src/kaiteki/lib/ui/shared/posts/attachments/image_attachment.dart b/src/kaiteki/lib/ui/shared/posts/attachments/image_attachment.dart index 86d5019d..ac047053 100644 --- a/src/kaiteki/lib/ui/shared/posts/attachments/image_attachment.dart +++ b/src/kaiteki/lib/ui/shared/posts/attachments/image_attachment.dart @@ -6,7 +6,7 @@ class ImageAttachment extends StatelessWidget { final Attachment attachment; final BoxFit? boxFit; - const ImageAttachment({ + const ImageAttachment({super.key, required this.attachment, this.boxFit, }); diff --git a/src/kaiteki/lib/ui/shared/posts/avatar_widget.dart b/src/kaiteki/lib/ui/shared/posts/avatar_widget.dart index 167cec90..1ab11315 100644 --- a/src/kaiteki/lib/ui/shared/posts/avatar_widget.dart +++ b/src/kaiteki/lib/ui/shared/posts/avatar_widget.dart @@ -86,7 +86,7 @@ class AvatarWidget extends StatelessWidget { child: IgnorePointer( child: _buildDecoration(decoration), ), - ) + ), ], ); } diff --git a/src/kaiteki/lib/ui/shared/posts/interaction_bar.dart b/src/kaiteki/lib/ui/shared/posts/interaction_bar.dart index f1e48a43..74b49e76 100644 --- a/src/kaiteki/lib/ui/shared/posts/interaction_bar.dart +++ b/src/kaiteki/lib/ui/shared/posts/interaction_bar.dart @@ -6,7 +6,6 @@ import "package:kaiteki/ui/shared/common.dart"; import "package:kaiteki/ui/shared/posts/count_button.dart"; import "package:kaiteki/ui/shared/posts/layouts/layout.dart"; import "package:kaiteki_core/kaiteki_core.dart"; -import "package:kaiteki_core/model.dart"; class InteractionBar extends StatefulWidget { const InteractionBar({ diff --git a/src/kaiteki/lib/ui/shared/posts/meta_bar.dart b/src/kaiteki/lib/ui/shared/posts/meta_bar.dart index 8bd99de4..14186f06 100644 --- a/src/kaiteki/lib/ui/shared/posts/meta_bar.dart +++ b/src/kaiteki/lib/ui/shared/posts/meta_bar.dart @@ -105,7 +105,7 @@ class MetaBar extends ConsumerWidget { final showLanguage = this.showLanguage ?? postTheme?.showLanguage ?? true; final showTime = this.showTime ?? postTheme?.showTime ?? true; - final showScope = this.showVisibility ?? postTheme?.showVisibility ?? true; + final showScope = showVisibility ?? postTheme?.showVisibility ?? true; return ContentColor( color: Theme.of(context).getEmphasisColor(EmphasisColor.medium), @@ -156,7 +156,7 @@ class MetaBar extends ConsumerWidget { } class _Timestamp extends StatelessWidget { - const _Timestamp(this.dateTime, {super.key}); + const _Timestamp(this.dateTime); final DateTime dateTime; @@ -176,7 +176,6 @@ class _Timestamp extends StatelessWidget { class _Language extends ConsumerWidget { const _Language({ - super.key, required this.language, }); diff --git a/src/kaiteki/lib/ui/shared/posts/post_widget.dart b/src/kaiteki/lib/ui/shared/posts/post_widget.dart index 7e1a57ec..7c0a62bf 100644 --- a/src/kaiteki/lib/ui/shared/posts/post_widget.dart +++ b/src/kaiteki/lib/ui/shared/posts/post_widget.dart @@ -409,8 +409,8 @@ class _PostWidgetState extends ConsumerState { CustomSemanticsAction(label: context.l10n.bookmarkButtonLabel); final reactAction = CustomSemanticsAction(label: context.l10n.reactButtonLabel); - final showOriginalAuthor = - const CustomSemanticsAction(label: "Open author's profile"); + const showOriginalAuthor = + CustomSemanticsAction(label: "Open author's profile"); return { replyAction: _onReply, diff --git a/src/kaiteki/lib/ui/shared/users/user_display_name_widget.dart b/src/kaiteki/lib/ui/shared/users/user_display_name_widget.dart index 146204ec..d7b4e0c4 100644 --- a/src/kaiteki/lib/ui/shared/users/user_display_name_widget.dart +++ b/src/kaiteki/lib/ui/shared/users/user_display_name_widget.dart @@ -32,14 +32,14 @@ class UserDisplayNameWidget extends ConsumerWidget { this.secondaryTextStyle?.copyWith(color: secondaryColor) ?? secondaryColor.textStyle; - Widget widget = switch (orientation) { + final Widget widget = switch (orientation) { Axis.horizontal => RepaintBoundary( child: Text.rich( TextSpan( children: [ user.renderText(context, ref, content.primary), if (secondaryText != null) ...[ - TextSpan(text: " "), + const TextSpan(text: " "), TextSpan( text: secondaryText, style: secondaryTextStyle, diff --git a/src/kaiteki/lib/ui/text/emoji_span.dart b/src/kaiteki/lib/ui/text/emoji_span.dart index 171b90b2..53669f48 100644 --- a/src/kaiteki/lib/ui/text/emoji_span.dart +++ b/src/kaiteki/lib/ui/text/emoji_span.dart @@ -1,5 +1,4 @@ import "package:flutter/material.dart"; -import "package:flutter/widgets.dart"; import "package:kaiteki/di.dart"; import "package:kaiteki/preferences/theme_preferences.dart"; import "package:kaiteki/ui/shared/emoji/emoji_theme.dart"; diff --git a/src/kaiteki/lib/ui/user/profile_link.dart b/src/kaiteki/lib/ui/user/profile_link.dart index 526c8951..6bc5a0e3 100644 --- a/src/kaiteki/lib/ui/user/profile_link.dart +++ b/src/kaiteki/lib/ui/user/profile_link.dart @@ -112,7 +112,7 @@ ProfileLink? determineLink(String key, String value) { } (IconData, Uri)? _parseTelegram(String key, String value) { - if (key != "telegram" || key != 'tg') return null; + if (key != "telegram" || key != "tg") return null; final match = _telegramRegex.firstMatch(value); diff --git a/src/kaiteki/lib/ui/user/user_screen.dart b/src/kaiteki/lib/ui/user/user_screen.dart index 16b35d40..4cafd228 100644 --- a/src/kaiteki/lib/ui/user/user_screen.dart +++ b/src/kaiteki/lib/ui/user/user_screen.dart @@ -164,7 +164,7 @@ class _UserScreenState extends ConsumerState { // too squished. width: min(MediaQuery .sizeOf(context) - .width / 3, 360), + .width / 3, 360,), child: SingleChildScrollView( padding: const EdgeInsets.symmetric(vertical: 8.0), child: Column(