chore(repo): finish adding dart_code_metrics.yaml
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -33,7 +33,7 @@ jobs:
|
||||
flutter-version: ${{ env.flutter_version }}
|
||||
|
||||
- name: "Install Tools"
|
||||
run: flutter pub global activate melos
|
||||
run: flutter pub global activate melos 1.0.0-dev.3
|
||||
- name: "Bootstrap Workspace"
|
||||
run: melos bootstrap
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
flutter-version: ${{ env.flutter_version }}
|
||||
- name: "Install Tools"
|
||||
run: |
|
||||
flutter pub global activate melos
|
||||
flutter pub global activate melos 1.0.0-dev.3
|
||||
- name: "Bootstrap Workspace"
|
||||
run: melos bootstrap
|
||||
- name: "Dart Analyze"
|
||||
|
||||
@@ -149,12 +149,6 @@ linter:
|
||||
|
||||
# https://dartcodemetrics.dev/docs/getting-started/introduction
|
||||
dart_code_metrics:
|
||||
metrics-exclude:
|
||||
- packages/*/test/**
|
||||
metrics:
|
||||
source-lines-of-code: 90
|
||||
maximum-nesting-level: 5
|
||||
halstead-volume: 150
|
||||
rules:
|
||||
# Dart Specific
|
||||
- binary-expression-operand-order
|
||||
@@ -162,6 +156,7 @@ dart_code_metrics:
|
||||
- prefer-match-file-name:
|
||||
exclude:
|
||||
- packages/*/test/**
|
||||
- packages/*/example/**
|
||||
- packages/**/util/**
|
||||
- packages/**/utils.dart
|
||||
- packages/stream_chat/lib/src/client/client.dart
|
||||
@@ -182,4 +177,3 @@ dart_code_metrics:
|
||||
# Flutter specific
|
||||
- always-remove-listener
|
||||
- avoid-unnecessary-setstate
|
||||
- avoid-wrapping-in-padding
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ versioning:
|
||||
mode: independent
|
||||
|
||||
packages:
|
||||
- packages/stream_chat*/*
|
||||
- packages/**
|
||||
|
||||
scripts:
|
||||
lint:all:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: example
|
||||
name: stream_chat_example
|
||||
description: A new Flutter project.
|
||||
|
||||
publish_to: "none"
|
||||
@@ -11,8 +11,7 @@ dependencies:
|
||||
cupertino_icons: ^1.0.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
stream_chat:
|
||||
path: ../
|
||||
stream_chat: ^2.2.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: example
|
||||
name: stream_chat_flutter_example
|
||||
description: A new Flutter project.
|
||||
|
||||
# The following line prevents the package from being accidentally published to
|
||||
@@ -27,18 +27,9 @@ dependencies:
|
||||
cupertino_icons: ^1.0.3
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
path: ../../stream_chat
|
||||
stream_chat_flutter:
|
||||
path: ../../stream_chat_flutter
|
||||
stream_chat_flutter_core:
|
||||
path: ../../stream_chat_flutter_core
|
||||
stream_chat_localizations:
|
||||
path: ../../stream_chat_localizations
|
||||
stream_chat_persistence:
|
||||
path: ../../stream_chat_persistence
|
||||
stream_chat_flutter: ^2.2.1
|
||||
stream_chat_localizations: ^1.1.0
|
||||
stream_chat_persistence: ^2.2.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -54,8 +54,9 @@ class AttachmentActionsModal extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
const SizedBox(height: kToolbarHeight),
|
||||
Container(
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.5,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
@@ -108,7 +109,8 @@ class AttachmentActionsModal extends StatelessWidget {
|
||||
}) saveImage = imageDownloader ?? _downloadAttachment;
|
||||
final downloader = isImage ? saveImage : saveFile;
|
||||
|
||||
final progressNotifier = ValueNotifier<_DownloadProgress?>(
|
||||
final progressNotifier =
|
||||
ValueNotifier<_DownloadProgress?>(
|
||||
_DownloadProgress.initial(),
|
||||
);
|
||||
|
||||
@@ -139,7 +141,8 @@ class AttachmentActionsModal extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
if (StreamChat.of(context).currentUser?.id == message.user?.id)
|
||||
if (StreamChat.of(context).currentUser?.id ==
|
||||
message.user?.id)
|
||||
_buildButton(
|
||||
context,
|
||||
context.translations.deleteLabel.capitalize(),
|
||||
@@ -182,6 +185,7 @@ class AttachmentActionsModal extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -112,8 +112,8 @@ class _FullScreenMediaState extends State<FullScreenMedia>
|
||||
attachment.assetUrl ??
|
||||
attachment.thumbUrl;
|
||||
return PhotoView(
|
||||
loadingBuilder: (context, image) =>
|
||||
const Offstage(),imageProvider: (imageUrl == null &&
|
||||
loadingBuilder: (context, image) => const Offstage(),
|
||||
imageProvider: (imageUrl == null &&
|
||||
attachment.localUri != null &&
|
||||
attachment.file?.bytes != null)
|
||||
? Image.memory(attachment.file!.bytes!).image
|
||||
|
||||
@@ -251,8 +251,10 @@ class _GalleryFooterState extends State<GalleryFooter> {
|
||||
children: [
|
||||
media,
|
||||
if (widget.message.user != null)
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(2),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
@@ -273,6 +275,7 @@ class _GalleryFooterState extends State<GalleryFooter> {
|
||||
showOnlineStatus: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
||||
@@ -752,8 +752,9 @@ class MessageInputState extends State<MessageInput> {
|
||||
? Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Container(
|
||||
constraints: BoxConstraints.tight(const Size(64, 24)),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -769,13 +770,15 @@ class MessageInputState extends State<MessageInput> {
|
||||
),
|
||||
Text(
|
||||
_chosenCommand?.name.toUpperCase() ?? '',
|
||||
style: _streamChatTheme.textTheme.footnoteBold.copyWith(
|
||||
style:
|
||||
_streamChatTheme.textTheme.footnoteBold.copyWith(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: (widget.actionsLocation == ActionsLocation.leftInside
|
||||
@@ -1024,8 +1027,10 @@ class MessageInputState extends State<MessageInput> {
|
||||
_attachments.isNotEmpty)
|
||||
? null
|
||||
: () {
|
||||
pickFile(DefaultAttachmentTypes.image,
|
||||
camera: true);
|
||||
pickFile(
|
||||
DefaultAttachmentTypes.image,
|
||||
camera: true,
|
||||
);
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
@@ -1038,8 +1043,10 @@ class MessageInputState extends State<MessageInput> {
|
||||
_attachments.isNotEmpty)
|
||||
? null
|
||||
: () {
|
||||
pickFile(DefaultAttachmentTypes.video,
|
||||
camera: true);
|
||||
pickFile(
|
||||
DefaultAttachmentTypes.video,
|
||||
camera: true,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -1053,10 +1060,11 @@ class MessageInputState extends State<MessageInput> {
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Container(
|
||||
width: 40,
|
||||
height: 4,
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: _streamChatTheme.colorTheme.inputBg,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
@@ -1064,6 +1072,7 @@ class MessageInputState extends State<MessageInput> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_openFilePickerSection)
|
||||
Expanded(
|
||||
child: DecoratedBox(
|
||||
|
||||
@@ -189,7 +189,7 @@ class QuotedMessageWidget extends StatelessWidget {
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: CachedNetworkImageProvider(
|
||||
attachment.imageUrl!,
|
||||
attachment.thumbUrl!,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: example
|
||||
name: stream_chat_flutter_core_example
|
||||
description: Example app for testing stream_chat_flutter_core
|
||||
|
||||
# The following line prevents the package from being accidentally published to
|
||||
@@ -26,13 +26,7 @@ dependencies:
|
||||
cupertino_icons: ^1.0.3
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
path: ../../stream_chat
|
||||
stream_chat_flutter_core:
|
||||
path: ../../stream_chat_flutter_core
|
||||
|
||||
stream_chat_flutter_core: ^2.2.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: example
|
||||
name: stream_chat_localizations_example
|
||||
description: A new Flutter project.
|
||||
|
||||
publish_to: 'none'
|
||||
@@ -11,16 +11,8 @@ dependencies:
|
||||
cupertino_icons: ^1.0.3
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
path: ../../stream_chat
|
||||
stream_chat_flutter:
|
||||
path: ../../stream_chat_flutter
|
||||
stream_chat_flutter_core:
|
||||
path: ../../stream_chat_flutter_core
|
||||
stream_chat_localizations:
|
||||
path: ../../stream_chat_localizations
|
||||
stream_chat_flutter: ^2.2.1
|
||||
stream_chat_localizations: ^1.1.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: example
|
||||
name: stream_chat_persistence_example
|
||||
description: A new Flutter project.
|
||||
|
||||
publish_to: 'none'
|
||||
@@ -11,12 +11,8 @@ dependencies:
|
||||
cupertino_icons: ^1.0.3
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
path: ../../stream_chat
|
||||
stream_chat_persistence:
|
||||
path: ../../stream_chat_persistence
|
||||
stream_chat: ^2.2.1
|
||||
stream_chat_persistence: ^2.2.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Reference in New Issue
Block a user