Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v1.0.1 (Jan 2, 2025)
- Updated `README.md`

## v1.0.0 (Dec 6, 2024)
- GA

Expand Down
64 changes: 43 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Add following dependencies and fonts for `SendbirdIcons` in `pubspec.yaml`.

```yaml
dependencies:
sendbird_uikit: ^1.0.0
sendbird_uikit: ^1.0.1
sendbird_chat_sdk: ^4.2.30

flutter:
Expand All @@ -64,12 +64,7 @@ void main() async {
await SendbirdUIKit.init(appId: 'YOUR_APP_ID');
await SendbirdUIKit.connect('YOUR_USER_ID');

runApp(SendbirdUIKit.provider(
child: const MaterialApp(
debugShowCheckedModeBanner: false,
home: MyApp(), // This class will be implemented below.
),
));
runApp(const MyApp());
}
```

Expand All @@ -81,6 +76,27 @@ You can easily add `SBUGroupChannelListScreen`, `SBUGroupChannelCreateScreen` an
class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
builder: (context, child) {
return SendbirdUIKit.provider(
child: Navigator(
onGenerateRoute: (settings) => MaterialPageRoute(
builder: (context) => child!,
),
),
);
},
home: const HomeScreen(), // Separate screen widget
);
}
}

class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -98,29 +114,35 @@ class MyApp extends StatelessWidget {
}

void moveToGroupChannelCreateScreen(BuildContext context) {
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => Scaffold(
body: SafeArea(
child: SBUGroupChannelCreateScreen(
onChannelCreated: (channel) {
moveToGroupChannelScreen(context, channel.channelUrl);
},
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Scaffold(
body: SafeArea(
child: SBUGroupChannelCreateScreen(
onChannelCreated: (channel) {
moveToGroupChannelScreen(context, channel.channelUrl);
},
),
),
),
),
));
);
}

void moveToGroupChannelScreen(BuildContext context, String channelUrl) {
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => Scaffold(
body: SafeArea(
child: SBUGroupChannelScreen(
channelUrl: channelUrl,
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Scaffold(
body: SafeArea(
child: SBUGroupChannelScreen(
channelUrl: channelUrl,
),
),
),
),
));
);
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion lib/src/public/sendbird_uikit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'package:sendbird_uikit/src/internal/utils/sbu_reply_manager.dart';
/// SendbirdUIKit
class SendbirdUIKit {
/// UIKit version
static const version = '1.0.0';
static const version = '1.0.1';

SendbirdUIKit._();

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sendbird_uikit
description: With Sendbird UIKit for Flutter, you can easily build an in-app chat with all the essential messaging features.
version: 1.0.0
version: 1.0.1
homepage: https://sendbird.com
repository: https://github.com/sendbird/sendbird-uikit-flutter
documentation: https://sendbird.com/docs/chat/uikit/v3/flutter/overview
Expand Down