refactor(ui_kit): rename GradientBoxBorder

This commit is contained in:
Hugo Pointcheval 2023-02-21 15:07:56 +01:00
parent 7b9f732960
commit b936ed2d75
Signed by: hugo
GPG Key ID: 3AAC487E131E00BC
5 changed files with 7 additions and 7 deletions

View File

@ -121,7 +121,7 @@ class FlatButtonScreen extends CubitScreen<ButtonCubit, ButtonState> {
// 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,
),

View File

@ -120,7 +120,7 @@ class SimpleIconButtonScreen extends CubitScreen<ButtonCubit, ButtonState> {
// 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,
),

View File

@ -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,
),

View File

@ -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,
),

View File

@ -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;