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