null safety
This commit is contained in:
@@ -8,10 +8,10 @@ import 'show_img.dart';
|
||||
typedef OnFile = void Function(File);
|
||||
|
||||
class ImageUrl extends StatefulWidget {
|
||||
final String title;
|
||||
final String url;
|
||||
final String? title;
|
||||
final String? url;
|
||||
|
||||
const ImageUrl({Key key, this.title, this.url}) : super(key: key);
|
||||
const ImageUrl({Key? key, this.title, this.url}) : super(key: key);
|
||||
@override
|
||||
_ImageUrlState createState() => _ImageUrlState();
|
||||
}
|
||||
@@ -25,12 +25,12 @@ class _ImageUrlState extends State<ImageUrl> {
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
ShowImage(url: widget.url, fileName: widget.title)),
|
||||
ShowImage(url: widget.url!, fileName: widget.title!)),
|
||||
)
|
||||
},
|
||||
child: Chip(
|
||||
avatar: Icon(Icons.image),
|
||||
label: Text(widget.title),
|
||||
label: Text(widget.title!),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user