Skip to main content

cleany 2.0.3 copy "cleany: ^2.0.3" to clipboard
cleany: ^2.0.3 copied to clipboard

Interactive Flutter architecture CLI for features and components with Cubit or Bloc, Freezed, safe generation, project repair, and native flavors.

example/cleany_example.dart

import 'dart:io';

import 'package:cleany/cleany.dart';

/// Prepares a reviewable initialization plan using a disposable project.
void main() {
  final directory = Directory.systemTemp.createTempSync('cleany_example_');
  try {
    File('${directory.path}/pubspec.yaml').writeAsStringSync('''
name: example_app
environment:
  sdk: ^3.13.0
dependencies:
  flutter:
    sdk: flutter
''');
    final project = Project(directory.path);
    final plan = Generator(project).initialize(
      appId: 'com.example.playground',
      provider: ApiProvider.retrofit,
    );
    stdout.writeln('Prepared ${plan.files.length} file changes:');
    for (final path in plan.files.keys.take(5)) {
      stdout.writeln('  $path');
    }
    stdout.writeln('The plan has not been applied.');
    // In a real project, review the plan and use the default validated workflow:
    // await GenerationTransaction(project).apply(plan);
  } finally {
    directory.deleteSync(recursive: true);
  }
}
13
likes
0
points
1.88k
downloads

Publisher

unverified uploader

Weekly Downloads

Interactive Flutter architecture CLI for features and components with Cubit or Bloc, Freezed, safe generation, project repair, and native flavors.

Homepage
Repository (GitHub)
View/report issues

Topics

#flutter #cli #clean-architecture #code-generation #bloc

License

unknown (license)

Dependencies

analyzer, crypto, dart_style, path, pub_semver, yaml, yaml_edit

More

Packages that depend on cleany