static Battery decode(Object message) { final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>; return Battery( level: pigeonMap['level'] as int?, ); }