mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-09-18 21:38:48 +00:00
Continue to fix deprecation warnings
This commit is contained in:
@@ -544,7 +544,7 @@ class _CallScreenState extends SafeState<CallScreen> {
|
||||
.where((f) => f.hasVideoStream && _renderers.containsKey(f.userID))
|
||||
.toList();
|
||||
|
||||
final rows = List<Row>();
|
||||
final rows = <Row>[];
|
||||
|
||||
var numberRows = sqrt(availableVideos.length).ceil();
|
||||
var numberCols = numberRows;
|
||||
|
@@ -355,7 +355,7 @@ class _ConversationScreenState extends SafeState<ConversationScreen> {
|
||||
|
||||
//Check the result of the operation
|
||||
if (result != SendMessageResult.SUCCESS)
|
||||
Scaffold.of(context).showSnackBar(
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
result == SendMessageResult.MESSAGE_REJECTED
|
||||
@@ -637,7 +637,7 @@ class _ConversationScreenState extends SafeState<ConversationScreen> {
|
||||
Spacer(flex: 1),
|
||||
Text("${(_sendProgress * 100).toInt()}%"),
|
||||
Spacer(flex: 1),
|
||||
OutlineButton(
|
||||
OutlinedButton(
|
||||
onPressed: () => _sendCancel.cancel(),
|
||||
child: Text(tr("Cancel").toUpperCase()),
|
||||
),
|
||||
@@ -724,13 +724,13 @@ class _ConversationScreenState extends SafeState<ConversationScreen> {
|
||||
textAlign: TextAlign.justify,
|
||||
),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text(
|
||||
tr("Cancel").toUpperCase(),
|
||||
),
|
||||
onPressed: () => Navigator.pop(c, false),
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text(
|
||||
tr("Confirm").toUpperCase(),
|
||||
style: TextStyle(color: Colors.red),
|
||||
|
@@ -87,7 +87,7 @@ class _ConversationScreenState extends SafeState<ConversationsListScreen> {
|
||||
return buildErrorCard(
|
||||
tr("Could not retrieve the list of conversations!"),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
TextButton(
|
||||
onPressed: () => _refreshIndicatorKey.currentState.show(),
|
||||
child: Text(
|
||||
tr("Retry").toUpperCase(),
|
||||
@@ -138,7 +138,7 @@ class _ConversationScreenState extends SafeState<ConversationsListScreen> {
|
||||
await _conversationsHelper.deleteConversation(conversation.id);
|
||||
} catch (e, s) {
|
||||
print("Failed to leave conversation! $e => $s");
|
||||
Scaffold.of(context).showSnackBar(
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(tr("Could not leave the conversation!"))));
|
||||
}
|
||||
|
||||
|
@@ -91,7 +91,7 @@ class _FriendsListScreenState extends SafeState<FriendsListScreen> {
|
||||
Widget _buildError() => buildErrorCard(
|
||||
tr("Could not load your list of friends!"),
|
||||
actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
onPressed: _refreshList,
|
||||
child: Text(
|
||||
tr("Retry").toUpperCase(),
|
||||
@@ -171,11 +171,11 @@ class _FriendsListScreenState extends SafeState<FriendsListScreen> {
|
||||
content: Text(tr(
|
||||
"Are you sure do you want to remove this friend from your list of friends ? A friendship request will have to be sent to get this user back to your list!")),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, false),
|
||||
child: Text(tr("Cancel").toUpperCase()),
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, true),
|
||||
child: Text(
|
||||
tr("Confirm").toUpperCase(),
|
||||
|
@@ -97,7 +97,7 @@ class _OtherUserFriendsListScreenState
|
||||
"Could not get the list of friends of this user !",
|
||||
),
|
||||
actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text(
|
||||
tr("Try again").toUpperCase(),
|
||||
style: TextStyle(color: Colors.white),
|
||||
|
@@ -337,17 +337,19 @@ class _UpdateConversationScreen extends State<UpdateConversationScreen> {
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
OutlineButton(
|
||||
OutlinedButton(
|
||||
onPressed: _uploadNewLogo,
|
||||
child: Text(tr("Change logo")),
|
||||
),
|
||||
SizedBox(width: 5),
|
||||
_image == null
|
||||
? Container()
|
||||
: OutlineButton(
|
||||
: ElevatedButton(
|
||||
onPressed: _deleteLogo,
|
||||
child: Text(tr("Delete logo")),
|
||||
highlightedBorderColor: Colors.red,
|
||||
style: ButtonStyle(
|
||||
backgroundColor:
|
||||
MaterialStateProperty.all(Colors.red)),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
@@ -99,7 +99,7 @@ class _UserPageScreenState extends SafeState<UserPageScreen> {
|
||||
body: Center(
|
||||
child:
|
||||
buildErrorCard(tr("Could not get user information!"), actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
onPressed: _getUserInfo,
|
||||
child: Text(
|
||||
tr("Retry").toUpperCase(),
|
||||
|
Reference in New Issue
Block a user