Skip to content

Conversation

@erickgon92
Copy link
Contributor

Updated libraries and fixed all necessary lines where the deprecated elements where being used.

@bkozik
Copy link

bkozik commented May 15, 2024

@ali-thowfeek Bumping this, as our project depends on it as well

@martinogarrizzo5
Copy link

I really need this fix too!

@thearaks
Copy link

I need this PR to be merged and released too! 🙏

@ali-thowfeek ali-thowfeek self-requested a review May 18, 2024 15:28
Copy link
Owner

@ali-thowfeek ali-thowfeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erickgon92 Thank you for the PR. Really appreciate the time you put in 😇. There are few things we need to get right before we can go ahead with this PR.

Font sizes reference:
https://github.com/flutter/flutter/blob/5dcb86f68f239346676ceb1ed1ea385bd215fba1/packages/flutter/lib/src/material/text_theme.dart

double h1;
if (defaultFontSize == null) {
h1 = Theme.of(context).textTheme.headline5?.fontSize ?? 24.0;
h1 = Theme.of(context).textTheme.headlineLarge?.fontSize ?? 24.0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be headlineSmall

double h2;
if (defaultFontSize == null) {
h2 = Theme.of(context).textTheme.headline6?.fontSize ?? 20.0;
h2 = Theme.of(context).textTheme.headlineLarge?.fontSize ?? 20.0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be titleLarge

double h3;
if (defaultFontSize == null) {
h3 = Theme.of(context).textTheme.subtitle1?.fontSize ?? 16.0;
h3 = Theme.of(context).textTheme.headlineMedium?.fontSize ?? 16.0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be bodyLarge

double h4;
if (defaultFontSize == null) {
h4 = Theme.of(context).textTheme.bodyText1?.fontSize ?? 16.0;
h4 = Theme.of(context).textTheme.headlineMedium?.fontSize ?? 16.0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be bodyLarge

double h5;
if (defaultFontSize == null) {
h5 = Theme.of(context).textTheme.bodyText1?.fontSize ?? 16.0;
h5 = Theme.of(context).textTheme.headlineMedium?.fontSize ?? 16.0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be bodyLarge

double h6;
if (defaultFontSize == null) {
h6 = Theme.of(context).textTheme.bodyText2?.fontSize ?? 14.0;
h6 = Theme.of(context).textTheme.headlineSmall?.fontSize ?? 14.0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be bodyMedium

@ali-thowfeek ali-thowfeek merged commit 412e230 into ali-thowfeek:main May 19, 2024
@erickgon92
Copy link
Contributor Author

Thank you all for your time!! I will make the fixes and inform you. Cheers all!

@ali-thowfeek
Copy link
Owner

ali-thowfeek commented May 19, 2024

@erickgon92 I've already merged your PR. Made the necessary changes on top myself. So no more changes needed on your part.

New version 5.0.0 released. Thank you once again.

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.

7 participants