mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Start to fix null safety migration errors
This commit is contained in:
		@@ -9,11 +9,11 @@ class AccountImageTourPane extends PresentationPane {
 | 
			
		||||
  final Function(BuildContext) onUpdated;
 | 
			
		||||
 | 
			
		||||
  AccountImageTourPane({
 | 
			
		||||
    @required User user,
 | 
			
		||||
    @required this.onUpdated,
 | 
			
		||||
    required User user,
 | 
			
		||||
    required this.onUpdated,
 | 
			
		||||
  }) : super(
 | 
			
		||||
            iconWidget: AccountImageWidget(user: user, width: 50),
 | 
			
		||||
            title: tr("Account image"),
 | 
			
		||||
            title: tr("Account image")!,
 | 
			
		||||
            text:
 | 
			
		||||
                "${tr("Account images allow to quickly recognize people.")}\n\n${tr("You can decide to define one now!")}",
 | 
			
		||||
            actionTitle: tr("Upload an account image"),
 | 
			
		||||
 
 | 
			
		||||
@@ -8,10 +8,10 @@ import 'package:flutter/material.dart';
 | 
			
		||||
/// @author Pierre Hubert
 | 
			
		||||
 | 
			
		||||
class FirstTourPane extends StatelessWidget {
 | 
			
		||||
  final String msgOne;
 | 
			
		||||
  final String msgTwo;
 | 
			
		||||
  final String? msgOne;
 | 
			
		||||
  final String? msgTwo;
 | 
			
		||||
 | 
			
		||||
  const FirstTourPane({Key key, this.msgOne, this.msgTwo}) : super(key: key);
 | 
			
		||||
  const FirstTourPane({Key? key, this.msgOne, this.msgTwo}) : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Widget build(BuildContext context) {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,13 +4,13 @@
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
 | 
			
		||||
class FixedTourSizeTextArea extends StatelessWidget {
 | 
			
		||||
  final String text;
 | 
			
		||||
  final String? text;
 | 
			
		||||
 | 
			
		||||
  const FixedTourSizeTextArea(this.text);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Widget build(BuildContext context) => ConstrainedBox(
 | 
			
		||||
    constraints: BoxConstraints(maxWidth: 300),
 | 
			
		||||
    child: Text(text, textAlign: TextAlign.justify),
 | 
			
		||||
    child: Text(text!, textAlign: TextAlign.justify),
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ class LastTourPane extends StatelessWidget {
 | 
			
		||||
  Widget build(BuildContext context) {
 | 
			
		||||
    return Center(
 | 
			
		||||
      child: Text(
 | 
			
		||||
        tr("The application is yours"),
 | 
			
		||||
        tr("The application is yours")!,
 | 
			
		||||
        style: TextStyle(fontSize: 25),
 | 
			
		||||
      ),
 | 
			
		||||
    );
 | 
			
		||||
 
 | 
			
		||||
@@ -5,22 +5,22 @@ import 'package:comunic/ui/widgets/tour/fixed_tour_size_text_area.dart';
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
 | 
			
		||||
class PresentationPane extends StatelessWidget {
 | 
			
		||||
  final IconData icon;
 | 
			
		||||
  final Widget iconWidget;
 | 
			
		||||
  final IconData? icon;
 | 
			
		||||
  final Widget? iconWidget;
 | 
			
		||||
  final String title;
 | 
			
		||||
  final String text;
 | 
			
		||||
  final Function(BuildContext) child;
 | 
			
		||||
  final String actionTitle;
 | 
			
		||||
  final Function(BuildContext) onActionTap;
 | 
			
		||||
  final String? text;
 | 
			
		||||
  final Function(BuildContext)? child;
 | 
			
		||||
  final String? actionTitle;
 | 
			
		||||
  final Function(BuildContext)? onActionTap;
 | 
			
		||||
  final bool canGoNext;
 | 
			
		||||
  final Future<bool> Function(BuildContext) onTapNext;
 | 
			
		||||
  final Future<bool> Function(BuildContext)? onTapNext;
 | 
			
		||||
  final bool visible;
 | 
			
		||||
 | 
			
		||||
  const PresentationPane({
 | 
			
		||||
    Key key,
 | 
			
		||||
    Key? key,
 | 
			
		||||
    this.icon,
 | 
			
		||||
    this.iconWidget,
 | 
			
		||||
    @required this.title,
 | 
			
		||||
    required this.title,
 | 
			
		||||
    this.text,
 | 
			
		||||
    this.child,
 | 
			
		||||
    this.actionTitle,
 | 
			
		||||
@@ -41,7 +41,7 @@ class PresentationPane extends StatelessWidget {
 | 
			
		||||
      return Column(
 | 
			
		||||
        children: <Widget>[
 | 
			
		||||
          Spacer(flex: 3),
 | 
			
		||||
          icon != null ? Icon(icon, color: Colors.white, size: 50) : iconWidget,
 | 
			
		||||
          icon != null ? Icon(icon, color: Colors.white, size: 50) : iconWidget!,
 | 
			
		||||
          Spacer(flex: 1),
 | 
			
		||||
          Text(
 | 
			
		||||
            title,
 | 
			
		||||
@@ -52,9 +52,9 @@ class PresentationPane extends StatelessWidget {
 | 
			
		||||
          Spacer(flex: 1),
 | 
			
		||||
          _hasAction
 | 
			
		||||
              ? OutlinedButton(
 | 
			
		||||
                  onPressed: () => onActionTap(context),
 | 
			
		||||
                  onPressed: () => onActionTap!(context),
 | 
			
		||||
                  child: Text(
 | 
			
		||||
                    actionTitle,
 | 
			
		||||
                    actionTitle!,
 | 
			
		||||
                    style: TextStyle(color: Colors.white),
 | 
			
		||||
                  ),
 | 
			
		||||
                )
 | 
			
		||||
@@ -72,7 +72,7 @@ class PresentationPane extends StatelessWidget {
 | 
			
		||||
    return Column(
 | 
			
		||||
      children: <Widget>[
 | 
			
		||||
        Spacer(flex: 1),
 | 
			
		||||
        icon != null ? Icon(icon, color: Colors.white, size: 50) : iconWidget,
 | 
			
		||||
        icon != null ? Icon(icon, color: Colors.white, size: 50) : iconWidget!,
 | 
			
		||||
        Spacer(flex: 1),
 | 
			
		||||
        Text(
 | 
			
		||||
          title,
 | 
			
		||||
@@ -81,7 +81,7 @@ class PresentationPane extends StatelessWidget {
 | 
			
		||||
        Spacer(flex: 1),
 | 
			
		||||
        ConstrainedBox(
 | 
			
		||||
            constraints: BoxConstraints(maxHeight: 300),
 | 
			
		||||
            child: SingleChildScrollView(child: child(context))),
 | 
			
		||||
            child: SingleChildScrollView(child: child!(context))),
 | 
			
		||||
        Spacer(flex: 1),
 | 
			
		||||
      ],
 | 
			
		||||
    );
 | 
			
		||||
 
 | 
			
		||||
@@ -11,24 +11,24 @@ import 'package:flutter/material.dart';
 | 
			
		||||
 | 
			
		||||
class TourNotificationsPane extends PresentationPane {
 | 
			
		||||
  TourNotificationsPane({
 | 
			
		||||
    Key key,
 | 
			
		||||
    @required
 | 
			
		||||
    Key? key,
 | 
			
		||||
    required
 | 
			
		||||
        GlobalKey<PushNotificationsConfigurationWidgetState>
 | 
			
		||||
            pushNotificationsKey,
 | 
			
		||||
    @required Function() onConfigured,
 | 
			
		||||
    @required Function() onChanged,
 | 
			
		||||
    @required bool visible,
 | 
			
		||||
    required Function() onConfigured,
 | 
			
		||||
    required Function() onChanged,
 | 
			
		||||
    required bool visible,
 | 
			
		||||
  })  : assert(pushNotificationsKey != null),
 | 
			
		||||
        super(
 | 
			
		||||
          icon: Icons.notifications,
 | 
			
		||||
          title: tr("Push notifications"),
 | 
			
		||||
          title: tr("Push notifications")!,
 | 
			
		||||
          child: (c) => PushNotificationsConfigurationWidget(
 | 
			
		||||
            key: pushNotificationsKey,
 | 
			
		||||
            onConfigured: onConfigured,
 | 
			
		||||
            onChanged: onChanged,
 | 
			
		||||
          ),
 | 
			
		||||
          canGoNext: pushNotificationsKey?.currentState?.canSubmit ?? false,
 | 
			
		||||
          onTapNext: (c) => pushNotificationsKey.currentState.submit(),
 | 
			
		||||
          onTapNext: (c) => pushNotificationsKey.currentState!.submit(),
 | 
			
		||||
          visible: visible,
 | 
			
		||||
        );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user