JavaFunctionGetter constructor

JavaFunctionGetter(
  1. Variable field, {
  2. int depth = 0,
})

Implementation

JavaFunctionGetter(Variable field, {int depth = 0})
    : super(
          functionName:
              'get${field.name[0].toUpperCase()}${field.name.substring(1)}',
          body: (depth) =>
              [OneLine(depth: depth + 1, body: 'return ${field.name};')],
          returnType: field.type,
          isPublic: true,
          isStatic: false,
          oneLine: true,
          depth: depth);