getLongest function

String getLongest(
  1. List<String> list
)

Returns the longest String in list

Implementation

String getLongest(List<String> list) =>
    list.reduce((String a, String b) => a.length > b.length ? a : b);