Last active
March 11, 2020 02:16
-
-
Save lighth7015/13c0fa5e16706a7cc2e14e0dd687e1d1 to your computer and use it in GitHub Desktop.
MyAccountApp class
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
import 'package:simple_gravatar/simple_gravatar.dart'; | |
class MyAccount extends StatefulWidget { | |
@override | |
MyAccountApp createState() => new MyAccountApp(); | |
} | |
class MyAccountApp extends State<MyAccount> { | |
final Gravatar profile = Gravatar('[email protected]'); | |
@override | |
Widget build(BuildContext context) { | |
String profileImageUrl = profile.imageUrl( | |
size: 100, | |
defaultImage: GravatarImage.retro, | |
rating: GravatarRating.pg, | |
fileExtension: true); | |
// Error: Cannot invoke a non-'const' constructor | |
// where a const expression is expected. | |
var profileImage = Image.network(profileImage); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment