flutter_chips_choice icon indicating copy to clipboard operation
flutter_chips_choice copied to clipboard

Null Safety

Open fareesh opened this issue 3 years ago • 11 comments

fareesh avatar Mar 04 '21 22:03 fareesh

This will solve issue #22

rlazom avatar Mar 11 '21 01:03 rlazom

Thank you very much for this PR @fareesh hope this will be merged soon

nipunasudha avatar Mar 11 '21 08:03 nipunasudha

@fareesh , can you make the customBuilder nullable in types.dart

/// Builder for custom choice item
typedef Widget? C2Builder<T>(C2Choice<T> item);

This is useful for build only some items with a custom builder and use the default one in the rest. See the All chip in: https://raw.github.com/living-atlases/la-toolkit/dev/screenshots/s16.png

TIA

vjrj avatar Mar 19 '21 13:03 vjrj

Could you please give an update about the status of this PR?

nipunasudha avatar Mar 20 '21 22:03 nipunasudha

Hey, tried to run forked code and got warning.

widget.dart:211:19: Warning: Operand of null-aware operation '??' has type 'List<T>' which excludes null.
 - 'List' is from 'dart:core'.
        _values = value ?? [],
                  ^

NarHakobyan avatar Mar 22 '21 21:03 NarHakobyan

Indeed, you are right, the migrate tool do all the heavy work, but the code still needs to be reviewed.

In this particular case, were the variables have "null safety" doesn't make sense this: _values = value ?? [] so, it should be just: _values = value

I hope this helps 😎👍

rlazom avatar Mar 23 '21 06:03 rlazom

Anyone considering merging this?

nipunasudha avatar Mar 23 '21 10:03 nipunasudha

This was 25 days ago, PLEASE merge this

nipunasudha avatar Mar 29 '21 12:03 nipunasudha

I removed this lib because of it's not maintainable

NarHakobyan avatar Mar 29 '21 12:03 NarHakobyan

Try this other: https://github.com/davigmacode/flutter_chips_choice/pull/25

vjrj avatar Mar 29 '21 14:03 vjrj

When will this be merged and published?

tehsunnliu avatar Dec 11 '21 10:12 tehsunnliu

Hi everyone,

I'm sorry to announce that I'm no longer maintaining the chips_choice package. It's been a great project, but it's become too difficult to maintain.

In its place, I've released a new package called choice. The combination to smart_select and chips_choice with cleaner, more flexible, and composable API for creating inline or prompted choice widgets with single or multiple selection.

I hope you'll check out choice. I think you'll find it to be a great replacement for chips_choice.

Thanks for your understanding.

davigmacode avatar Aug 26 '23 12:08 davigmacode