title: store data to models from firebase in flutter
body: <p>I am trying to store data in array of model from firebasedatabase</p>
  
  <p>my firebasedatabase response look like this: </p>
  
  <pre><code> {-Ku3EYNaR_E5XVhAij2w: {customerAddress: Ram, customerMobileNumber: 921212121211, CustomerName: Ram, customerImageURL: }, -Ku3F6_0jro_5CI7FDsY: {customerAddress: Qweqweqwe, customerMobileNumber: 888888, CustomerName: Siva, customerImageURL: }}
  </code></pre>
  
  <p>and my model look like this </p>
  
  <pre><code>   class listOfUsers {
     String name = '';
      String phoneNumber = '';
      String address = '';
     listOfUsers(this.name,this.phoneNumber,this.address);
     }
  
  
   List&lt;listOfUsers&gt;userInformation_ = &lt;listOfUsers&gt;[];
   getusersinfo() async{
   FirebaseUser user = await FirebaseAuth.instance.currentUser();
  
   if (user != null) {
    _messagesRef
      .child(user.uid)
      .child('x')
      .onValue
      .listen((Event event) {
    print('value: ${event.snapshot.value}');
    var a = event.snapshot.value;
  
    for(var child in event.snapshot.value){
      print(child);
      }
  
  
  
     });
     }
     }
  
     getting error as 
     [VERBOSE-2:dart_error.cc(16)] Unhandled exception:
      NoSuchMethodError: Class '_InternalLinkedHashMap' has no instance      getter 'iterator'.
     Receiver: _LinkedHashMap len:2
  </code></pre>
  
  <p>can any one help me to store data from firebase database to models in flutter </p>