From b936ed2d75b557b1e4e8a8edcb552fbfe15247a2 Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Tue, 21 Feb 2023 15:07:56 +0100 Subject: [PATCH] refactor(ui_kit): rename GradientBoxBorder --- .../components/buttons/flat_button/flat_button_screen.dart | 2 +- .../buttons/simple_icon_button/simple_icon_screen.dart | 2 +- .../buttons/symbol_button/symbol_button_screen.dart | 2 +- .../lib/src/components/cards/widgets/card_wrapper.dart | 4 ++-- .../lib/src/components/gradients/gradient_box_border.dart | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/wyatt_ui_kit/lib/src/components/buttons/flat_button/flat_button_screen.dart b/packages/wyatt_ui_kit/lib/src/components/buttons/flat_button/flat_button_screen.dart index 14b739fa..6be53168 100644 --- a/packages/wyatt_ui_kit/lib/src/components/buttons/flat_button/flat_button_screen.dart +++ b/packages/wyatt_ui_kit/lib/src/components/buttons/flat_button/flat_button_screen.dart @@ -121,7 +121,7 @@ class FlatButtonScreen extends CubitScreen { // If no border color => no default value border: (style.borderColors != null && style.stroke != null) ? (style.borderColors?.isGradient ?? false) - ? CustomGradientBoxBorder( + ? GradientBoxBorder( gradient: LinearGradient( colors: style.borderColors!.colors, ), diff --git a/packages/wyatt_ui_kit/lib/src/components/buttons/simple_icon_button/simple_icon_screen.dart b/packages/wyatt_ui_kit/lib/src/components/buttons/simple_icon_button/simple_icon_screen.dart index 624cfccc..4467cd54 100644 --- a/packages/wyatt_ui_kit/lib/src/components/buttons/simple_icon_button/simple_icon_screen.dart +++ b/packages/wyatt_ui_kit/lib/src/components/buttons/simple_icon_button/simple_icon_screen.dart @@ -120,7 +120,7 @@ class SimpleIconButtonScreen extends CubitScreen { // If no border color => no default value border: (style.borderColors != null && style.stroke != null) ? (style.borderColors?.isGradient ?? false) - ? CustomGradientBoxBorder( + ? GradientBoxBorder( gradient: LinearGradient( colors: style.borderColors!.colors, ), diff --git a/packages/wyatt_ui_kit/lib/src/components/buttons/symbol_button/symbol_button_screen.dart b/packages/wyatt_ui_kit/lib/src/components/buttons/symbol_button/symbol_button_screen.dart index 6b586d82..be5009db 100644 --- a/packages/wyatt_ui_kit/lib/src/components/buttons/symbol_button/symbol_button_screen.dart +++ b/packages/wyatt_ui_kit/lib/src/components/buttons/symbol_button/symbol_button_screen.dart @@ -144,7 +144,7 @@ class SymbolButtonScreen border: (style.borderColors != null && style.stroke != null) ? (style.borderColors?.isGradient ?? false) - ? CustomGradientBoxBorder( + ? GradientBoxBorder( gradient: LinearGradient( colors: style.borderColors!.colors, ), diff --git a/packages/wyatt_ui_kit/lib/src/components/cards/widgets/card_wrapper.dart b/packages/wyatt_ui_kit/lib/src/components/cards/widgets/card_wrapper.dart index db898c29..75473d0b 100644 --- a/packages/wyatt_ui_kit/lib/src/components/cards/widgets/card_wrapper.dart +++ b/packages/wyatt_ui_kit/lib/src/components/cards/widgets/card_wrapper.dart @@ -102,7 +102,7 @@ class CardWrapper extends StatelessWidget { BoxBorder? _boxBorder(BuildContext context) { if (borderColors != null) { if (borderColors!.length >= 2) { - return CustomGradientBoxBorder( + return GradientBoxBorder( gradient: LinearGradient( colors: borderColors!, ), @@ -118,7 +118,7 @@ class CardWrapper extends StatelessWidget { if (extensionCardColor != null && extensionCardColor.borderColors != null) { if (extensionCardColor.borderColors!.isGradient) { - return CustomGradientBoxBorder( + return GradientBoxBorder( gradient: LinearGradient( colors: extensionCardColor.borderColors!.colors, ), diff --git a/packages/wyatt_ui_kit/lib/src/components/gradients/gradient_box_border.dart b/packages/wyatt_ui_kit/lib/src/components/gradients/gradient_box_border.dart index 10372a96..2a77264e 100644 --- a/packages/wyatt_ui_kit/lib/src/components/gradients/gradient_box_border.dart +++ b/packages/wyatt_ui_kit/lib/src/components/gradients/gradient_box_border.dart @@ -17,8 +17,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; -class CustomGradientBoxBorder extends Border { - const CustomGradientBoxBorder({this.gradient, this.width = 1}); +class GradientBoxBorder extends Border { + const GradientBoxBorder({this.gradient, this.width = 1}); final Gradient? gradient; final double width;