title: How to update specific field of hive object in flutter?
body: <p>I am using hive as my NoSQL local database in my flutter app.</p>
  <p>Following is my Hive Class:</p>
  <pre><code>import 'dart:convert';
  
  import 'package:hive/hive.dart';
  import 'package:lpa_exam/src/model/listofexams.dart';
  import 'package:lpa_exam/src/model/profile.dart';
  part 'hiveprofile.g.dart';
  
  @HiveType()
  class PersonModel extends HiveObject{
    @HiveField(0)
    String language;
  
    @HiveField(1)
    String examName;
  
    @HiveField(2)
    int examId;
  
    @HiveField(3)
    Profile profile;
  
    @HiveField(4)
    ListExam listexam;
  
    @override
    String toString() {
      return jsonEncode({
        'language': language,
        'examName': this.examName,
        'examId': examId,
        'profile': profile,
        'listexam': listexam
      });
    }
  
    PersonModel(
        this.language, this.examName, this.examId, this.profile, this.listexam);
  }
  </code></pre>
  <p>So, my requirement is that on every successful login I am supposed to update profile object.
  But for that, I have to set all of the others also.</p>
  <p><strong>How can I just update the profile object only?</strong></p>
  <p>Code:</p>
  <pre><code>_personBox = Hive.openBox('personBox');
            await _personBox.then((item) {
              if (!item.isEmpty) {
                print('empty');
                item.putAt(0, PersonModel(...,..,..,..,...,..));
              }
            });
  </code></pre>
  <p>I am using hive version <code>1.2.0</code>.</p>
  <p>Reference: <a href="https://resocoder.com/2019/09/30/hive-flutter-tutorial-lightweight-fast-database/" rel="noreferrer">https://resocoder.com/2019/09/30/hive-flutter-tutorial-lightweight-fast-database/</a></p>