null safety

This commit is contained in:
phyothandar
2021-09-10 14:25:37 +06:30
parent 5a313d641e
commit 079c9a135d
31 changed files with 230 additions and 227 deletions

View File

@@ -4,12 +4,12 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/widgets.dart';
class DisplayImageSource {
String url;
File file;
String? url;
File? file;
DisplayImageSource({this.url, this.file});
ImageProvider get imageProvider =>
file == null ? CachedNetworkImageProvider(url) : FileImage(file);
ImageProvider? get imageProvider =>
file == null ? CachedNetworkImageProvider(url!) : FileImage(file!);
@override
bool operator ==(other) {