flutter_dart_extension_starter

  • Point 1
extension Extension on String{
  String addCat(){
    return '$this edit';
  }
}
String _counterv2 = "add ".addCat();
String _counterv2 = 0.toString().addCat();
  • Point 2
extension SeparedList<T> on List<T>{
    List<T> separated(T separator){
        final newList = <T>[];

        return newList;
    }
}
[].separated(Spacer();