Simple Profile Page

Loading preview

Starting the Flutter app

A Flutter profile page with an avatar, stats, and follow and message buttons.

Get the source

Add it to your project

Copies the Dart source into your app, so you own it. Flutter SDK only, no extra packages.

First time? Run dart pub global activate fluttertemplates_dev, or read the CLI guide.

How it works

A LayoutBuilder gives _TopPortion two fifths of the height, at least 200px, and everything scrolls in a SingleChildScrollView. _TopPortion stacks a gradient header with an avatar straddling its lower edge, plus a green status dot. The avatar is a local Icons.person placeholder, so the demo needs no network. _ProfileInfoRow lays out ProfileInfoItem stats, Follow toggles _following, and Message shows a demo SnackBar.

Adapting it

  • Pass a user model into ProfilePage1 and hand its counts to _ProfileInfoRow.
  • Set the CircleAvatar’s backgroundImage to your avatar, keeping the icon as a fallback.
  • Send _following to your API, and open your chat flow from the message button.