master #81
@ -121,7 +121,7 @@ class FlatButtonScreen extends CubitScreen<ButtonCubit, ButtonState> {
|
|||||||
// If no border color => no default value
|
// If no border color => no default value
|
||||||
border: (style.borderColors != null && style.stroke != null)
|
border: (style.borderColors != null && style.stroke != null)
|
||||||
? (style.borderColors?.isGradient ?? false)
|
? (style.borderColors?.isGradient ?? false)
|
||||||
? CustomGradientBoxBorder(
|
? GradientBoxBorder(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
colors: style.borderColors!.colors,
|
colors: style.borderColors!.colors,
|
||||||
),
|
),
|
||||||
|
@ -120,7 +120,7 @@ class SimpleIconButtonScreen extends CubitScreen<ButtonCubit, ButtonState> {
|
|||||||
// If no border color => no default value
|
// If no border color => no default value
|
||||||
border: (style.borderColors != null && style.stroke != null)
|
border: (style.borderColors != null && style.stroke != null)
|
||||||
? (style.borderColors?.isGradient ?? false)
|
? (style.borderColors?.isGradient ?? false)
|
||||||
? CustomGradientBoxBorder(
|
? GradientBoxBorder(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
colors: style.borderColors!.colors,
|
colors: style.borderColors!.colors,
|
||||||
),
|
),
|
||||||
|
@ -144,7 +144,7 @@ class SymbolButtonScreen
|
|||||||
border:
|
border:
|
||||||
(style.borderColors != null && style.stroke != null)
|
(style.borderColors != null && style.stroke != null)
|
||||||
? (style.borderColors?.isGradient ?? false)
|
? (style.borderColors?.isGradient ?? false)
|
||||||
? CustomGradientBoxBorder(
|
? GradientBoxBorder(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
colors: style.borderColors!.colors,
|
colors: style.borderColors!.colors,
|
||||||
),
|
),
|
||||||
|
@ -102,7 +102,7 @@ class CardWrapper extends StatelessWidget {
|
|||||||
BoxBorder? _boxBorder(BuildContext context) {
|
BoxBorder? _boxBorder(BuildContext context) {
|
||||||
if (borderColors != null) {
|
if (borderColors != null) {
|
||||||
if (borderColors!.length >= 2) {
|
if (borderColors!.length >= 2) {
|
||||||
return CustomGradientBoxBorder(
|
return GradientBoxBorder(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
colors: borderColors!,
|
colors: borderColors!,
|
||||||
),
|
),
|
||||||
@ -118,7 +118,7 @@ class CardWrapper extends StatelessWidget {
|
|||||||
if (extensionCardColor != null &&
|
if (extensionCardColor != null &&
|
||||||
extensionCardColor.borderColors != null) {
|
extensionCardColor.borderColors != null) {
|
||||||
if (extensionCardColor.borderColors!.isGradient) {
|
if (extensionCardColor.borderColors!.isGradient) {
|
||||||
return CustomGradientBoxBorder(
|
return GradientBoxBorder(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
colors: extensionCardColor.borderColors!.colors,
|
colors: extensionCardColor.borderColors!.colors,
|
||||||
),
|
),
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/painting.dart';
|
import 'package:flutter/painting.dart';
|
||||||
|
|
||||||
class CustomGradientBoxBorder extends Border {
|
class GradientBoxBorder extends Border {
|
||||||
const CustomGradientBoxBorder({this.gradient, this.width = 1});
|
const GradientBoxBorder({this.gradient, this.width = 1});
|
||||||
|
|
||||||
final Gradient? gradient;
|
final Gradient? gradient;
|
||||||
final double width;
|
final double width;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user