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

Migrating from 2 to 3 #492

Closed
vytautas-pranskunas- opened this issue May 3, 2021 · 4 comments
Closed

Migrating from 2 to 3 #492

vytautas-pranskunas- opened this issue May 3, 2021 · 4 comments

Comments

@vytautas-pranskunas-
Copy link

Hi, i saw this migration guide: #434 but it says nothing about style migration. I have styled calendar

image

As you can see all is red except 1 line - selmargin.
Where all this moved and how to refactor styles?

CalendarStyle(
        selectedStyle: TextStyle(color: CustomColors.careWhite, fontSize: Settings.mainFontSize),
        todayStyle: TextStyle(color: CustomColors.careWhite, fontSize: Settings.mainFontSize),
        weekdayStyle: TextStyle(fontSize: Settings.mainFontSize),
        weekendStyle: TextStyle(fontSize: Settings.mainFontSize, color: CustomColors.imperialRed),
        holidayStyle: TextStyle(fontSize: Settings.mainFontSize),
        outsideHolidayStyle: TextStyle(fontSize: Settings.mainFontSize, color: CustomColors.pageGrey500),
        outsideStyle: TextStyle(fontSize: Settings.mainFontSize, color: CustomColors.pageGrey500),
        unavailableStyle: TextStyle(fontSize: Settings.mainFontSize, color: CustomColors.pageGrey300),
        outsideWeekendStyle:
            TextStyle(fontSize: Settings.mainFontSize, color: CustomColors.imperialRed.withOpacity(0.6)),
        todayColor: CustomColors.carePurple.withOpacity(0.7),
        selectedColor: CustomColors.carePurple,
        markersColor: CustomColors.imperialRed,
        markersMaxAmount: 1,
        markersPositionBottom: 3,
        cellMargin: EdgeInsets.all(editView ? 3 : 6),
        contentPadding: EdgeInsets.only(bottom: 4, left: editView ? 2 : 8, right: editView ? 2 : 8));
  }
@desmeit
Copy link

desmeit commented May 3, 2021

same issue here

@vytautas-pranskunas-
Copy link
Author

I was able to migrate many of properties but these left:

  • is weekdayStyle == defaultTextStyle?
  • These are missing - how should i repleace them?
    • outsideStyle - i see outsideDecoration but it misses fontSize because it is boxDecoration
    • unavailableStyle
    • outsideWeekendStyle
    • contentPadding

@aleksanderwozniak
Copy link
Owner

Check out API docs for more info on available properties. You are looking for CalendarStyle.

I was able to migrate many of properties but these left:

* is weekdayStyle == defaultTextStyle?

Correct.

* These are missing - how should i repleace them?
  
  * outsideStyle - i see outsideDecoration but it misses fontSize because it is boxDecoration
  * unavailableStyle
  * outsideWeekendStyle
  * contentPadding

@vytautas-pranskunas-
Copy link
Author

vytautas-pranskunas- commented May 4, 2021

Thanks for your quick responsesn.

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

No branches or pull requests

3 participants