sealed_writer 1.5.0 copy "sealed_writer: ^1.5.0" to clipboard
sealed_writer: ^1.5.0 copied to clipboard

outdated

Dart and Flutter sealed or union class generator and annotations, with match methods and other utilities.

example/example.dart

import 'package:sealed_writer/sealed_writer.dart';

void main() {
  final source = Manifest(
    name: 'Weather',
    items: [
      ManifestItem(
        name: 'WeatherSunny',
        shortName: 'sunny',
        equality: ManifestEquality.data,
        fields: [],
      ),
      ManifestItem(
        name: 'WeatherRainy',
        shortName: 'rainy',
        equality: ManifestEquality.data,
        fields: [
          ManifestField(
            name: 'rain',
            type: ManifestType(
              name: 'int',
              isNullable: false,
            ),
          ),
        ],
      ),
    ],
    params: [],
  );

  print('==============');
  print('FORWARD WRITER');
  print('==============');

  final forward = SourceWriter(source);
  print(forward.write());

  print('===============');
  print('BACKWARD WRITER');
  print('===============');

  final backward = BackwardWriter(source);
  print(backward.write());
}
0
likes
0
pub points
6%
popularity

Publisher

verified publisher6thsolution.com

Dart and Flutter sealed or union class generator and annotations, with match methods and other utilities.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

meta

More

Packages that depend on sealed_writer