getStoryWrapper function

String getStoryWrapper(
  1. Class target
)

Implementation

String getStoryWrapper(Class target) {
  var storyWrapperBuffer = StringBuffer();

  storyWrapperBuffer.writeln('return Story(');
  storyWrapperBuffer.writeln('name: \'MyButtonStory\',');
  storyWrapperBuffer.writeln('builder: (context) {');
  initSuperFields(storyWrapperBuffer, target);
  storyWrapperBuffer.writeln('return build(context);');
  storyWrapperBuffer.writeln('},');
  storyWrapperBuffer.writeln(');');

  return storyWrapperBuffer.toString();
}