Edit Profile

Loading preview

Starting the Flutter app

Form for editing name, bio, location, website, and social links

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

_formKey wraps four TextFormFields via _buildTextField, plus a gender dropdown and date picker. Save runs _save, which calls validate(), so an empty name shows its error and stops there; otherwise a SnackBar confirms, and nothing is sent anywhere. _buildSocialLink fields have controllers, so typed links stay readable on save. All seven controllers are disposed. The camera badge has no tap handler.

Adapting it

  • Send the controller values to your API in _save.
  • Add URL validators to the website and social fields.
  • Attach image_picker to the avatar Stack.