From 3d7920ed0c2267cb86f338420f62984f869dfcfa Mon Sep 17 00:00:00 2001 From: Naswih <51323070+naxwh@users.noreply.github.com> Date: Sat, 1 Jan 2022 11:36:27 +0530 Subject: [PATCH] Update quote_card.dart This will resolve the errors, like "The parameter 'delete' can't have a value of 'null' because of its type, but the implicit default value is 'null'. Try adding either an explicit non-'null' default value or the 'required' modifier" --- quotes/lib/quote_card.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quotes/lib/quote_card.dart b/quotes/lib/quote_card.dart index 4245052..e2127dc 100644 --- a/quotes/lib/quote_card.dart +++ b/quotes/lib/quote_card.dart @@ -4,8 +4,8 @@ import 'quote.dart'; class QuoteCard extends StatelessWidget { final Quote quote; - final Function delete; - QuoteCard({ this.quote, this.delete }); + final Function() delete; + QuoteCard({ required this.quote, required this.delete }); @override Widget build(BuildContext context) { @@ -42,4 +42,4 @@ class QuoteCard extends StatelessWidget { ) ); } -} \ No newline at end of file +}