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(
|
||||
constraints: BoxConstraints.loose(size),
|
||||
decoration: BoxDecoration(
|
||||
color: _streamChatTheme.colorTheme.barsBg,
|
||||
borderRadius: BorderRadius.circular(8)),
|
||||
color: _streamChatTheme.colorTheme.barsBg,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.all(0),
|
||||
shrinkWrap: true,
|
||||
@@ -72,9 +73,9 @@ class CommandsOverlay extends StatelessWidget {
|
||||
context.translations.instantCommandsLabel,
|
||||
style: TextStyle(
|
||||
color: _streamChatTheme.colorTheme.textHighEmphasis
|
||||
.withOpacity(.5),
|
||||
.withOpacity(0.5),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -102,7 +103,8 @@ class CommandsOverlay extends StatelessWidget {
|
||||
TextSpan(
|
||||
text: c.name.capitalize(),
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: ' /${c.name} ${c.args}',
|
||||
@@ -132,7 +134,9 @@ class CommandsOverlay extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildCommandIcon(
|
||||
StreamChatThemeData _streamChatTheme, String iconType) {
|
||||
StreamChatThemeData _streamChatTheme,
|
||||
String iconType,
|
||||
) {
|
||||
switch (iconType) {
|
||||
case 'giphy':
|
||||
return CircleAvatar(
|
||||
|
||||
@@ -81,10 +81,10 @@ class EmojiOverlay extends StatelessWidget {
|
||||
),
|
||||
style: TextStyle(
|
||||
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/media_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/stream_chat_theme.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
||||
@@ -639,7 +639,7 @@ class MessageInputState extends State<MessageInput> {
|
||||
),
|
||||
secondChild: widget.disableAttachments &&
|
||||
!widget.showCommandsButton &&
|
||||
widget.actions.isNotEmpty != true
|
||||
!widget.actions.isNotEmpty
|
||||
? const Offstage()
|
||||
: Wrap(
|
||||
children: <Widget>[
|
||||
@@ -826,6 +826,7 @@ class MessageInputState extends State<MessageInput> {
|
||||
|
||||
final channel = StreamChannel.of(context).channel;
|
||||
if (value.isNotEmpty) {
|
||||
// ignore: no-empty-block
|
||||
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_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]
|
||||
/// It shows the first one that is visible
|
||||
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
|
||||
class IVideoService {
|
||||
IVideoService._();
|
||||
class _IVideoService {
|
||||
_IVideoService._();
|
||||
|
||||
/// Singleton instance of [IVideoService]
|
||||
static final IVideoService instance = IVideoService._();
|
||||
/// Singleton instance of [_IVideoService]
|
||||
static final _IVideoService instance = _IVideoService._();
|
||||
final _lock = Lock();
|
||||
|
||||
/// compress video from [path]
|
||||
@@ -65,6 +65,6 @@ class IVideoService {
|
||||
);
|
||||
}
|
||||
|
||||
/// Get instance of [IVideoService]
|
||||
/// Get instance of [_IVideoService]
|
||||
// ignore: non_constant_identifier_names
|
||||
IVideoService get VideoService => IVideoService.instance;
|
||||
_IVideoService get VideoService => _IVideoService.instance;
|
||||
|
||||
Reference in New Issue
Block a user