Initial commit
This commit is contained in:
parent
e46f792c49
commit
85cff9dba8
20 changed files with 663 additions and 0 deletions
11
lib/utils/utils.dart
Normal file
11
lib/utils/utils.dart
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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 != null ? s.substring(0, end) + '...' : null;
|
||||
Loading…
Add table
Add a link
Reference in a new issue