init static method

Future<void> init()

Implementation

static Future<void> init() async {
  String filePath = 'android/app/build.gradle';

  CreateFolderFiles.replaceLine(
    filePath: filePath,
    lineToReplace: 'compileSdkVersion',
    newLine: '    compileSdkVersion 33',
  );

  CreateFolderFiles.replaceLine(
    filePath: filePath,
    lineToReplace: 'minSdkVersion',
    newLine: '        minSdkVersion 22',
  );

  CreateFolderFiles.addNewLine(
    filePath: 'android/build.gradle',
    refLine: 'classpath',
    newLine: "        classpath 'com.google.gms:google-services:4.3.15'",
  );

  CreateFolderFiles.addNewLine(
    filePath: filePath,
    refLine: "apply plugin: 'com.android.application'",
    newLine: "apply plugin: 'com.google.gms.google-services'",
  );
  LogService.success('Android files created successfully! 🎉');
}