Merge branches 'feature/new-ui' and 'qa3-fixes' of github.com:GetStream/stream-chat-flutter into qa3-fixes
Conflicts: lib/src/message_list_view.dart
This commit is contained in:
+87
-9
@@ -66,22 +66,29 @@ Future<bool> showConfirmationDialog(
|
||||
FlatButton(
|
||||
child: Text(
|
||||
cancelText,
|
||||
style: TextStyle(
|
||||
color: StreamChatTheme.of(context)
|
||||
.colorTheme
|
||||
.black
|
||||
.withOpacity(0.5),
|
||||
fontWeight: FontWeight.w400),
|
||||
style: StreamChatTheme.of(context)
|
||||
.textTheme
|
||||
.bodyBold
|
||||
.copyWith(
|
||||
color: StreamChatTheme.of(context)
|
||||
.colorTheme
|
||||
.black
|
||||
.withOpacity(0.5)),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pop(false);
|
||||
},
|
||||
),
|
||||
FlatButton(
|
||||
child: Text(
|
||||
okText,
|
||||
style: TextStyle(
|
||||
color: Colors.red, fontWeight: FontWeight.w400),
|
||||
style: StreamChatTheme.of(context)
|
||||
.textTheme
|
||||
.bodyBold
|
||||
.copyWith(
|
||||
color: StreamChatTheme.of(context)
|
||||
.colorTheme
|
||||
.accentRed),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context, true);
|
||||
@@ -94,6 +101,77 @@ Future<bool> showConfirmationDialog(
|
||||
});
|
||||
}
|
||||
|
||||
Future<bool> showInfoDialog(
|
||||
BuildContext context, {
|
||||
String title,
|
||||
Widget icon,
|
||||
String question,
|
||||
String okText,
|
||||
StreamChatThemeData theme,
|
||||
}) {
|
||||
return showModalBottomSheet(
|
||||
backgroundColor:
|
||||
theme.colorTheme.white ?? StreamChatTheme.of(context).colorTheme.white,
|
||||
context: context,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(16.0),
|
||||
topRight: Radius.circular(16.0),
|
||||
)),
|
||||
builder: (context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 26.0,
|
||||
),
|
||||
if (icon != null) icon,
|
||||
SizedBox(
|
||||
height: 26.0,
|
||||
),
|
||||
Text(
|
||||
title,
|
||||
style: theme.textTheme.headlineBold ??
|
||||
StreamChatTheme.of(context).textTheme.headlineBold,
|
||||
),
|
||||
SizedBox(
|
||||
height: 7.0,
|
||||
),
|
||||
Text(question),
|
||||
SizedBox(
|
||||
height: 36.0,
|
||||
),
|
||||
Container(
|
||||
color: theme.colorTheme.black.withOpacity(.08) ??
|
||||
StreamChatTheme.of(context).colorTheme.black.withOpacity(.08),
|
||||
height: 1.0,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
FlatButton(
|
||||
child: Text(
|
||||
okText,
|
||||
style: TextStyle(
|
||||
color: theme.colorTheme.black.withOpacity(0.5) ??
|
||||
StreamChatTheme.of(context)
|
||||
.colorTheme
|
||||
.black
|
||||
.withOpacity(0.5),
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// Get random png with initials
|
||||
String getRandomPicUrl(User user) =>
|
||||
'https://getstream.io/random_png/?id=${user.id}&name=${user.name}';
|
||||
|
||||
Reference in New Issue
Block a user