static void record(dynamic error, [StackTrace? trace]) { CubitErrorState(error, trace).recordError(); }