Coder Social home page Coder Social logo

Comments (4)

philitell avatar philitell commented on July 30, 2024 1

This is the code i use inside the body of my Page-Scaffold:

CalendarControllerProvider<CalendarGarbageEntry>(
    controller: _eventController,
    child: LayoutBuilder(builder: (context, constraints) {
        final double maxWidth = constraints.maxWidth;
        return MonthView(
        controller: _eventController,
        minMonth: DateTime(2022),
        maxMonth: DateTime(DateTime.now().year + 2, 12, 31),
        cellAspectRatio: 1.5,
        weekDayBuilder: (index) => CapWeekDayTile(
            dayIndex: index,
        ),
        width: maxWidth,
        );
    }),
    ),

This is the Source-code of the weekDayBuilder i use in order to get german week titles:

import 'package:flutter/material.dart';

class CapWeekDayTile extends StatelessWidget {
  static final List<String> weekTitles = ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"];

  final int dayIndex;
  final Color backgroundColor;
  final bool displayBorder;
  final TextStyle? textStyle;

  const CapWeekDayTile({
    Key? key,
    required this.dayIndex,
    this.backgroundColor = Colors.white,
    this.displayBorder = true,
    this.textStyle,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: Alignment.center,
      margin: EdgeInsets.zero,
      padding: const EdgeInsets.symmetric(vertical: 10.0),
      decoration: BoxDecoration(
        color: backgroundColor,
        border: Border.all(
          color: const Color(0xffdddddd),
          width: displayBorder ? 0.5 : 0,
        ),
      ),
      child: Text(
        weekTitles[dayIndex],
        style: textStyle ??
            const TextStyle(
              fontSize: 17,
              color: Colors.black,
            ),
      ),
    );
  }
}

from flutter_calendar_view.

PRBaraiya avatar PRBaraiya commented on July 30, 2024

Hello @philitell , If possible, Please provide an code example.

from flutter_calendar_view.

awatson32 avatar awatson32 commented on July 30, 2024

Is there a scheduled release for this update any time soon?

from flutter_calendar_view.

keanallen avatar keanallen commented on July 30, 2024

Any update on this? The error also occurs in desktop even in MonthView

from flutter_calendar_view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.