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

Fix example error on 'Building adaptive apps' page #10769

Closed
1 task
ajeets1978 opened this issue Jun 20, 2024 · 1 comment · Fixed by #10930
Closed
1 task

Fix example error on 'Building adaptive apps' page #10769

ajeets1978 opened this issue Jun 20, 2024 · 1 comment · Fixed by #10930
Assignees
Labels
e1-hours Effort: < 8 hrs fix.examples Adds or changes example from.page-issue Reported in a reader-filed concern p2-medium Necessary but not urgent concern. Resolve when possible. t.adaptive-apps Relates to creating adaptive apps

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
@atsansone atsansone added the t.adaptive-apps Relates to creating adaptive apps label Jul 9, 2024
@atsansone atsansone changed the title [PAGE ISSUE]: 'Building adaptive apps' Fix example error on 'Building adaptive apps' page Jul 9, 2024
@atsansone atsansone added the fix.examples Adds or changes example label Jul 9, 2024
@sfshaza2
Copy link
Contributor

OK, this page should have been removed when the adaptive responsive docs were rewritten. Removing it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e1-hours Effort: < 8 hrs fix.examples Adds or changes example from.page-issue Reported in a reader-filed concern p2-medium Necessary but not urgent concern. Resolve when possible. t.adaptive-apps Relates to creating adaptive apps
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants