code_box 1.4.0 copy "code_box: ^1.4.0" to clipboard
code_box: ^1.4.0 copied to clipboard

Helpful extensions for your daily work making your code more readable.

example/code_box_example.dart

import 'package:code_box/code_box.dart';
import 'package:code_box/src/CodeBoxWidgetModifier.dart';
import 'package:flutter/material.dart';

final class TestWidget extends StatelessWidget {
  TestWidget({super.key, required this.injected});

  // MARK: Properties

  List injected;

  // MARK: build

  @override
  Widget build(BuildContext context) {
    return Column(
            children: injected
                // .unique()

                /// we only want each entry once
                /// just want to show the strings from the injected list
                .map((e) {
                  (e != String) ? null : Text(e.id);
                })

                /// make the map to list
                .toList()

                /// and flat map it to the wanted list type
                .flatMap())
        .padding(top: 15)
        .safeArea();
  }
}
4
likes
140
points
51
downloads

Publisher

verified publisheramazdev.de

Weekly Downloads

Helpful extensions for your daily work making your code more readable.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on code_box