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

added decoration, width, height parameter #41

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sbaskoy
Copy link

@sbaskoy sbaskoy commented May 9, 2023

  • The sample application was not working. updated.

  • It was giving overflow error in different sizes. Fixed.

  /// [BoxDecoration] of day of week [Container]
  final BoxDecoration? dayOfWeekDecoration;

  /// [BoxDecoration] of calender [Container]
  final BoxDecoration? calenderDecoration;

  /// [BoxDecoration] of day [Container]
  final BoxDecoration? dayDecoration;

  /// [double] width  of day [Container]
  /// if null, it will be [Expanded]
  final double? dayWidth;

  /// [double] height  of day [Container]
  /// if null, it will be [Expanded]
  final double? dayHeight;

  /// [double] height  of day of week [Container]
  /// if null, it will be [Expanded]
  final double? dayOfWeekHeight;

  /// [double] width  of day [Container]
  /// if null, it will be [Expanded]
  final double? dayOfWeekWidth;

The above parameters have been added.

calenderDecoration BoxDecoration of calender Container

dayOfWeekDecoration BoxDecoration of day of week Container

dayDecoration BoxDecoration of day Container

dayWidth width of day Container

dayHeight height of day Container

dayOfWeekWidth width of day of week Container

dayOfWeekHeight height of day of week Container

Wraps with expanded if these two parameters are null. width != null || height != null

See item_container.dart file for details

  @override
  Widget build(BuildContext context) => width != null || height != null
      ? Container(
          margin: margin,
          width: width,
          height: height,
          decoration: decoration,
          alignment: alignment,
          child: child,
        )
      : Expanded(
          child: (decoration != null || alignment != null)
              ? Container(
                  margin: margin,
                  decoration: decoration,
                  alignment: alignment ?? Alignment.center,
                  child: child,
                )
              : Container(child: child),
        );

@mduccc
Copy link
Owner

mduccc commented Jun 8, 2023

@sbaskoy Please fix the failing check!
Some unit tests are failing.

@mduccc mduccc self-requested a review June 8, 2023 10:53
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

Successfully merging this pull request may close these issues.

None yet

2 participants