-
-
Save TechieBlossom/116f1b4cc30b7d6a381a3d38b2753c15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Logo extends StatelessWidget { | |
//1 | |
final double height; | |
//2 | |
const Logo({ | |
Key key, | |
@required this.height, | |
}) : assert(height != null, 'height must not be null'), | |
assert(height > 0, 'height should be greater than 0'), | |
super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
//3 | |
return Image.asset( | |
'assets/pngs/logo.png', | |
color: Colors.white, | |
height: height.h, | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment