From dc51b3cbb7a5b905ed38bae3a76677e2b6963245 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 7 May 2024 17:38:27 +0800 Subject: [PATCH] Refactor variable naming --- forui/lib/src/box/box.dart | 2 +- forui/lib/src/theme/widget_data.dart | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/forui/lib/src/box/box.dart b/forui/lib/src/box/box.dart index e27149974..37de2828a 100644 --- a/forui/lib/src/box/box.dart +++ b/forui/lib/src/box/box.dart @@ -16,7 +16,7 @@ class FBox extends StatelessWidget { @override Widget build(BuildContext context) { - final style = this.style ?? FTheme.of(context).widgetData.fBoxStyle; + final style = this.style ?? FTheme.of(context).widgetData.boxStyle; return ColoredBox( color: style.color, diff --git a/forui/lib/src/theme/widget_data.dart b/forui/lib/src/theme/widget_data.dart index ffe8d024d..52ab5438a 100644 --- a/forui/lib/src/theme/widget_data.dart +++ b/forui/lib/src/theme/widget_data.dart @@ -1,16 +1,17 @@ import 'package:forui/src/box/box_style.dart'; +/// A class that holds the widget data. class FWidgetData { /// The box style. - final FBoxStyle fBoxStyle; + final FBoxStyle boxStyle; /// Creates a [WidgetData]. - FWidgetData({required this.fBoxStyle}); + FWidgetData({required this.boxStyle}); /// Creates a copy of this [FWidgetData] with the given properties replaced. FWidgetData copyWith({ - FBoxStyle? fBoxStyle, + FBoxStyle? boxStyle, }) => FWidgetData( - fBoxStyle: fBoxStyle ?? this.fBoxStyle, + boxStyle: boxStyle ?? this.boxStyle, ); }