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

fix: Enhance Icon Button Parser by adding more options and fix the model naming #281

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:mirai/src/parsers/mirai_alignment/mirai_alignment.dart';
import 'package:mirai/src/parsers/mirai_box_constraints/mirai_box_constraints.dart';
import 'package:mirai/src/parsers/mirai_button_style/mirai_button_style.dart';
import 'package:mirai/src/parsers/mirai_edge_insets/mirai_edge_insets.dart';

Expand All @@ -11,22 +12,25 @@ part 'mirai_icon_button.g.dart';
@freezed
class MiraiIconButton with _$MiraiIconButton {
const factory MiraiIconButton({
Map<String, dynamic>? onPressed,
double? iconSize,
MiraiEdgeInsets? padding,
@Default(MiraiAlignment.center) MiraiAlignment alignment,
MiraiAlignment? alignment,
double? splashRadius,
String? color,
String? focusColor,
String? hoverColor,
String? highlightColor,
String? splashColor,
String? disabledColor,
Map<String, dynamic>? onPressed,
@Default(false) bool autofocus,
String? tooltip,
bool? enableFeedback,
MiraiBoxConstraints? constraints,
MiraiButtonStyle? style,
@Default(false) autofocus,
bool? isSelected,
Map<String, dynamic>? selectedIcon,
required Map<String, dynamic> child,
Map<String, dynamic>? icon,
}) = _MiraiIconButton;

factory MiraiIconButton.fromJson(Map<String, dynamic> json) =>
Expand Down
Loading
Loading