Skip to content

Instantly share code, notes, and snippets.

@boldijar
Created March 9, 2018 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boldijar/d92813e8f73d43898ad03acdcc244d5b to your computer and use it in GitHub Desktop.
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
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