comunes-flutter/lib/utils/utils.dart
vjrj 51fe8c6431 refactor: linting de widgets de layout y utilidades
Ajustes de estilo/linting en los helpers centered* de layout,
appIntroPage, roundedButton, secretLoader y utils (refactor pendiente).
2026-07-12 23:26:43 +02:00

11 lines
367 B
Dart

import 'package:flutter/material.dart';
bool notNull(Object o) => o != null;
// What is the best way to optionally include a widget in a list of children
// https://github.com/flutter/flutter/issues/3783
List<Widget> listWithoutNulls(List<Widget> children) =>
children.where(notNull).toList();
ellipse(String s,[ int end = 4]) => s.substring(0, end) + '...';