chore: fix analysis checks
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -49,8 +49,9 @@ class CommandsOverlay extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
constraints: BoxConstraints.loose(size),
|
constraints: BoxConstraints.loose(size),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: _streamChatTheme.colorTheme.barsBg,
|
color: _streamChatTheme.colorTheme.barsBg,
|
||||||
borderRadius: BorderRadius.circular(8)),
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
@@ -72,9 +73,9 @@ class CommandsOverlay extends StatelessWidget {
|
|||||||
context.translations.instantCommandsLabel,
|
context.translations.instantCommandsLabel,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: _streamChatTheme.colorTheme.textHighEmphasis
|
color: _streamChatTheme.colorTheme.textHighEmphasis
|
||||||
.withOpacity(.5),
|
.withOpacity(0.5),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -102,7 +103,8 @@ class CommandsOverlay extends StatelessWidget {
|
|||||||
TextSpan(
|
TextSpan(
|
||||||
text: c.name.capitalize(),
|
text: c.name.capitalize(),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold),
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: ' /${c.name} ${c.args}',
|
text: ' /${c.name} ${c.args}',
|
||||||
@@ -132,7 +134,9 @@ class CommandsOverlay extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCommandIcon(
|
Widget _buildCommandIcon(
|
||||||
StreamChatThemeData _streamChatTheme, String iconType) {
|
StreamChatThemeData _streamChatTheme,
|
||||||
|
String iconType,
|
||||||
|
) {
|
||||||
switch (iconType) {
|
switch (iconType) {
|
||||||
case 'giphy':
|
case 'giphy':
|
||||||
return CircleAvatar(
|
return CircleAvatar(
|
||||||
|
|||||||
@@ -81,10 +81,10 @@ class EmojiOverlay extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: _streamChatTheme.colorTheme.textHighEmphasis
|
color: _streamChatTheme.colorTheme.textHighEmphasis
|
||||||
.withOpacity(.5),
|
.withOpacity(0.5),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import 'package:stream_chat_flutter/src/emoji_overlay.dart';
|
|||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
import 'package:stream_chat_flutter/src/extension.dart';
|
||||||
import 'package:stream_chat_flutter/src/media_list_view.dart';
|
import 'package:stream_chat_flutter/src/media_list_view.dart';
|
||||||
import 'package:stream_chat_flutter/src/message_list_view.dart';
|
import 'package:stream_chat_flutter/src/message_list_view.dart';
|
||||||
import 'package:stream_chat_flutter/src/overlays.dart';
|
import 'package:stream_chat_flutter/src/multi_overlay.dart';
|
||||||
import 'package:stream_chat_flutter/src/quoted_message_widget.dart';
|
import 'package:stream_chat_flutter/src/quoted_message_widget.dart';
|
||||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||||
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
||||||
@@ -639,7 +639,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
),
|
),
|
||||||
secondChild: widget.disableAttachments &&
|
secondChild: widget.disableAttachments &&
|
||||||
!widget.showCommandsButton &&
|
!widget.showCommandsButton &&
|
||||||
widget.actions.isNotEmpty != true
|
!widget.actions.isNotEmpty
|
||||||
? const Offstage()
|
? const Offstage()
|
||||||
: Wrap(
|
: Wrap(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@@ -826,6 +826,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
|
|
||||||
final channel = StreamChannel.of(context).channel;
|
final channel = StreamChannel.of(context).channel;
|
||||||
if (value.isNotEmpty) {
|
if (value.isNotEmpty) {
|
||||||
|
// ignore: no-empty-block
|
||||||
channel.keyStroke(widget.parentMessage?.id).catchError((e) {});
|
channel.keyStroke(widget.parentMessage?.id).catchError((e) {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-17
@@ -2,23 +2,6 @@ import 'package:collection/collection.dart';
|
|||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_portal/flutter_portal.dart';
|
import 'package:flutter_portal/flutter_portal.dart';
|
||||||
|
|
||||||
/// Class that contains the parameters for building an overlay entry
|
|
||||||
class OverlayOptions {
|
|
||||||
/// Constructs a new overlay options object
|
|
||||||
/// [visible] - the visibility of the overlay
|
|
||||||
/// [widget] - the widget to be displayed
|
|
||||||
OverlayOptions({
|
|
||||||
required this.visible,
|
|
||||||
required this.widget,
|
|
||||||
});
|
|
||||||
|
|
||||||
/// the visibility of the overlay
|
|
||||||
final bool visible;
|
|
||||||
|
|
||||||
/// the widget to be displayed
|
|
||||||
final Widget widget;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Widget that renders a single overlay widget from a list of [overlayOptions]
|
/// Widget that renders a single overlay widget from a list of [overlayOptions]
|
||||||
/// It shows the first one that is visible
|
/// It shows the first one that is visible
|
||||||
class MultiOverlay extends StatelessWidget {
|
class MultiOverlay extends StatelessWidget {
|
||||||
@@ -61,3 +44,20 @@ class MultiOverlay extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Class that contains the parameters for building an overlay entry
|
||||||
|
class OverlayOptions {
|
||||||
|
/// Constructs a new overlay options object
|
||||||
|
/// [visible] - the visibility of the overlay
|
||||||
|
/// [widget] - the widget to be displayed
|
||||||
|
OverlayOptions({
|
||||||
|
required this.visible,
|
||||||
|
required this.widget,
|
||||||
|
});
|
||||||
|
|
||||||
|
/// the visibility of the overlay
|
||||||
|
final bool visible;
|
||||||
|
|
||||||
|
/// the widget to be displayed
|
||||||
|
final Widget widget;
|
||||||
|
}
|
||||||
@@ -7,11 +7,11 @@ import 'package:video_thumbnail/video_thumbnail.dart';
|
|||||||
|
|
||||||
///
|
///
|
||||||
// ignore: prefer-match-file-name
|
// ignore: prefer-match-file-name
|
||||||
class IVideoService {
|
class _IVideoService {
|
||||||
IVideoService._();
|
_IVideoService._();
|
||||||
|
|
||||||
/// Singleton instance of [IVideoService]
|
/// Singleton instance of [_IVideoService]
|
||||||
static final IVideoService instance = IVideoService._();
|
static final _IVideoService instance = _IVideoService._();
|
||||||
final _lock = Lock();
|
final _lock = Lock();
|
||||||
|
|
||||||
/// compress video from [path]
|
/// compress video from [path]
|
||||||
@@ -65,6 +65,6 @@ class IVideoService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get instance of [IVideoService]
|
/// Get instance of [_IVideoService]
|
||||||
// ignore: non_constant_identifier_names
|
// ignore: non_constant_identifier_names
|
||||||
IVideoService get VideoService => IVideoService.instance;
|
_IVideoService get VideoService => _IVideoService.instance;
|
||||||
|
|||||||
Reference in New Issue
Block a user