feat(ui_kit): add multicolor support in linear gradient helper
This commit is contained in:
parent
4695cf0618
commit
82eeba4d7d
@ -15,8 +15,12 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
|
||||
class LinearGradientHelper {
|
||||
static LinearGradient? fromNullableColors(List<Color>? colors) =>
|
||||
colors != null ? LinearGradient(colors: colors) : null;
|
||||
|
||||
static LinearGradient? fromMultiColor(MultiColor multiColor) =>
|
||||
multiColor.isGradient ? LinearGradient(colors: multiColor.colors) : null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user