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

[PAGE ISSUE]: 'Building adaptive apps' #10769

Open
1 task
ajeets1978 opened this issue Jun 20, 2024 · 0 comments
Open
1 task

[PAGE ISSUE]: 'Building adaptive apps' #10769

ajeets1978 opened this issue Jun 20, 2024 · 0 comments
Assignees
Labels
e1-hours Effort: < 8 hrs from.page-issue Reported in a reader-filed concern p2-medium Necessary but not urgent concern. Resolve when possible.

Comments

@ajeets1978
Copy link

Page URL

https://docs.flutter.dev/ui/layout/responsive/building-adaptive-apps/

Page source

https://github.com/flutter/website/tree/main/src/content/ui/layout/responsive/building-adaptive-apps.md

Describe the problem

Seems like old or wrong documentation

class TextStyles {
static const TextStyle raleway = TextStyle(
fontFamily: Fonts.raleway,
);
static TextStyle buttonText1 =
const TextStyle(fontWeight: FontWeight.bold, fontSize: 14);
static TextStyle buttonText2 =
const TextStyle(fontWeight: FontWeight.normal, fontSize: 11);
static TextStyle h1 =
const TextStyle(fontWeight: FontWeight.bold, fontSize: 22);
static TextStyle h2 =
const TextStyle(fontWeight: FontWeight.bold, fontSize: 16);
static TextStyle body1 = raleway.copyWith(color: const Color(0xFF42A5F5));
// etc
}

Expected fix

copyWith is not available for TextStyle

static TextStyle buttonText1 =
const TextStyle(fontWeight: FontWeight.bold, fontSize: 14);

constructor being called is not a const constructor.

Additional context

No response

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.
@ajeets1978 ajeets1978 added the from.page-issue Reported in a reader-filed concern label Jun 20, 2024
@sfshaza2 sfshaza2 self-assigned this Jun 20, 2024
@sfshaza2 sfshaza2 added p2-medium Necessary but not urgent concern. Resolve when possible. e1-hours Effort: < 8 hrs labels Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e1-hours Effort: < 8 hrs from.page-issue Reported in a reader-filed concern p2-medium Necessary but not urgent concern. Resolve when possible.
Projects
None yet
Development

No branches or pull requests

2 participants