fix: dartfmt on a couple of files
This commit is contained in:
@@ -530,7 +530,8 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
},
|
},
|
||||||
itemBuilder: (context, i) {
|
itemBuilder: (context, i) {
|
||||||
if (i == itemCount - 1) {
|
if (i == itemCount - 1) {
|
||||||
if (widget.parentMessage == null) return const Offstage();
|
if (widget.parentMessage == null)
|
||||||
|
return const Offstage();
|
||||||
return buildParentMessage(widget.parentMessage!);
|
return buildParentMessage(widget.parentMessage!);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -558,7 +559,8 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
const Offstage();
|
const Offstage();
|
||||||
}
|
}
|
||||||
|
|
||||||
const bottomMessageIndex = 2; // 1 -> loader // 0 -> footer
|
const bottomMessageIndex =
|
||||||
|
2; // 1 -> loader // 0 -> footer
|
||||||
|
|
||||||
final message = messages[i - 2];
|
final message = messages[i - 2];
|
||||||
Widget messageWidget;
|
Widget messageWidget;
|
||||||
|
|||||||
@@ -145,8 +145,8 @@ class _MessageSearchListViewState extends State<MessageSearchListView> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => ColoredBox(
|
Widget build(BuildContext context) => ColoredBox(
|
||||||
color: MessageSearchListViewTheme.of(context).backgroundColor!,
|
color: MessageSearchListViewTheme.of(context).backgroundColor!,
|
||||||
child: MessageSearchListCore(
|
child: MessageSearchListCore(
|
||||||
filters: widget.filters,
|
filters: widget.filters,
|
||||||
sortOptions: widget.sortOptions,
|
sortOptions: widget.sortOptions,
|
||||||
messageQuery: widget.messageQuery,
|
messageQuery: widget.messageQuery,
|
||||||
@@ -198,7 +198,7 @@ class _MessageSearchListViewState extends State<MessageSearchListView> {
|
|||||||
),
|
),
|
||||||
childBuilder: widget.childBuilder ?? _buildListView,
|
childBuilder: widget.childBuilder ?? _buildListView,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _separatorBuilder(BuildContext context, int index) => Container(
|
Widget _separatorBuilder(BuildContext context, int index) => Container(
|
||||||
height: 1,
|
height: 1,
|
||||||
|
|||||||
@@ -164,12 +164,12 @@ class _UserListViewState extends State<UserListView>
|
|||||||
color: UserListViewTheme.of(context).backgroundColor!,
|
color: UserListViewTheme.of(context).backgroundColor!,
|
||||||
child: UserListCore(
|
child: UserListCore(
|
||||||
errorBuilder: widget.errorBuilder ??
|
errorBuilder: widget.errorBuilder ??
|
||||||
(BuildContext context, Object err) => _buildError(err),
|
(BuildContext context, Object err) => _buildError(err),
|
||||||
emptyBuilder: widget.emptyBuilder ?? (context) => _buildEmpty(),
|
emptyBuilder: widget.emptyBuilder ?? (context) => _buildEmpty(),
|
||||||
loadingBuilder: widget.loadingBuilder ??
|
loadingBuilder: widget.loadingBuilder ??
|
||||||
(context) => LayoutBuilder(
|
(context) => LayoutBuilder(
|
||||||
builder: (context, viewportConstraints) =>
|
builder: (context, viewportConstraints) =>
|
||||||
SingleChildScrollView(
|
SingleChildScrollView(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
@@ -180,9 +180,9 @@ class _UserListViewState extends State<UserListView>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
listBuilder:
|
listBuilder:
|
||||||
widget.listBuilder ?? (context, list) => _buildListView(list),
|
widget.listBuilder ?? (context, list) => _buildListView(list),
|
||||||
pagination: widget.pagination,
|
pagination: widget.pagination,
|
||||||
sort: widget.sort,
|
sort: widget.sort,
|
||||||
filter: widget.filter,
|
filter: widget.filter,
|
||||||
|
|||||||
@@ -73,32 +73,32 @@ void main() {
|
|||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'Passing no ChannelListViewThemeData returns default dark theme values',
|
'Passing no ChannelListViewThemeData returns default dark theme values',
|
||||||
(WidgetTester tester) async {
|
(WidgetTester tester) async {
|
||||||
late BuildContext _context;
|
late BuildContext _context;
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
builder: (context, child) => StreamChat(
|
builder: (context, child) => StreamChat(
|
||||||
client: MockClient(),
|
client: MockClient(),
|
||||||
streamChatThemeData: StreamChatThemeData.dark(),
|
streamChatThemeData: StreamChatThemeData.dark(),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
home: Builder(
|
home: Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
_context = context;
|
_context = context;
|
||||||
return const Scaffold(
|
return const Scaffold(
|
||||||
body: UsersBloc(
|
body: UsersBloc(
|
||||||
child: UserListView(),
|
child: UserListView(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final userListViewTheme = UserListViewTheme.of(_context);
|
final userListViewTheme = UserListViewTheme.of(_context);
|
||||||
expect(userListViewTheme.backgroundColor,
|
expect(userListViewTheme.backgroundColor,
|
||||||
_userListViewThemeDataControlDark.backgroundColor);
|
_userListViewThemeDataControlDark.backgroundColor);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
final _userListViewThemeDataControl = UserListViewThemeData(
|
final _userListViewThemeDataControl = UserListViewThemeData(
|
||||||
|
|||||||
Reference in New Issue
Block a user