Created
March 9, 2018 17:36
-
-
Save boldijar/d92813e8f73d43898ad03acdcc244d5b to your computer and use it in GitHub Desktop.
Just showing how we can implement a circlular / circle image view in flutter
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
import 'package:flutter/material.dart'; | |
class DebugUiPage extends StatefulWidget { | |
DebugUiPage({Key key}) : super(key: key); | |
@override | |
_DebugUiPageState createState() => new _DebugUiPageState(); | |
} | |
class _DebugUiPageState extends State<DebugUiPage> { | |
@override | |
Widget build(BuildContext context) { | |
return new Scaffold( | |
appBar: new AppBar( | |
title: new Text("Profile"), | |
), | |
body: new Center( | |
child: new Column( | |
crossAxisAlignment: CrossAxisAlignment.center, | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
new Container( | |
width: 190.0, | |
height: 190.0, | |
decoration: new BoxDecoration( | |
shape: BoxShape.circle, | |
image: new DecorationImage( | |
fit: BoxFit.fill, | |
image: new NetworkImage( | |
"https://i.imgur.com/BoN9kdC.png") | |
) | |
)), | |
new Text("John Doe", | |
textScaleFactor: 1.5) | |
], | |
)) | |
) | |
; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment