code_box 1.1.0 copy "code_box: ^1.1.0" to clipboard
code_box: ^1.1.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);
                })

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

                /// and flat map it to the wanted list type
                .flatMap())
        .padding(top: 15)
        .safeArea();
  }
}
3
likes
0
pub points
31%
popularity

Publisher

verified publisheramazdev.de

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on code_box