flutter_calendar_week icon indicating copy to clipboard operation
flutter_calendar_week copied to clipboard

added decoration, width, height parameter

Open sbaskoy opened this issue 2 years ago • 1 comments

  • 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),
        );

sbaskoy avatar May 09 '23 10:05 sbaskoy

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

mduccc avatar Jun 08 '23 08:06 mduccc