Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement with model class #39

Closed
YouSour opened this issue Nov 14, 2022 · 2 comments
Closed

implement with model class #39

YouSour opened this issue Nov 14, 2022 · 2 comments

Comments

@YouSour
Copy link

YouSour commented Nov 14, 2022

hi, cloud you give me an example how to implement with model class ?

my model class :

import 'package:flutter/material.dart';
import 'package:json_annotation/json_annotation.dart';
import '../utils/icon_model_converter.dart';
part 'option_model.g.dart';

@JsonSerializable()
class OptionModel {
  @JsonKey(
      disallowNullValue: true,
      fromJson: IconModelConverter.fromJson,
      toJson: IconModelConverter.toJson)
  final IconData? icon;
  final String label;
  late dynamic value;


  OptionModel(
      {this.icon,
      required this.label,
      required this.value
});

  factory OptionModel.fromJson(Map<String, dynamic> json) =>
      _$OptionModelFromJson(json);
  Map<String, dynamic> toJson() => _$OptionModelToJson(this);
}

@DaZealous
Copy link

@YouSour , did you get any solution on this ?

@davigmacode
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants