reassembleConvertFuncMap method

void reassembleConvertFuncMap()

When you are in the development, to generate a new model class, hot-reload doesn't find new generation model class, you can build on MaterialApp method called jsonConvert. ReassembleConvertFuncMap (); This method only works in a development environment https://flutter.cn/docs/development/tools/hot-reload class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key);

@override Widget build(BuildContext context) { jsonConvert.reassembleConvertFuncMap(); return MaterialApp(); } }

Implementation

void reassembleConvertFuncMap() {
  bool isReleaseMode = const bool.fromEnvironment('dart.vm.product');
  if (!isReleaseMode) {
    convertFuncMap = JsonConvertClassCollection();
  }
}