Check out example codes for "hive regiter adapter enum". It will help you in understanding the concepts better.

Code Example 1

Hive.registerAdapter(MediaTypesAdapter()); // <- register the adapter where you have the others registred

// mediaData.dart <- file
import 'package:hive/hive.dart';
part 'mediaData.g.dart';

@HiveType(typeId: 22)
enum MediaTypes {
  @HiveField(0)
  Photo,
  @HiveField(1)
  Video,
}

Learn ReactJs, React Native from akashmittal.com