Skip to content

Commit 604c8a3

Browse files
Merge pull request #14 from sendbird/v1.0.1
Add 1.0.1.
2 parents 3a9c79d + 5854774 commit 604c8a3

File tree

4 files changed

+48
-23
lines changed

4 files changed

+48
-23
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v1.0.1 (Jan 2, 2025)
2+
- Updated `README.md`
3+
14
## v1.0.0 (Dec 6, 2024)
25
- GA
36

README.md

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Add following dependencies and fonts for `SendbirdIcons` in `pubspec.yaml`.
3838

3939
```yaml
4040
dependencies:
41-
sendbird_uikit: ^1.0.0
41+
sendbird_uikit: ^1.0.1
4242
sendbird_chat_sdk: ^4.2.30
4343

4444
flutter:
@@ -64,12 +64,7 @@ void main() async {
6464
await SendbirdUIKit.init(appId: 'YOUR_APP_ID');
6565
await SendbirdUIKit.connect('YOUR_USER_ID');
6666
67-
runApp(SendbirdUIKit.provider(
68-
child: const MaterialApp(
69-
debugShowCheckedModeBanner: false,
70-
home: MyApp(), // This class will be implemented below.
71-
),
72-
));
67+
runApp(const MyApp());
7368
}
7469
```
7570

@@ -81,6 +76,27 @@ You can easily add `SBUGroupChannelListScreen`, `SBUGroupChannelCreateScreen` an
8176
class MyApp extends StatelessWidget {
8277
const MyApp({super.key});
8378
79+
@override
80+
Widget build(BuildContext context) {
81+
return MaterialApp(
82+
debugShowCheckedModeBanner: false,
83+
builder: (context, child) {
84+
return SendbirdUIKit.provider(
85+
child: Navigator(
86+
onGenerateRoute: (settings) => MaterialPageRoute(
87+
builder: (context) => child!,
88+
),
89+
),
90+
);
91+
},
92+
home: const HomeScreen(), // Separate screen widget
93+
);
94+
}
95+
}
96+
97+
class HomeScreen extends StatelessWidget {
98+
const HomeScreen({super.key});
99+
84100
@override
85101
Widget build(BuildContext context) {
86102
return Scaffold(
@@ -98,29 +114,35 @@ class MyApp extends StatelessWidget {
98114
}
99115
100116
void moveToGroupChannelCreateScreen(BuildContext context) {
101-
Navigator.of(context).push(MaterialPageRoute(
102-
builder: (_) => Scaffold(
103-
body: SafeArea(
104-
child: SBUGroupChannelCreateScreen(
105-
onChannelCreated: (channel) {
106-
moveToGroupChannelScreen(context, channel.channelUrl);
107-
},
117+
Navigator.push(
118+
context,
119+
MaterialPageRoute(
120+
builder: (context) => Scaffold(
121+
body: SafeArea(
122+
child: SBUGroupChannelCreateScreen(
123+
onChannelCreated: (channel) {
124+
moveToGroupChannelScreen(context, channel.channelUrl);
125+
},
126+
),
108127
),
109128
),
110129
),
111-
));
130+
);
112131
}
113132
114133
void moveToGroupChannelScreen(BuildContext context, String channelUrl) {
115-
Navigator.of(context).push(MaterialPageRoute(
116-
builder: (_) => Scaffold(
117-
body: SafeArea(
118-
child: SBUGroupChannelScreen(
119-
channelUrl: channelUrl,
134+
Navigator.push(
135+
context,
136+
MaterialPageRoute(
137+
builder: (context) => Scaffold(
138+
body: SafeArea(
139+
child: SBUGroupChannelScreen(
140+
channelUrl: channelUrl,
141+
),
120142
),
121143
),
122144
),
123-
));
145+
);
124146
}
125147
}
126148
```

lib/src/public/sendbird_uikit.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import 'package:sendbird_uikit/src/internal/utils/sbu_reply_manager.dart';
1818
/// SendbirdUIKit
1919
class SendbirdUIKit {
2020
/// UIKit version
21-
static const version = '1.0.0';
21+
static const version = '1.0.1';
2222

2323
SendbirdUIKit._();
2424

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sendbird_uikit
22
description: With Sendbird UIKit for Flutter, you can easily build an in-app chat with all the essential messaging features.
3-
version: 1.0.0
3+
version: 1.0.1
44
homepage: https://sendbird.com
55
repository: https://github.com/sendbird/sendbird-uikit-flutter
66
documentation: https://sendbird.com/docs/chat/uikit/v3/flutter/overview

0 commit comments

Comments
 (0)