Closed TahaTesser closed 1 week ago
I checked the Google testing failures, and they appear to be legitimate, There are existing customers that expect to be able to create the before image in this PR.
@TahaTesser maybe there is a way we can make this opt-in?
Added TabBar.textScaler
which can override the text scale for tab label, optionally. This ensures the existing tests are not effected.
EditableText
and SelectableText
also contain parameter to override their text scale.
Updated the PR and description as well. Please let me know what do you think.
@Piinks Thanks for review! Rebasing just in case. :)
fixes Tab is hardcoding the height of the icons and the text
Description
This PR introduces
TabBar.textScaler
to provide upper text scale limit for tab label.Code sample
expand to view the code sample
```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: MediaQuery( data: const MediaQueryData(textScaler: TextScaler.linear(3.0)), child: DefaultTabController( length: 3, child: Scaffold( appBar: AppBar( title: const Text('Sample'), bottom: const TabBar( textScaler: TextScaler.linear(2.0), tabs:Without
TabBar.textScaler
With
TabBar.textScaler
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.