Untitled
unknown
dart
3 years ago
1.2 kB
3
Indexable
File profilePic; getProfilePicFromServer() async { await WebServices.getProfilePictureOfDriver(false).then((value) { if (value == null) { setState(() {}); } else if (value != null && value != 0) { setState(() { profilePic = value; }); } }); } FittedBox( fit: BoxFit.contain, child: Material( shape: CircleBorder(), elevation: 10, child: ClipOval( child: Container( color: Colors.amber, child: Padding( padding: EdgeInsets.all(width * 0.04), child: ClipOval( child: profilePic == null ? Image( fit: BoxFit.fitWidth, image: AssetImage('assets/defaultpp.png')) : Image( fit: BoxFit.fitWidth, image: FileImage(File(profilePic.path)))), ), ), ), ), ),
Editor is loading...