[PAGE ISSUE]: 'Building adaptive apps'
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.