mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Fix a few notices
This commit is contained in:
		@@ -37,8 +37,7 @@ class AdvancedGroupInfo extends Group implements LikeElement {
 | 
			
		||||
    required this.userLike,
 | 
			
		||||
    required this.conversations,
 | 
			
		||||
    required this.isForezGroup,
 | 
			
		||||
  })  : assert(isForezGroup != null),
 | 
			
		||||
        super(
 | 
			
		||||
  }) : super(
 | 
			
		||||
            id: id,
 | 
			
		||||
            name: name,
 | 
			
		||||
            iconURL: iconURL,
 | 
			
		||||
@@ -53,8 +52,7 @@ class AdvancedGroupInfo extends Group implements LikeElement {
 | 
			
		||||
  @override
 | 
			
		||||
  LikesType likeType = LikesType.GROUP;
 | 
			
		||||
 | 
			
		||||
  get hasURL => url != null && url.isNotEmpty && url != "null";
 | 
			
		||||
  get hasURL => url.isNotEmpty && url != "null";
 | 
			
		||||
 | 
			
		||||
  get hasDescription =>
 | 
			
		||||
      description != null && description.isNotEmpty && description != "null";
 | 
			
		||||
  get hasDescription => description.isNotEmpty && description != "null";
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -32,21 +32,15 @@ class APIRequest {
 | 
			
		||||
  Map<String, File> files = Map();
 | 
			
		||||
  Map<String, BytesFile?> bytesFiles = Map();
 | 
			
		||||
 | 
			
		||||
  APIRequest({required this.uri, this.needLogin = false, this.args})
 | 
			
		||||
      : assert(uri != null),
 | 
			
		||||
        assert(needLogin != null) {
 | 
			
		||||
  APIRequest({required this.uri, this.needLogin = false, this.args}) {
 | 
			
		||||
    if (this.args == null) this.args = Map();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  APIRequest.withLogin(this.uri, {this.args})
 | 
			
		||||
      : needLogin = true,
 | 
			
		||||
        assert(uri != null) {
 | 
			
		||||
  APIRequest.withLogin(this.uri, {this.args}) : needLogin = true {
 | 
			
		||||
    if (args == null) this.args = Map();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  APIRequest.withoutLogin(this.uri, {this.args})
 | 
			
		||||
      : needLogin = false,
 | 
			
		||||
        assert(uri != null) {
 | 
			
		||||
  APIRequest.withoutLogin(this.uri, {this.args}) : needLogin = false {
 | 
			
		||||
    if (args == null) this.args = Map();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,3 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/// Call configuration
 | 
			
		||||
///
 | 
			
		||||
/// @author Pierre Hubert
 | 
			
		||||
@@ -9,7 +7,7 @@ class CallConfig {
 | 
			
		||||
 | 
			
		||||
  const CallConfig({
 | 
			
		||||
    required this.iceServers,
 | 
			
		||||
  }) : assert(iceServers != null);
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  /// Turn this call configuration into the right for the WebRTC plugin
 | 
			
		||||
  Map<String, dynamic> get pluginConfig => {
 | 
			
		||||
 
 | 
			
		||||
@@ -112,8 +112,7 @@ class ConversationServerMessage {
 | 
			
		||||
    required this.userAdded,
 | 
			
		||||
    required this.userWhoRemoved,
 | 
			
		||||
    required this.userRemoved,
 | 
			
		||||
  })  : assert(type != null),
 | 
			
		||||
        assert(userID != null ||
 | 
			
		||||
  })  : assert(userID != null ||
 | 
			
		||||
            (type != ConversationServerMessageType.USER_CREATED_CONVERSATION &&
 | 
			
		||||
                type != ConversationServerMessageType.USER_LEFT_CONV)),
 | 
			
		||||
        assert((userWhoAdded != null && userAdded != null) ||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,17 +24,9 @@ class Survey {
 | 
			
		||||
    required this.userChoice,
 | 
			
		||||
    required this.choices,
 | 
			
		||||
    required this.allowNewChoicesCreation,
 | 
			
		||||
  })  : assert(id != null),
 | 
			
		||||
        assert(userID != null),
 | 
			
		||||
        assert(postID != null),
 | 
			
		||||
        assert(creationTime != null),
 | 
			
		||||
        assert(question != null),
 | 
			
		||||
        assert(userChoice != null),
 | 
			
		||||
        assert(choices != null),
 | 
			
		||||
        assert(choices.length > 0),
 | 
			
		||||
        assert(allowNewChoicesCreation != null);
 | 
			
		||||
  }) : assert(choices.length > 0);
 | 
			
		||||
 | 
			
		||||
  bool get hasResponded => this.userChoice != null && this.userChoice > 0;
 | 
			
		||||
  bool get hasResponded => this.userChoice > 0;
 | 
			
		||||
 | 
			
		||||
  bool get hasResponses =>
 | 
			
		||||
      this.choices.where((f) => f.responses > 0).length > 0;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user