clone method

Future<MenuItem> clone()

creates a clone of the MenuItem.

Implementation

Future<MenuItem> clone() async {
  List<int> arr = await toByteArray();
  return await fromByteArray(arr);
}