1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-21 01:05:18 +00:00

Fix a few notices

This commit is contained in:
2022-03-11 17:09:37 +01:00
parent 0f9a59b4a7
commit 41446f0e5b
22 changed files with 36 additions and 139 deletions

View File

@ -246,9 +246,7 @@ class _ResetPasswordBodyState extends SafeState<_ResetPasswordBody> {
class _Spacer extends StatelessWidget {
final bool visible;
const _Spacer({Key? key, this.visible = true})
: assert(visible != null),
super(key: key);
const _Spacer({Key? key, this.visible = true}) : super(key: key);
@override
Widget build(BuildContext context) {

View File

@ -50,8 +50,9 @@ abstract class MainController extends State<MainRoute> {
int get numberOfPages => _pagesStack.length;
/// Get current instance of Home controller
///
/// A future implementation might need context again, that is why it is required
static MainController? of(BuildContext context) {
assert(context != null); // A future implementation might need context again
return mainControllerKey.currentState;
}

View File

@ -126,7 +126,7 @@ class PushNotificationsConfigurationWidgetState
available: srvConfig!.notificationsPolicy.hasFirebase,
onChanged: (s) {
setState(() => currStatus = s);
if (widget.onChanged != null) widget.onChanged();
widget.onChanged();
},
),
SizedBox(height: 5),

View File

@ -129,8 +129,7 @@ class _NewCustomEmojiDialog extends StatefulWidget {
const _NewCustomEmojiDialog({
Key? key,
required this.currentList,
}) : assert(currentList != null),
super(key: key);
}) : super(key: key);
@override
_NewCustomEmojiDialogState createState() => _NewCustomEmojiDialogState();