Skip to content

Commit 78ac1b6

Browse files
committed
feat(repo): flutter 3.38.1 (#2495)
1 parent ae4d075 commit 78ac1b6

613 files changed

Lines changed: 23935 additions & 27402 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ updates:
2525
# All packages grouped into a single configuration using multi-directory support
2626
- package-ecosystem: "pub"
2727
directories:
28-
- "/sample_app"
2928
- "/packages/stream_chat"
3029
- "/packages/stream_chat_flutter_core"
3130
- "/packages/stream_chat_flutter"

.github/workflows/legacy_version_analyze.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: legacy_version_analyze
33
env:
44
# Note: The versions below should be manually updated after a new stable
55
# version comes out.
6-
flutter_version: "3.27.4"
6+
flutter_version: "3.38.1"
77

88
on:
99
push:

analysis_options.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ analyzer:
44
- packages/*/lib/scrollable_positioned_list/**
55
- packages/*/lib/**/*.freezed.dart
66

7+
formatter:
8+
page_width: 120
9+
trailing_commas: preserve
10+
711
linter:
812
rules:
913
# these rules are documented on and in the same order as
@@ -64,7 +68,6 @@ linter:
6468
- leading_newlines_in_multiline_strings
6569
- library_names
6670
- library_prefixes
67-
- lines_longer_than_80_chars
6871
- missing_whitespace_between_adjacent_strings
6972
- non_constant_identifier_names
7073
- null_closures

melos.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: stream_chat_flutter
1+
name: stream_chat_flutter_workspace
22
repository: https://github.com/GetStream/stream-chat-flutter
33

44
packages:
@@ -18,9 +18,9 @@ command:
1818
bootstrap:
1919
# Dart and Flutter environment used in the project.
2020
environment:
21-
sdk: ^3.6.2
21+
sdk: ^3.10.0
2222
# We are not using carat '^' syntax here because flutter don't follow semantic versioning.
23-
flutter: ">=3.27.4"
23+
flutter: ">=3.38.1"
2424

2525
# List of all the dependencies used in the project.
2626
dependencies:

packages/stream_chat/example/lib/main.dart

Lines changed: 98 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ Future<void> main() async {
1717
User(
1818
id: 'cool-shadow-7',
1919
name: 'Cool Shadow',
20-
image:
21-
'https://getstream.io/random_png/?id=cool-shadow-7&amp;name=Cool+shadow',
20+
image: 'https://getstream.io/random_png/?id=cool-shadow-7&amp;name=Cool+shadow',
2221
),
2322
'''eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiY29vbC1zaGFkb3ctNyJ9.gkOlCRb1qgy4joHPaxFwPOdXcGvSPvp6QY0S4mpRkVo''',
2423
);
@@ -60,9 +59,9 @@ class StreamExample extends StatelessWidget {
6059

6160
@override
6261
Widget build(BuildContext context) => MaterialApp(
63-
title: 'Stream Chat Dart Example',
64-
home: HomeScreen(channel: channel),
65-
);
62+
title: 'Stream Chat Dart Example',
63+
home: HomeScreen(channel: channel),
64+
);
6665
}
6766

6867
/// Main screen of our application. The layout is comprised of an [AppBar]
@@ -87,30 +86,31 @@ class HomeScreen extends StatelessWidget {
8786
body: SafeArea(
8887
child: StreamBuilder<List<Message>?>(
8988
stream: messages,
90-
builder: (
91-
BuildContext context,
92-
AsyncSnapshot<List<Message>?> snapshot,
93-
) {
94-
if (snapshot.hasData && snapshot.data != null) {
95-
return MessageView(
96-
messages: snapshot.data!.reversed.toList(),
97-
channel: channel,
98-
);
99-
} else if (snapshot.hasError) {
100-
return const Center(
101-
child: Text(
102-
'There was an error loading messages. Please see logs.',
103-
),
104-
);
105-
}
106-
return const Center(
107-
child: SizedBox(
108-
width: 100,
109-
height: 100,
110-
child: CircularProgressIndicator(),
111-
),
112-
);
113-
},
89+
builder:
90+
(
91+
BuildContext context,
92+
AsyncSnapshot<List<Message>?> snapshot,
93+
) {
94+
if (snapshot.hasData && snapshot.data != null) {
95+
return MessageView(
96+
messages: snapshot.data!.reversed.toList(),
97+
channel: channel,
98+
);
99+
} else if (snapshot.hasError) {
100+
return const Center(
101+
child: Text(
102+
'There was an error loading messages. Please see logs.',
103+
),
104+
);
105+
}
106+
return const Center(
107+
child: SizedBox(
108+
width: 100,
109+
height: 100,
110+
child: CircularProgressIndicator(),
111+
),
112+
);
113+
},
114114
),
115115
),
116116
);
@@ -168,80 +168,80 @@ class _MessageViewState extends State<MessageView> {
168168

169169
@override
170170
Widget build(BuildContext context) => Column(
171-
children: [
172-
Expanded(
173-
child: ListView.builder(
174-
controller: _scrollController,
175-
itemCount: _messages.length,
176-
reverse: true,
177-
itemBuilder: (BuildContext context, int index) {
178-
final item = _messages[index];
179-
if (item.user?.id == widget.channel.client.uid) {
180-
return Align(
181-
alignment: Alignment.centerRight,
182-
child: Padding(
183-
padding: const EdgeInsets.all(8),
184-
child: Text(item.text ?? ''),
185-
),
186-
);
187-
} else {
188-
return Align(
189-
alignment: Alignment.centerLeft,
190-
child: Padding(
191-
padding: const EdgeInsets.all(8),
192-
child: Text(item.text ?? ''),
193-
),
194-
);
195-
}
196-
},
197-
),
198-
),
199-
Padding(
200-
padding: const EdgeInsets.all(8),
201-
child: Row(
202-
children: [
203-
Expanded(
204-
child: TextField(
205-
controller: _controller,
206-
decoration: const InputDecoration(
207-
hintText: 'Enter your message',
208-
),
209-
),
171+
children: [
172+
Expanded(
173+
child: ListView.builder(
174+
controller: _scrollController,
175+
itemCount: _messages.length,
176+
reverse: true,
177+
itemBuilder: (BuildContext context, int index) {
178+
final item = _messages[index];
179+
if (item.user?.id == widget.channel.client.uid) {
180+
return Align(
181+
alignment: Alignment.centerRight,
182+
child: Padding(
183+
padding: const EdgeInsets.all(8),
184+
child: Text(item.text ?? ''),
185+
),
186+
);
187+
} else {
188+
return Align(
189+
alignment: Alignment.centerLeft,
190+
child: Padding(
191+
padding: const EdgeInsets.all(8),
192+
child: Text(item.text ?? ''),
193+
),
194+
);
195+
}
196+
},
197+
),
198+
),
199+
Padding(
200+
padding: const EdgeInsets.all(8),
201+
child: Row(
202+
children: [
203+
Expanded(
204+
child: TextField(
205+
controller: _controller,
206+
decoration: const InputDecoration(
207+
hintText: 'Enter your message',
210208
),
211-
Material(
212-
type: MaterialType.circle,
213-
color: Colors.blue,
214-
clipBehavior: Clip.hardEdge,
215-
child: InkWell(
216-
onTap: () async {
217-
// We can send a new message by calling `sendMessage` on
218-
// the current channel. After sending a message, the
219-
// TextField is cleared and the list view is scrolled
220-
// to show the new item.
221-
if (_controller.value.text.isNotEmpty) {
222-
await widget.channel.sendMessage(
223-
Message(text: _controller.value.text),
224-
);
225-
_controller.clear();
226-
_updateList();
227-
}
228-
},
229-
child: const Padding(
230-
padding: EdgeInsets.all(8),
231-
child: Center(
232-
child: Icon(
233-
Icons.send,
234-
color: Colors.white,
235-
),
236-
),
209+
),
210+
),
211+
Material(
212+
type: MaterialType.circle,
213+
color: Colors.blue,
214+
clipBehavior: Clip.hardEdge,
215+
child: InkWell(
216+
onTap: () async {
217+
// We can send a new message by calling `sendMessage` on
218+
// the current channel. After sending a message, the
219+
// TextField is cleared and the list view is scrolled
220+
// to show the new item.
221+
if (_controller.value.text.isNotEmpty) {
222+
await widget.channel.sendMessage(
223+
Message(text: _controller.value.text),
224+
);
225+
_controller.clear();
226+
_updateList();
227+
}
228+
},
229+
child: const Padding(
230+
padding: EdgeInsets.all(8),
231+
child: Center(
232+
child: Icon(
233+
Icons.send,
234+
color: Colors.white,
237235
),
238236
),
239237
),
240-
],
238+
),
241239
),
242-
),
243-
],
244-
);
240+
],
241+
),
242+
),
243+
],
244+
);
245245
}
246246

247247
/// Helper extension for quickly retrieving

packages/stream_chat/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ version: 1.0.0+1
1717
# 2. Add it to the melos.yaml file for future updates.
1818

1919
environment:
20-
sdk: ^3.6.2
21-
flutter: ">=3.27.4"
20+
sdk: ^3.10.0
21+
flutter: ">=3.38.1"
2222

2323
dependencies:
2424
cupertino_icons: ^1.0.3

0 commit comments

Comments
 (0)