flutter_modifier_ui 1.0.3 copy "flutter_modifier_ui: ^1.0.3" to clipboard
flutter_modifier_ui: ^1.0.3 copied to clipboard

High-performance linear modifier chains for flutter UIs with compile-time layout scopes, structural caching, and widget teleportation.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: CounterScreen());
  }
}

class CounterScreen extends StatefulWidget {
  const CounterScreen({super.key});

  @override
  State<CounterScreen> createState() => _CounterScreenState();
}

class _CounterScreenState extends State<CounterScreen> {
  int _counter = 0;

  void _incrementCounter() => setState(() => _counter++);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Counter App'),
        backgroundColor: Colors.purple,
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text(
            "$_counter",
            style: const TextStyle(
              color: Colors.white,
              fontWeight: FontWeight.bold,
              fontSize: 20.0,
            ),
          )(
            modifier: const Modifier()
                .align(alignment: Alignment.center)
                .sizedBoxSquare(dimension: 150.0)
                .coloredBox(color: Colors.purple)
                .clipOval()
                .align(alignment: Alignment.center),
          ),
        ],
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        child: const Icon(Icons.add),
      ),
    );
  }
}
3
likes
150
points
216
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

High-performance linear modifier chains for flutter UIs with compile-time layout scopes, structural caching, and widget teleportation.

Repository (GitHub)
View/report issues

Topics

#ui #layout #performance #declarative #modifier

License

Apache-2.0 (license)

Dependencies

flutter, meta

More

Packages that depend on flutter_modifier_ui