hive icon indicating copy to clipboard operation
hive copied to clipboard

Can't Initialize Hive in flutter version 3.3.2

Open NengSyle007 opened this issue 3 years ago • 1 comments

Steps to Reproduce I have create new project with flutter version 3.3.2 that installing package that it can't use code below please help.

Code sample image

Version

  • Platform: iOS, Android
  • Flutter version: [3.3.2]
  • Hive version: [2.2.3]

NengSyle007 avatar Sep 19 '22 09:09 NengSyle007

when you hover over the 'initFlutter' what error does it actually give you?

BenWildeman avatar Sep 21 '22 18:09 BenWildeman

First, if you want to use initFlutter, you have to import 'package:hive_flutter/hive_flutter.dart'. Also, you don't pass an absolute path to Hive.initFlutter() because the method itself does it for you. If you want to choose an absolute path yourself, use Hive.init() instead.

maeddin avatar Sep 25 '22 20:09 maeddin