flutter_smartgen 0.5.0 copy "flutter_smartgen: ^0.5.0" to clipboard
flutter_smartgen: ^0.5.0 copied to clipboard

CLI that scaffolds Flutter feature-module pages with GetX, registers routes, syncs AppImages, creates environment files, and scaffolds lib/app. Configure via smartgen.yaml.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:get/get.dart';

void main() {
  runApp(const SmartgenExampleApp());
}

/// Empty starter app — generate config and pages with smartgen (see example/README.md).
class SmartgenExampleApp extends StatelessWidget {
  const SmartgenExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'flutter_smartgen example',
      home: const _ExampleHome(),
    );
  }
}

class _ExampleHome extends StatelessWidget {
  const _ExampleHome();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('smartgen example')),
      body: Padding(
        padding: const EdgeInsets.all(24),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: const <Widget>[
            Text(
              'Run smartgen from this folder:',
              style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
            ),
            SizedBox(height: 16),
            Text('1. dart run flutter_smartgen:smartgen init'),
            Text('2. Edit smartgen.yaml (e.g. common_scaffold)'),
            Text('3. dart run flutter_smartgen:smartgen page demo'),
            SizedBox(height: 16),
            Text(
              'Then wire routes/bindings in main.dart and run flutter run.',
            ),
          ],
        ),
      ),
    );
  }
}
3
likes
160
points
49
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

CLI that scaffolds Flutter feature-module pages with GetX, registers routes, syncs AppImages, creates environment files, and scaffolds lib/app. Configure via smartgen.yaml.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, path, yaml

More

Packages that depend on flutter_smartgen