fix analysis

This commit is contained in:
Salvatore Giordano
2021-12-29 11:42:08 +01:00
parent a445001760
commit 8278e1f745
2 changed files with 12 additions and 2 deletions
@@ -1751,14 +1751,19 @@ class MessageInputState extends State<MessageInput>
}
}
/// Preview of an Open Graph attachment.
class OGAttachmentPreview extends StatelessWidget {
/// Returns a new instance of [OGAttachmentPreview]
const OGAttachmentPreview({
Key? key,
required this.attachment,
this.onDismissPreviewPressed,
}) : super(key: key);
/// The attachment to be rendered.
final Attachment attachment;
/// Called when the dismiss button is pressed.
final VoidCallback? onDismissPreviewPressed;
@override
@@ -1773,7 +1778,7 @@ class OGAttachmentPreview extends StatelessWidget {
return Row(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(8),
child: Icon(
Icons.link,
color: colorTheme.accentPrimary,
@@ -1,19 +1,24 @@
import 'package:flutter/material.dart';
/// Controller for the [StreamTextField] widget.
class MessageTextFieldController extends TextEditingController {
/// Returns a new MessageTextFieldController
MessageTextFieldController({
String? text,
this.textPatternStyle,
}) : super(text: text);
/// Returns a new MessageTextFieldController with the given text [value].
MessageTextFieldController.fromValue(
TextEditingValue? value, {
this.textPatternStyle,
}) : super.fromValue(value);
/// A map of style to apply to the text matching the RegExp patterns.
final Map<RegExp, TextStyle>? textPatternStyle;
///
/// Builds a [TextSpan] from the current text,
/// highlighting the matches for [textPatternStyle].
@override
TextSpan buildTextSpan({
required BuildContext context,