You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TableBorder.lerp and TableBorder.scale drop borderRadius #195397
final a =TableBorder.all(borderRadius:constBorderRadius.all(Radius.circular(4)));
final b =TableBorder.all(borderRadius:constBorderRadius.all(Radius.circular(12)));
print(TableBorder.lerp(a, b, 0.5)!.borderRadius); // BorderRadius.zeroprint(b.scale(0.5).borderRadius); // BorderRadius.zero
Expected results
lerp interpolates the radius (8 here), and scale scales it (6 here), the same way BoxDecoration handles borderRadius.
Actual results
Both return BorderRadius.zero. TableBorder.lerp and TableBorder.scale build a new TableBorder from the six sides only, so a table with rounded corners loses them for the whole of an animation, for example when the table's border animates through a theme change. TableBorder.lerp(null, b, t) goes through scale, so animating a rounded border in from nothing is affected too.
@ChandraChaan Thanks for the report. I was able to reproduce the issue locally. Both TableBorder.lerp(a, b, 0.5) and b.scale(0.5) return BorderRadius.zero instead of preserving the expected border radius. Routing to the team-framework for further investigation.
Sample Code
import'package:material_ui/material_ui.dart';
voidmain() {
final a =TableBorder.all(
borderRadius:constBorderRadius.all(Radius.circular(4)),
);
final b =TableBorder.all(
borderRadius:constBorderRadius.all(Radius.circular(12)),
);
final lerped =TableBorder.lerp(a, b, 0.5)!;
final scaled = b.scale(0.5);
debugPrint('lerp: ${lerped.borderRadius}');
debugPrint('scale: ${scaled.borderRadius}');
debugPrint('lerp from null: ${TableBorder.lerp(null, b, 0.5)!.borderRadius}');
runApp(
MaterialApp(
home:Scaffold(
appBar:AppBar(title:constText('TableBorder Reproduction')),
body:Padding(
padding:constEdgeInsets.all(16),
child:Column(
crossAxisAlignment:CrossAxisAlignment.start,
children: [
Text('lerp radius: ${lerped.borderRadius}'),
Text('Expected: BorderRadius.circular(8)'),
constSizedBox(height:16),
Text('scale radius: ${scaled.borderRadius}'),
Text('Expected: BorderRadius.circular(6)'),
constSizedBox(height:16),
Text(
'lerp from null: ''${TableBorder.lerp(null, b, 0.5)!.borderRadius}',
),
constText('Expected: BorderRadius.circular(6)'),
],
),
),
),
),
);
}
Flutter Doctor Output
[✓] Flutter (Channel master, 3.50.0-1.0.pre-209, on macOS 27.0 26A428 darwin-arm64, locale en-IN) [2.0s]
• Flutter version 3.50.0-1.0.pre-209on channel master at /Users/suryakommana/develop/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7b0a985e54 (4 days ago), 2026-10-2300:20:16+0000
• Engine revision 7b0a985e54
• Dart version 3.15.0 (build 3.15.0-67.0.dev)
• DevTools version 2.61.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets,
enable-record-use, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration, enable-riscv64, enable-hcpp
[✓] Android toolchain - develop forAndroid devices (AndroidSDK version 36.0.0) [1,436ms]
• AndroidSDK at /Users/suryakommana/Library/Android/sdk
• Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)
• Platform android-37.0, build-tools 36.0.0
• Java binary at:/Applications/AndroidStudio.app/Contents/jbr/Contents/Home/bin/java
Thisis the JDK bundled with the latest AndroidStudio installation onthis machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDKRuntimeEnvironment (build 25.0.2+-15348964-b329.117)
• AllAndroid licenses accepted.
[✓] Xcode- develop for iOS and macOS (Xcode27.1) [611ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 27A9275
• CocoaPods version 1.17.0
[✓] Chrome- develop for the web [3ms]
• Chrome at /Applications/GoogleChrome.app/Contents/MacOS/GoogleChrome
[✓] Connected device (3 available) [8.6s]
• iPhone 18Pro (mobile) • D80F2104-E911-4251-BEDD-E67D9B7EBF58 • ios • com.apple.CoreSimulator.SimRuntime.iOS-27-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 27.0 26A428 darwin-arm64
• Chrome (web) • chrome • web-javascript • GoogleChrome156.0.8078.48
[✓] Network resources [459ms]
• All expected network resources are available.
• No issues found!
Thanks for confirming! The fix is in #195398, which is already approved. Its tests cover all three cases from your sample: lerp(a, b), scale, and lerp from/to null.
Thanks for the heads-up, @justinmc. I checked #177102: TableBorderPainter.lerp and TableBorderPainter.scale also rebuild the border from the six sides only, so they drop borderRadius the same way.
#195398 fixes TableBorder itself (it's approved), and since TableBorder stays usable through the deprecation period, I think it's still worth landing. Once #177102 is in, I'll send a follow-up that applies the same fix and tests to TableBorderPainter, unless @hm21 would rather include it in #177102.
Activity
suryaKommana2662 commentedon Oct 27, 2026
@ChandraChaan Thanks for the report. I was able to reproduce the issue locally. Both
TableBorder.lerp(a, b, 0.5)andb.scale(0.5)returnBorderRadius.zeroinstead of preserving the expected border radius. Routing to theteam-frameworkfor further investigation.Sample Code
Flutter Doctor Output
ChandraChaan commentedon Oct 27, 2026
Thanks for confirming! The fix is in #195398, which is already approved. Its tests cover all three cases from your sample:
lerp(a, b),scale, and lerp from/tonull.justinmc commentedon Oct 27, 2026
@ChandraChaan Heads up that TableBorder is about to be deprecated in favor of TableBorderPainter, see #177102.
ChandraChaan commentedon Oct 27, 2026
Thanks for the heads-up, @justinmc. I checked #177102:
TableBorderPainter.lerpandTableBorderPainter.scalealso rebuild the border from the six sides only, so they dropborderRadiusthe same way.#195398 fixes
TableBorderitself (it's approved), and sinceTableBorderstays usable through the deprecation period, I think it's still worth landing. Once #177102 is in, I'll send a follow-up that applies the same fix and tests toTableBorderPainter, unless @hm21 would rather include it in #177102.