generate method

String generate({
  1. bool? all,
  2. bool? caution,
  3. bool? authorInfo,
  4. bool? packageInfo,
  5. bool? description,
})

Implementation

String generate({
  bool? all,
  bool? caution,
  bool? authorInfo,
  bool? packageInfo,
  bool? description,
}) {
  if (all == true || caution == true) {
    _addLine(_caution);
    _addSpace();
  }
  if (all == true || description == true) {
    _addLine('Dependencies binding annotation generator for [ GetX State Manager ]');
    _addLine('This file will provide mandatory dependencies for [ GetMaterialApp ]');
    _addLine('  Including:');
    _addLine('    - Pages');
    _addLine('    - Injected Dependencies:');
    _addLine('      - Controllers');
    _addLine('      - Components');
    _addLine('      - Repositories');
    _addSpace();
    _addLine('Generator will generate a file with \'.$generatedFilesPrefix.dart\' format in the lib/ root fot using in \'main.dart\'');
    _addLine('You can see how to use the generated class in the main in the GetMaterialApp as [example]');
    _addBigSpace();
  }
  if (all == true || packageInfo == true) {
    _addLine('Package:');
    _addLine('  Package Last Version: [ ${PackageAuthorInfo.version} ]');
    _addLine('  Package Name: [ ${PackageAuthorInfo.packageName} ]');
    _addLine('  Package Description: [ ${PackageAuthorInfo.packageNameDescription} ]');
    _addLine('  Package Address: [ ${PackageAuthorInfo.packageAddress} ]');
    _addLine('  Package GitHubRepositoryAddress: [ ${PackageAuthorInfo.packageGitHubRepositoryAddress} ]');
    _addBigSpace();
  }
  if (all == true || authorInfo == true) {
    _addLine('Written and Provided by:');
    _addLine('  [ ${PackageAuthorInfo.authorName} ]');
    _addLine('  Email: [ ${PackageAuthorInfo.emailAddress} ]');
    _addLine('  Website: [ ${PackageAuthorInfo.websiteAddress} ]');
    _addLine('  LinkedIn: [ ${PackageAuthorInfo.linkedinAddress} ]');
    _addLine('  GitHub: [ ${PackageAuthorInfo.githubAddress} ]');
    _addBigSpace();
  }
  return result;
}