From e2b5c72fb51faa10ff0504da6fd46c816137ea2d Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Tue, 14 Feb 2023 12:50:17 +0100 Subject: [PATCH] feat(ui_kit): add multicolor support in linear gradient helper --- .../lib/src/core/helpers/linear_gradient_helper.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/wyatt_ui_kit/lib/src/core/helpers/linear_gradient_helper.dart b/packages/wyatt_ui_kit/lib/src/core/helpers/linear_gradient_helper.dart index 7e3af2cd..e102ba2e 100644 --- a/packages/wyatt_ui_kit/lib/src/core/helpers/linear_gradient_helper.dart +++ b/packages/wyatt_ui_kit/lib/src/core/helpers/linear_gradient_helper.dart @@ -15,8 +15,12 @@ // along with this program. If not, see . import 'package:flutter/material.dart'; +import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart'; class LinearGradientHelper { static LinearGradient? fromNullableColors(List? colors) => colors != null ? LinearGradient(colors: colors) : null; + + static LinearGradient? fromMultiColor(MultiColor multiColor) => + multiColor.isGradient ? LinearGradient(colors: multiColor.colors) : null; }