null safety
This commit is contained in:
@@ -6,11 +6,11 @@ import 'package:flutter/material.dart';
|
||||
import 'callbacks.dart';
|
||||
|
||||
class TitleWithAddButton extends StatelessWidget {
|
||||
final IconData iconData;
|
||||
final String titleKey;
|
||||
final OnTap onTap;
|
||||
final IconData? iconData;
|
||||
final String? titleKey;
|
||||
final OnTap? onTap;
|
||||
|
||||
const TitleWithAddButton({Key key, this.iconData, this.titleKey, this.onTap})
|
||||
const TitleWithAddButton({Key? key, this.iconData, this.titleKey, this.onTap})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
@@ -28,7 +28,7 @@ class TitleWithAddButton extends StatelessWidget {
|
||||
),
|
||||
LocalText(
|
||||
context,
|
||||
titleKey,
|
||||
titleKey!,
|
||||
color: Colors.black54,
|
||||
fontSize: 20,
|
||||
)
|
||||
@@ -40,7 +40,7 @@ class TitleWithAddButton extends StatelessWidget {
|
||||
: Padding(
|
||||
padding: const EdgeInsets.only(right: 0),
|
||||
child: IconButton(
|
||||
onPressed: () => onTap(),
|
||||
onPressed: () => onTap!(),
|
||||
icon: Icon(
|
||||
Icons.add_circle,
|
||||
color: primaryColor,
|
||||
|
||||
Reference in New Issue
Block a user