generate method

  1. @override
Widget generate(
  1. Context context
)
override

Implementation

@override
Widget generate(Context context) {
  var n = IndexedFile.getIndexedAndIncrease(name).toString();
  if (n == '0') n = '';
  if (!name.contains('.json')) n += '.json';
  return JsonFile(
    'recipes/$name$n',
    toJson(),
  );
}