Skip to content

Commit

Permalink
Enhance Icon Button Parser by adding more options and fix the model n…
Browse files Browse the repository at this point in the history
…aming.
  • Loading branch information
divyanshub024 committed Mar 1, 2024
1 parent 91d34e3 commit 2a5fcfc
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 125 deletions.
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

0 comments on commit 2a5fcfc

Please sign in to comment.