@@ -40,7 +40,7 @@ class SortOption<T> {
|
|||||||
final int direction;
|
final int direction;
|
||||||
|
|
||||||
/// Sorting field Comparator required for offline sorting
|
/// Sorting field Comparator required for offline sorting
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeToJson: false, includeFromJson: false)
|
||||||
final Comparator<T>? comparator;
|
final Comparator<T>? comparator;
|
||||||
|
|
||||||
/// Serialize model to json
|
/// Serialize model to json
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class AttachmentFile {
|
|||||||
|
|
||||||
/// Byte data for this file. Particularly useful if you want to manipulate
|
/// Byte data for this file. Particularly useful if you want to manipulate
|
||||||
/// its data or easily upload to somewhere else.
|
/// its data or easily upload to somewhere else.
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeToJson: false, includeFromJson: false)
|
||||||
final Uint8List? bytes;
|
final Uint8List? bytes;
|
||||||
|
|
||||||
/// The file size in bytes.
|
/// The file size in bytes.
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ class _SplitViewState extends State<SplitView> {
|
|||||||
: Center(
|
: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'Pick a channel to show the messages 💬',
|
'Pick a channel to show the messages 💬',
|
||||||
style: Theme.of(context).textTheme.headline5,
|
style: Theme.of(context).textTheme.headlineSmall,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class _SplitViewState extends State<SplitView> {
|
|||||||
: Center(
|
: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'Pick a channel to show the messages 💬',
|
'Pick a channel to show the messages 💬',
|
||||||
style: Theme.of(context).textTheme.headline5,
|
style: Theme.of(context).textTheme.headlineSmall,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -162,8 +162,8 @@ class StreamChannelHeader extends StatelessWidget
|
|||||||
showMessage: showConnectionStateTile && showStatus,
|
showMessage: showConnectionStateTile && showStatus,
|
||||||
message: statusString,
|
message: statusString,
|
||||||
child: AppBar(
|
child: AppBar(
|
||||||
toolbarTextStyle: theme.textTheme.bodyText2,
|
toolbarTextStyle: theme.textTheme.bodyMedium,
|
||||||
titleTextStyle: theme.textTheme.headline6,
|
titleTextStyle: theme.textTheme.titleLarge,
|
||||||
systemOverlayStyle: theme.brightness == Brightness.dark
|
systemOverlayStyle: theme.brightness == Brightness.dark
|
||||||
? SystemUiOverlayStyle.light
|
? SystemUiOverlayStyle.light
|
||||||
: SystemUiOverlayStyle.dark,
|
: SystemUiOverlayStyle.dark,
|
||||||
|
|||||||
@@ -131,8 +131,8 @@ class StreamChannelListHeader extends StatelessWidget
|
|||||||
showMessage: showConnectionStateTile && showStatus,
|
showMessage: showConnectionStateTile && showStatus,
|
||||||
message: statusString,
|
message: statusString,
|
||||||
child: AppBar(
|
child: AppBar(
|
||||||
toolbarTextStyle: theme.textTheme.bodyText2,
|
toolbarTextStyle: theme.textTheme.bodyMedium,
|
||||||
titleTextStyle: theme.textTheme.headline6,
|
titleTextStyle: theme.textTheme.titleLarge,
|
||||||
systemOverlayStyle: theme.brightness == Brightness.dark
|
systemOverlayStyle: theme.brightness == Brightness.dark
|
||||||
? SystemUiOverlayStyle.light
|
? SystemUiOverlayStyle.light
|
||||||
: SystemUiOverlayStyle.dark,
|
: SystemUiOverlayStyle.dark,
|
||||||
@@ -181,7 +181,10 @@ class StreamChannelListHeader extends StatelessWidget
|
|||||||
package: 'stream_chat_flutter',
|
package: 'stream_chat_flutter',
|
||||||
width: 24,
|
width: 24,
|
||||||
height: 24,
|
height: 24,
|
||||||
color: color,
|
colorFilter: ColorFilter.mode(
|
||||||
|
color,
|
||||||
|
BlendMode.srcIn,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ class StreamGalleryHeader extends StatelessWidget
|
|||||||
final galleryHeaderThemeData = StreamGalleryHeaderTheme.of(context);
|
final galleryHeaderThemeData = StreamGalleryHeaderTheme.of(context);
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
return AppBar(
|
return AppBar(
|
||||||
toolbarTextStyle: theme.textTheme.bodyText2,
|
toolbarTextStyle: theme.textTheme.bodyMedium,
|
||||||
titleTextStyle: theme.textTheme.headline6,
|
titleTextStyle: theme.textTheme.titleLarge,
|
||||||
systemOverlayStyle: theme.brightness == Brightness.dark
|
systemOverlayStyle: theme.brightness == Brightness.dark
|
||||||
? SystemUiOverlayStyle.light
|
? SystemUiOverlayStyle.light
|
||||||
: SystemUiOverlayStyle.dark,
|
: SystemUiOverlayStyle.dark,
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ class StreamMessageTextField extends StatefulWidget {
|
|||||||
this.textAlignVertical,
|
this.textAlignVertical,
|
||||||
this.textDirection,
|
this.textDirection,
|
||||||
this.readOnly = false,
|
this.readOnly = false,
|
||||||
ToolbarOptions? toolbarOptions,
|
|
||||||
this.showCursor,
|
this.showCursor,
|
||||||
this.autofocus = false,
|
this.autofocus = false,
|
||||||
this.obscuringCharacter = '•',
|
this.obscuringCharacter = '•',
|
||||||
@@ -155,31 +154,7 @@ class StreamMessageTextField extends StatefulWidget {
|
|||||||
keyboardType = keyboardType ??
|
keyboardType = keyboardType ??
|
||||||
(maxLines == 1 ? TextInputType.text : TextInputType.multiline),
|
(maxLines == 1 ? TextInputType.text : TextInputType.multiline),
|
||||||
enableInteractiveSelection =
|
enableInteractiveSelection =
|
||||||
enableInteractiveSelection ?? (!readOnly || !obscureText),
|
enableInteractiveSelection ?? (!readOnly || !obscureText);
|
||||||
toolbarOptions = toolbarOptions ??
|
|
||||||
(obscureText
|
|
||||||
? (readOnly
|
|
||||||
// No point in even offering "Select All" in a read-only obscured
|
|
||||||
// field.
|
|
||||||
? const ToolbarOptions()
|
|
||||||
// Writable, but obscured.
|
|
||||||
: const ToolbarOptions(
|
|
||||||
selectAll: true,
|
|
||||||
paste: true,
|
|
||||||
))
|
|
||||||
: (readOnly
|
|
||||||
// Read-only, not obscured.
|
|
||||||
? const ToolbarOptions(
|
|
||||||
selectAll: true,
|
|
||||||
copy: true,
|
|
||||||
)
|
|
||||||
// Writable, not obscured.
|
|
||||||
: const ToolbarOptions(
|
|
||||||
copy: true,
|
|
||||||
cut: true,
|
|
||||||
selectAll: true,
|
|
||||||
paste: true,
|
|
||||||
)));
|
|
||||||
|
|
||||||
/// Controls the message being edited.
|
/// Controls the message being edited.
|
||||||
///
|
///
|
||||||
@@ -304,13 +279,6 @@ class StreamMessageTextField extends StatefulWidget {
|
|||||||
/// {@macro flutter.widgets.editableText.readOnly}
|
/// {@macro flutter.widgets.editableText.readOnly}
|
||||||
final bool readOnly;
|
final bool readOnly;
|
||||||
|
|
||||||
/// Configuration of toolbar options.
|
|
||||||
///
|
|
||||||
/// If not set, select all and paste will default to be enabled. Copy and cut
|
|
||||||
/// will be disabled if [obscureText] is true. If [readOnly] is true,
|
|
||||||
/// paste and cut will be disabled regardless.
|
|
||||||
final ToolbarOptions toolbarOptions;
|
|
||||||
|
|
||||||
/// {@macro flutter.widgets.editableText.showCursor}
|
/// {@macro flutter.widgets.editableText.showCursor}
|
||||||
final bool? showCursor;
|
final bool? showCursor;
|
||||||
|
|
||||||
@@ -720,7 +688,6 @@ class _StreamMessageTextFieldState extends State<StreamMessageTextField>
|
|||||||
textAlignVertical: widget.textAlignVertical,
|
textAlignVertical: widget.textAlignVertical,
|
||||||
textDirection: widget.textDirection,
|
textDirection: widget.textDirection,
|
||||||
readOnly: widget.readOnly,
|
readOnly: widget.readOnly,
|
||||||
toolbarOptions: widget.toolbarOptions,
|
|
||||||
showCursor: widget.showCursor,
|
showCursor: widget.showCursor,
|
||||||
autofocus: widget.autofocus,
|
autofocus: widget.autofocus,
|
||||||
obscuringCharacter: widget.obscuringCharacter,
|
obscuringCharacter: widget.obscuringCharacter,
|
||||||
|
|||||||
@@ -1088,7 +1088,12 @@ class StreamSvgIcon extends StatelessWidget {
|
|||||||
key: key,
|
key: key,
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
color: color,
|
colorFilter: color != null
|
||||||
|
? ColorFilter.mode(
|
||||||
|
color!,
|
||||||
|
BlendMode.srcIn,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,8 +149,8 @@ class StreamThreadHeader extends StatelessWidget
|
|||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
return AppBar(
|
return AppBar(
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
toolbarTextStyle: theme.textTheme.bodyText2,
|
toolbarTextStyle: theme.textTheme.bodyMedium,
|
||||||
titleTextStyle: theme.textTheme.headline6,
|
titleTextStyle: theme.textTheme.titleLarge,
|
||||||
systemOverlayStyle: theme.brightness == Brightness.dark
|
systemOverlayStyle: theme.brightness == Brightness.dark
|
||||||
? SystemUiOverlayStyle.light
|
? SystemUiOverlayStyle.light
|
||||||
: SystemUiOverlayStyle.dark,
|
: SystemUiOverlayStyle.dark,
|
||||||
|
|||||||
+1
-1
@@ -409,7 +409,7 @@ class StreamChannelListErrorWidget extends StatelessWidget {
|
|||||||
TextSpan(text: context.translations.loadingChannelsError),
|
TextSpan(text: context.translations.loadingChannelsError),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
style: Theme.of(context).textTheme.headline6,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void main() {
|
|||||||
final error = DioError(
|
final error = DioError(
|
||||||
type: DioErrorType.badResponse,
|
type: DioErrorType.badResponse,
|
||||||
message: errorMessage,
|
message: errorMessage,
|
||||||
requestOptions: RequestOptions(path: ''),
|
requestOptions: RequestOptions(),
|
||||||
);
|
);
|
||||||
when(() => mockChannel.initialized)
|
when(() => mockChannel.initialized)
|
||||||
.thenAnswer((_) => Future.error(error));
|
.thenAnswer((_) => Future.error(error));
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class LocalizationTrackerState extends State<LocalizationTracker> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
captionFontSize = Theme.of(context).textTheme.caption!.fontSize!;
|
captionFontSize = Theme.of(context).textTheme.bodySmall!.fontSize!;
|
||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user