title: How to connect two people with firebase in flutter?
body: <p>I try to connect two people. <br/>
  My plan: <br/>
  1)The first one seeks someone's name(FirstPage)</p>
  <ol>
  <li>if firebase has no one with its nickname it returns <code>AlertDialog</code> with Text('No user is found'). <br/></li>
  <li>In another case the second phone(User) gets an <code>AlertDialog</code> with Text('$user wants to add you as a friend') and buttons 'ok' and 'cancel' <br/><br/></li>
  </ol>
  <p>2)then the first user gets an AlertDialog which claims that the second user is ready to make a new friend. <br/></p>
  <ol start="3">
  <li>In the end they all move to CreationPage(SecondPage) and make sort of their friendship card with their names, friendship status, etc.</li>
  </ol>
  <p>Please, help me with that. I have no clue how to make this</p>
  <p>My code:</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:provider/provider.dart';
  import 'package:provider_ex1/common/text_Styles.dart';
  import 'package:provider_ex1/providers/provider_notimy.dart';
  import 'package:provider_ex1/screens/notimy_creation.dart';
  import 'package:provider_ex1/screens/screen_of_notimies.dart';
  
  import '../common/text_Styles.dart';
  
  class MyHomePage extends StatelessWidget {
    TextEditingController nameController = TextEditingController();
    MyHomePage({Key? key}) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      final model = Provider.of&lt;UserNameSaver&gt;(context);
      return Scaffold(
        backgroundColor: Colors.redAccent,
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Container(
                height: 70,
                width: 70,
                child: const Placeholder(
                  color: Colors.white,
                ),
              ),
  
              const SizedBox(height: 10),
  
              Text(
                  model.getNickName,
                  style: const TextStyle(color: Colors.white, fontSize: 16)
              ),
  
              const SizedBox(height: 50),
  
              Container(
                height: 40,
                width: 220,
                alignment: Alignment.center,
                decoration: const BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.all(
                    Radius.circular(16.0),
                  ),
                ),
                child: TextFormField(
                  controller: nameController,
                  textAlign: TextAlign.center,
                  decoration: const InputDecoration.collapsed(hintText: 'Enter Nick Name', border: InputBorder.none),
                  keyboardType: TextInputType.emailAddress,
                  style: sizeTextBlack(),
                ),
              ),
  
              const SizedBox(height: 10),
  
              Container(
                width:160.0,
                alignment: Alignment.center,
                child: ElevatedButton(
                  style: ElevatedButton.styleFrom(primary: Colors.blueGrey),
                  child: Text('Make a new friend', style: sizeTextWhite()),
                  onPressed: () {
                    Navigator.push(context, MaterialPageRoute(builder: (context) =&gt; SecondScreenwq(NotName: nameController.text)));
                  },
                ),
              ),
            ],
          ),
        ),
        floatingActionButton: FloatingActionButton(
          child: const Icon(Icons.chat, size: 30),
          backgroundColor: Colors.blueGrey,
          onPressed: () {
            Navigator.push(context, MaterialPageRoute(builder: (context) =&gt; ScreenPageThree()));
          },
          elevation: 5,
          tooltip: 'Watch your friendship cards',
        ),
      );
    }
  }
  </code></pre>
  <p>If you have questions, please, ask me and I will answer them because I really need your help.</p>