istornz / flutter_gaimon

A Flutter plugin to fully support Haptic feedback with custom pattern 📳
MIT License
27 stars 6 forks source link

The backend implementation should remeber the pattern passed via `Gaimon.patternFromData` #13

Open liplum opened 2 months ago

liplum commented 2 months ago

Since the pattern might be frequently played, for example, in a game, I'm concerned about the performance impact of always transfering and transforming a large json string.

istornz commented 2 months ago

Thanks for raising an issue, for now it's not supported but must be a great addition to the plugin!

liplum commented 2 months ago

IMHO, giving every passed pattern an ID would do the trick. for example:

await Gaimon.cachePattern(id, json);
await Gaimon.patternById(id);