master #81

Closed
malo wants to merge 322 commits from master into feat/bloc_layout/new-package
2 changed files with 9 additions and 3 deletions
Showing only changes of commit 23b608ed10 - Show all commits

View File

@ -18,6 +18,7 @@ import 'package:flutter/widgets.dart';
import 'package:wyatt_ui_components/src/core/utils/text_wrapper.dart'; import 'package:wyatt_ui_components/src/core/utils/text_wrapper.dart';
extension StringExtension on String? { extension StringExtension on String? {
TextWrapper? wrap({TextStyle? style}) => TextWrapper? wrap({TextStyle? style, List<Color>? gradient}) => this != null
this != null ? TextWrapper(this!, style: style) : null; ? TextWrapper(this!, style: style, gradient: gradient)
: null;
} }

View File

@ -17,10 +17,15 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class TextWrapper { class TextWrapper {
const TextWrapper(this.text, {this.style}); const TextWrapper(
this.text, {
this.style,
this.gradient,
});
factory TextWrapper.text(String text) => TextWrapper(text); factory TextWrapper.text(String text) => TextWrapper(text);
final String text; final String text;
final TextStyle? style; final TextStyle? style;
final List<Color>? gradient;
} }