crepuscularity_flutter 0.1.0 copy "crepuscularity_flutter: ^0.1.0" to clipboard
crepuscularity_flutter: ^0.1.0 copied to clipboard

Flutter runtime renderer for Crepuscularity View IR and .crepus source — the Flutter counterpart to the SwiftUI and Jetpack Compose native shells.

example/lib/main.dart

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

void main() => runApp(const ExampleApp());

const _source = '''
stack col gap-3 p-4
  text font-semibold text-lg "What matters next"
  text text-sm "Follow up on the invoice you flagged yesterday."
  progress label="Setup" value=60 max=100
  stack row gap-2
    button "Do it now" onclick=prompt:Draft an invoice follow-up
    button "Done" onclick=complete
''';

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'crepuscularity_flutter',
      home: Scaffold(
        appBar: AppBar(title: const Text('crepuscularity_flutter')),
        body: Padding(
          padding: const EdgeInsets.all(16),
          child: CrepusView.fromSource(
            _source,
            onAction: (action) => debugPrint('action: $action'),
          ),
        ),
      ),
    );
  }
}
1
likes
150
points
26
downloads

Documentation

API reference

Publisher

verified publishertsc.hk

Weekly Downloads

Flutter runtime renderer for Crepuscularity View IR and .crepus source — the Flutter counterpart to the SwiftUI and Jetpack Compose native shells.

Repository (GitHub)
View/report issues

Topics

#ui #renderer #crepuscularity #view-ir

License

ISC (license)

Dependencies

flutter

More

Packages that depend on crepuscularity_flutter