anchor.diff:          return ListView(
             padding: const EdgeInsets.all(8),
             children: <Widget>[
  +            _UserInfoCard(user),
               _EmailPasswordForm(),
               _EmailLinkSignInSection(),
               _AnonymouslySignInSection(),
  
positive.code: }
  
  class _SignInPageState extends State<SignInPage> {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
  
negative.code:   // Example code for sign out.
    Future<void> _signOut() async {
      await _auth.signOut();
    }
  }
  
  class _UserInfoCard extends StatefulWidget {
    final User user;
  
    const _UserInfoCard(this.user);
  
    @override
    _UserInfoCardState createState() => _UserInfoCardState();
  }
  
  class _UserInfoCardState extends State<_UserInfoCard> {
    @override
    Widget build(BuildContext context) {
      return Card(
        child: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Container(
                child: const Text(
                  "User info",
                  style: TextStyle(fontWeight: FontWeight.bold),
                ),
                padding: EdgeInsets.only(bottom: 8.0),
                alignment: Alignment.center,
              ),
              if (widget.user != null)
                if (widget.user.photoURL != null)
                  Container(
                    child: Image.network(widget.user.photoURL),
                    alignment: Alignment.center,
                    margin: EdgeInsets.only(bottom: 8.0),
                  )
                else
                  Align(
                    alignment: Alignment.center,
                    child: Container(
                      child: Text(
                        "No image",
                        textAlign: TextAlign.center,
                      ),
                      padding: EdgeInsets.all(8.0),
                      margin: EdgeInsets.only(bottom: 8.0),
                      color: Colors.black,
                    ),
                  ),
              Text(widget.user == null
                  ? 'Not signed in'
                  : '${widget.user.isAnonymous ? 'User is anonymous\n\n' : ''}'
                      'Email: ${widget.user.email} (verified: ${widget.user.emailVerified})\n\n'
                      'Phone number: ${widget.user.phoneNumber}\n\n'
                      'Name: ${widget.user.displayName}\n\n\n'
                      'ID: ${widget.user.uid}\n\n'
                      'Tenant ID: ${widget.user.tenantId}\n\n'
                      'Refresh token: ${widget.user.refreshToken}\n\n\n'
                      'Created: ${widget.user.metadata.creationTime.toString()}\n\n'
                      'Last login: ${widget.user.metadata.lastSignInTime}\n\n'),
              if (widget.user != null)
                Column(
                  crossAxisAlignment: CrossAxisAlignment.stretch,
                  children: [
                    Text(
                      widget.user.providerData.isEmpty
                          ? 'No providers'
                          : 'Providers:',
                      style: TextStyle(fontWeight: FontWeight.bold),
                      textAlign: TextAlign.center,
                    ),
                    for (var provider in widget.user.providerData)
                      Dismissible(
                        key: Key(provider.uid),
                        child: Card(
                          color: Colors.grey[700],
                          child: ListTile(
                            leading: provider.photoURL == null
                                ? IconButton(
                                    icon: const Icon(Icons.remove),
                                    onPressed: () =>
                                        widget.user.unlink(provider.providerId))
                                : Image.network(provider.photoURL),
                            title: Text(provider.providerId),
                            subtitle: Text(
                                "${provider.uid == null ? "" : "ID: ${provider.uid}\n"}"
                                "${provider.email == null ? "" : "Email: ${provider.email}\n"}"
                                "${provider.phoneNumber == null ? "" : "Phone number: ${provider.phoneNumber}\n"}"
                                "${provider.displayName == null ? "" : "Name: ${provider.displayName}\n"}"),
                          ),
                        ),
                        onDismissed: (action) =>
                            widget.user.unlink(provider.providerId),
                      ),
                  ],
                ),
              Visibility(
                visible: widget.user != null,
                child: Container(
                  margin: EdgeInsets.only(top: 8.0),
                  alignment: Alignment.center,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: [
                      IconButton(
                        onPressed: () => widget.user.reload(),
                        icon: const Icon(Icons.refresh),
                      ),
                      IconButton(
                        onPressed: () => showDialog(
                          context: context,
                          builder: (context) => UpdateUserDialog(widget.user),
                        ),
                        icon: const Icon(Icons.text_snippet),
                      ),
                      IconButton(
                        onPressed: () => widget.user.delete(),
                        icon: const Icon(Icons.delete_forever),
                      ),
                    ],
                  ),
                ),
              ),
            ],
          ),
        ),
      );
    }
  }
  
  class UpdateUserDialog extends StatefulWidget {
    final User user;
  
    const UpdateUserDialog(this.user);
  
    @override
    _UpdateUserDialogState createState() => _UpdateUserDialogState();
  }
  
  class _UpdateUserDialogState extends State<UpdateUserDialog> {
    TextEditingController _nameController;
    TextEditingController _urlController;
  
    @override
    void initState() {
      _nameController = TextEditingController(text: widget.user.displayName);
      _urlController = TextEditingController(text: widget.user.photoURL);
      super.initState();
    }
  
    @override
    Widget build(BuildContext context) {
      return AlertDialog(
        title: const Text("Update profile"),
        content: SingleChildScrollView(
          child: ListBody(
            children: [
              TextFormField(
                controller: _nameController,
                autocorrect: false,
                decoration: const InputDecoration(labelText: 'displayName'),
              ),
              TextFormField(
                controller: _urlController,
                decoration: const InputDecoration(labelText: 'photoURL'),
                autovalidateMode: AutovalidateMode.onUserInteraction,
                autocorrect: false,
                validator: (String value) {
                  if (value.isNotEmpty) {
                    var uri = Uri.parse(value);
                    if (uri.isAbsolute) {
                      //You can get the data with dart:io or http and check it here
                      return null;
                    }
                    return "Faulty URL!";
                  }
                  return null;
                },
              ),
            ],
          ),
        ),
        actions: [
          TextButton(
            onPressed: () {
              widget.user.updateProfile(
                  displayName: _nameController.text,
                  photoURL: _urlController.text);
              Navigator.of(context).pop();
            },
            child: const Text("Update"),
          )
        ],
      );
    }
  
    @override
    void dispose() {
      _nameController.dispose();
      _urlController.dispose();
      super.dispose();
    }
  }
  
  