wrap 0.5.2 copy "wrap: ^0.5.2" to clipboard
wrap: ^0.5.2 copied to clipboard

discontinuedreplaced by: modifier

Chain style programming syntax sugar utilities for flutter widgets.

example/lib/main.dart

import 'package:flutter/widgets.dart';
import 'package:wrap/wrap.dart';

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

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

  @override
  State<App> createState() => _AppState();
}

class _AppState extends State<App> {
  late var _height = MediaQuery.of(context).size.height;

  @override
  Widget build(BuildContext context) => 'app root'
      .text(align: TextAlign.center)
      .modifyTextStyle(
        context,
        (raw) => raw.copyWith(
          color: const Color(0xfffefdfa),
          fontSize: _height / 6.18,
          fontWeight: FontWeight.w900,
        ),
      )
      .wrapPadding(const EdgeInsets.all(75))
      .wrapCenter
      .wrapBackground(const Color(0xff804044))
      .listenSizeChange(this, (size) => _height = size.height)
      .ensureTextEnvironment(context);
}
0
likes
0
pub points
13%
popularity

Publisher

unverified uploader

Chain style programming syntax sugar utilities for flutter widgets.

Repository (GitHub)
View/report issues

Topics

#syntax-sugar #code-style #chain-style #chain-programming #flutter-widgets

License

unknown (license)

Dependencies

flutter

More

Packages that depend on wrap