mirror of
https://github.com/flutter/samples.git
synced 2026-07-17 14:32:06 +00:00
filipino_cuisine: migrate to null safety (#920)
This commit is contained in:
@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class Cook extends StatefulWidget {
|
||||
final List<String> dr;
|
||||
final String img;
|
||||
final String nme;
|
||||
final String? img;
|
||||
final String? nme;
|
||||
|
||||
const Cook(this.dr, this.img, this.nme);
|
||||
@override
|
||||
@@ -11,7 +11,7 @@ class Cook extends StatefulWidget {
|
||||
}
|
||||
|
||||
class CState extends State<Cook> {
|
||||
List<bool> cb;
|
||||
late List<bool?> cb;
|
||||
|
||||
@override
|
||||
initState() {
|
||||
@@ -34,13 +34,13 @@ class CState extends State<Cook> {
|
||||
leading: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
child: Hero(
|
||||
tag: widget.nme,
|
||||
child: Image.asset(widget.img,
|
||||
tag: widget.nme!,
|
||||
child: Image.asset(widget.img!,
|
||||
fit: BoxFit.cover, width: 100, height: 100))),
|
||||
title: Text(widget.nme,
|
||||
title: Text(widget.nme!,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.headline3
|
||||
.headline3!
|
||||
.copyWith(fontFamily: 'ark', color: Colors.black))),
|
||||
margin: const EdgeInsets.only(top: 40, bottom: 30, left: 20)),
|
||||
Expanded(
|
||||
|
||||
Reference in New Issue
Block a user