Skip to content

Instantly share code, notes, and snippets.

@lighth7015
Last active March 11, 2020 02:16
Show Gist options
  • Save lighth7015/13c0fa5e16706a7cc2e14e0dd687e1d1 to your computer and use it in GitHub Desktop.
Save lighth7015/13c0fa5e16706a7cc2e14e0dd687e1d1 to your computer and use it in GitHub Desktop.
MyAccountApp class
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