widget_generator 1.0.0+1 copy "widget_generator: ^1.0.0+1" to clipboard
widget_generator: ^1.0.0+1 copied to clipboard

A powerful and flexible CLI tool for generating Dart code snippets and templates with ease. Ideal for streamlining repetitive tasks, such as creating UI components, boilerplate code, and more in both [...]

example/widget_generator_example.dart

import 'dart:io';

import '../bin/widget_generator.dart';

Future<void> main() async {
  print('\nWelcome to a code snippet generator 🚀');

  while (true) {
    print('1: Button');
    print('2: Login Screen');
    print('3: Exit');

    stdout.write(
      'Select a snippet to generate: ',
    );
    String? choice = stdin.readLineSync();

    switch (choice) {
      case '1':
        await buttonMenu();
        break;
      case '2':
        await chooseDirectoryAndGenerateSnippet('login screen');
        break;
      case '3':
        print('Exiting.');
        return;
      default:
        print('Invalid choice. Please select 1, 2, or 3.');
    }
  }
}
0
likes
140
points
7
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful and flexible CLI tool for generating Dart code snippets and templates with ease. Ideal for streamlining repetitive tasks, such as creating UI components, boilerplate code, and more in both Flutter and pure Dart projects.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

path

More

Packages that depend on widget_generator