save config for advanced options
This commit is contained in:
@@ -7,6 +7,8 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
|
||||
import 'main.dart';
|
||||
import 'notifications_service.dart';
|
||||
import 'choose_user_page.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
|
||||
class AdvancedOptionsPage extends StatefulWidget {
|
||||
@override
|
||||
@@ -285,6 +287,20 @@ class _AdvancedOptionsPageState extends State<AdvancedOptionsPage> {
|
||||
if (!kIsWeb) {
|
||||
initNotifications(client);
|
||||
}
|
||||
|
||||
final secureStorage = FlutterSecureStorage();
|
||||
secureStorage.write(
|
||||
key: kStreamApiKey,
|
||||
value: apiKey,
|
||||
);
|
||||
secureStorage.write(
|
||||
key: kStreamUserId,
|
||||
value: userId,
|
||||
);
|
||||
secureStorage.write(
|
||||
key: kStreamToken,
|
||||
value: userToken,
|
||||
);
|
||||
} catch (e) {
|
||||
var errorText = 'Error connecting, retry';
|
||||
if (e is Map) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: example
|
||||
description: A new Flutter project.
|
||||
version: 1.0.73+75
|
||||
version: 1.0.74+76
|
||||
|
||||
environment:
|
||||
sdk: ">=2.2.2 <3.0.0"
|
||||
|
||||
@@ -104,7 +104,7 @@ class ChannelPreview extends StatelessWidget {
|
||||
.isAfter(channel
|
||||
.state.lastMessage.createdAt))
|
||||
.length ==
|
||||
(channel.memberCount ?? 0) - 1,
|
||||
(channel.memberCount ?? 0),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -426,12 +426,13 @@ class _MessageWidgetState extends State<MessageWidget> {
|
||||
top: 0,
|
||||
child: Material(
|
||||
color: Colors.white,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
shape: CircleBorder(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
child: UserAvatar(
|
||||
user: e.user,
|
||||
constraints: BoxConstraints.loose(Size.fromRadius(16)),
|
||||
constraints: BoxConstraints.loose(Size.fromRadius(8)),
|
||||
showOnlineStatus: false,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -40,6 +40,7 @@ class UserAvatar extends StatelessWidget {
|
||||
final streamChatTheme = StreamChatTheme.of(context);
|
||||
|
||||
Widget avatar = ClipRRect(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
borderRadius: borderRadius ??
|
||||
streamChatTheme.ownMessageTheme.avatarTheme.borderRadius,
|
||||
child: Container(
|
||||
|
||||
Reference in New Issue
Block a user