mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 12:14:11 +00:00 
			
		
		
		
	Fix a few notices
This commit is contained in:
		@@ -21,9 +21,7 @@ class ConversationMessageStatsRoute extends StatefulWidget {
 | 
			
		||||
    Key? key,
 | 
			
		||||
    required this.conv,
 | 
			
		||||
    required this.message,
 | 
			
		||||
  })  : assert(conv != null),
 | 
			
		||||
        assert(message != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
  })  : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  _ConversationMessageStatsRouteState createState() =>
 | 
			
		||||
 
 | 
			
		||||
@@ -21,8 +21,7 @@ class ConversationRoute extends StatefulWidget {
 | 
			
		||||
  const ConversationRoute({
 | 
			
		||||
    Key? key,
 | 
			
		||||
    required this.conversationID,
 | 
			
		||||
  })  : assert(conversationID != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
  }) : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  State<StatefulWidget> createState() => _ConversationRouteState();
 | 
			
		||||
@@ -69,7 +68,7 @@ class _ConversationRouteState extends SafeState<ConversationRoute> {
 | 
			
		||||
 | 
			
		||||
  Widget _buildRouteBody() {
 | 
			
		||||
    //Handle errors
 | 
			
		||||
    if (_error != null && _error)
 | 
			
		||||
    if (_error)
 | 
			
		||||
      return buildErrorCard(
 | 
			
		||||
        tr("Could not get conversation information!"),
 | 
			
		||||
        actions: <Widget>[
 | 
			
		||||
 
 | 
			
		||||
@@ -26,8 +26,7 @@ class PresenceSettings extends StatefulWidget {
 | 
			
		||||
  const PresenceSettings({
 | 
			
		||||
    Key? key,
 | 
			
		||||
    required this.groupID,
 | 
			
		||||
  })  : assert(groupID != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
  }) : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  _PresenceSettingsState createState() => _PresenceSettingsState();
 | 
			
		||||
 
 | 
			
		||||
@@ -82,8 +82,6 @@ class _ResetPasswordBodyState extends SafeState<_ResetPasswordBody> {
 | 
			
		||||
      case _SelectedOption.SECURITY_QUESTIONS:
 | 
			
		||||
        return _buildSecurityQuestionsScreen();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    throw Exception("Unreachable statement!");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  Widget _buildEnterEmailAddressScreen() {
 | 
			
		||||
@@ -120,7 +118,7 @@ class _ResetPasswordBodyState extends SafeState<_ResetPasswordBody> {
 | 
			
		||||
      _setLoading(true);
 | 
			
		||||
 | 
			
		||||
      // Check if email address exists or not
 | 
			
		||||
      if (!await AccountHelper.existsMailAccount(_inputEmail) ) {
 | 
			
		||||
      if (!await AccountHelper.existsMailAccount(_inputEmail)) {
 | 
			
		||||
        _setLoading(false);
 | 
			
		||||
        showSimpleSnack(context, tr("Specified email address was not found!")!);
 | 
			
		||||
        return;
 | 
			
		||||
@@ -169,7 +167,8 @@ class _ResetPasswordBodyState extends SafeState<_ResetPasswordBody> {
 | 
			
		||||
        context: context,
 | 
			
		||||
        builder: (c) => AlertDialog(
 | 
			
		||||
              title: Text("Contact us"),
 | 
			
		||||
              content: Text(tr("You can reach us at contact@communiquons.org")!),
 | 
			
		||||
              content:
 | 
			
		||||
                  Text(tr("You can reach us at contact@communiquons.org")!),
 | 
			
		||||
              actions: <Widget>[CancelDialogButton()],
 | 
			
		||||
            ));
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ import 'package:url_launcher/url_launcher.dart';
 | 
			
		||||
class FullScreenImageRoute extends StatefulWidget {
 | 
			
		||||
  final String url;
 | 
			
		||||
 | 
			
		||||
  FullScreenImageRoute(this.url) : assert(url != null);
 | 
			
		||||
  FullScreenImageRoute(this.url);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  _FullScreenImageRouteState createState() => _FullScreenImageRouteState();
 | 
			
		||||
 
 | 
			
		||||
@@ -31,8 +31,5 @@ class PageInfo {
 | 
			
		||||
    this.id,
 | 
			
		||||
    this.hideNavBar = false,
 | 
			
		||||
    this.canShowAsDialog = false,
 | 
			
		||||
  })  : assert(type != null),
 | 
			
		||||
        assert(child != null),
 | 
			
		||||
        assert(hideNavBar != null),
 | 
			
		||||
        assert(canShowAsDialog != null);
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -19,8 +19,7 @@ class PasswordResetRoute extends StatelessWidget {
 | 
			
		||||
  const PasswordResetRoute({
 | 
			
		||||
    Key? key,
 | 
			
		||||
    required this.token,
 | 
			
		||||
  })  : assert(token != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
  })  : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Widget build(BuildContext context) {
 | 
			
		||||
@@ -39,8 +38,7 @@ class _PasswordResetBody extends StatefulWidget {
 | 
			
		||||
  final String token;
 | 
			
		||||
 | 
			
		||||
  const _PasswordResetBody({Key? key, required this.token})
 | 
			
		||||
      : assert(token != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
      : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  __PasswordResetBodyState createState() => __PasswordResetBodyState();
 | 
			
		||||
 
 | 
			
		||||
@@ -140,7 +140,7 @@ class PushNotificationsConfigurationWidgetState
 | 
			
		||||
                  srvConfig!.notificationsPolicy.hasIndependent && isAndroid,
 | 
			
		||||
              onChanged: (s) {
 | 
			
		||||
                setState(() => currStatus = s);
 | 
			
		||||
                if (widget.onChanged != null) widget.onChanged();
 | 
			
		||||
                widget.onChanged();
 | 
			
		||||
              },
 | 
			
		||||
            ),
 | 
			
		||||
            SizedBox(height: 5),
 | 
			
		||||
@@ -151,7 +151,7 @@ class PushNotificationsConfigurationWidgetState
 | 
			
		||||
              available: true,
 | 
			
		||||
              onChanged: (s) {
 | 
			
		||||
                setState(() => currStatus = s);
 | 
			
		||||
                if (widget.onChanged != null) widget.onChanged();
 | 
			
		||||
                widget.onChanged();
 | 
			
		||||
              },
 | 
			
		||||
            ),
 | 
			
		||||
          ],
 | 
			
		||||
@@ -195,12 +195,7 @@ class _NotificationOption extends StatelessWidget {
 | 
			
		||||
    required this.current,
 | 
			
		||||
    required this.available,
 | 
			
		||||
    required this.onChanged,
 | 
			
		||||
  })  : assert(title != null),
 | 
			
		||||
        assert(option != null),
 | 
			
		||||
        assert(current != null),
 | 
			
		||||
        assert(available != null),
 | 
			
		||||
        assert(onChanged != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
  }) : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Widget build(BuildContext context) => !available
 | 
			
		||||
 
 | 
			
		||||
@@ -180,9 +180,7 @@ class DataConservationPolicyTile extends SettingsTile {
 | 
			
		||||
    required this.title,
 | 
			
		||||
    required this.onChange,
 | 
			
		||||
    required this.minValue,
 | 
			
		||||
  })  : assert(title != null),
 | 
			
		||||
        assert(onChange != null),
 | 
			
		||||
        assert(minValue != null);
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Widget build(BuildContext context) {
 | 
			
		||||
 
 | 
			
		||||
@@ -140,8 +140,7 @@ class _SecurityQuestionsDialog extends StatefulWidget {
 | 
			
		||||
  final SecuritySettings settings;
 | 
			
		||||
 | 
			
		||||
  const _SecurityQuestionsDialog({Key? key, required this.settings})
 | 
			
		||||
      : assert(settings != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
      : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  __SecurityQuestionsDialogState createState() =>
 | 
			
		||||
 
 | 
			
		||||
@@ -31,10 +31,7 @@ class _SettingsSection {
 | 
			
		||||
    required this.subtitle,
 | 
			
		||||
    required this.icon,
 | 
			
		||||
    required this.onBuild,
 | 
			
		||||
  })  : assert(title != null),
 | 
			
		||||
        assert(subtitle != null),
 | 
			
		||||
        assert(icon != null),
 | 
			
		||||
        assert(onBuild != null);
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class AccountSettingsRoute extends StatelessWidget {
 | 
			
		||||
 
 | 
			
		||||
@@ -14,8 +14,7 @@ class SinglePostRoute extends StatelessWidget {
 | 
			
		||||
  const SinglePostRoute({
 | 
			
		||||
    Key? key,
 | 
			
		||||
    required this.postID,
 | 
			
		||||
  })  : assert(postID != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
  }) : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Widget build(BuildContext context) {
 | 
			
		||||
@@ -34,8 +33,7 @@ class _SinglePostRouteBody extends StatefulWidget {
 | 
			
		||||
  const _SinglePostRouteBody({
 | 
			
		||||
    Key? key,
 | 
			
		||||
    required this.postID,
 | 
			
		||||
  })  : assert(postID != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
  })  : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  __SinglePostRouteBodyState createState() => __SinglePostRouteBodyState();
 | 
			
		||||
 
 | 
			
		||||
@@ -9,8 +9,7 @@ class UpdateConversationRoute extends StatefulWidget {
 | 
			
		||||
  final int conversationID;
 | 
			
		||||
 | 
			
		||||
  const UpdateConversationRoute({Key? key, required this.conversationID})
 | 
			
		||||
      : assert(conversationID != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
      : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  State<StatefulWidget> createState() => _UpdateConversationRoute();
 | 
			
		||||
 
 | 
			
		||||
@@ -15,8 +15,7 @@ class VideoPlayerRoute extends StatefulWidget {
 | 
			
		||||
  const VideoPlayerRoute({
 | 
			
		||||
    Key? key,
 | 
			
		||||
    required this.url,
 | 
			
		||||
  })  : assert(url != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
  }) : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  _VideoPlayerRouteState createState() => _VideoPlayerRouteState();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user