ui_components/feat/cards-components #127
@ -14,4 +14,4 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
include: package:wyatt_analysis/analysis_options.flutter.experimental.yaml
|
||||
include: package:wyatt_analysis/analysis_options.flutter.yaml
|
||||
|
@ -10,6 +10,8 @@ class CustomAppBar extends AppBarComponent with $CustomAppBarCWMixin {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => AppBar(
|
||||
title: Text(super.title ?? ''),
|
||||
title: Text(
|
||||
super.title?.text ?? '',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
||||
const $CustomAppBarCWProxyImpl(this._value);
|
||||
final CustomAppBar _value;
|
||||
@override
|
||||
CustomAppBar title(String? title) => this(title: title);
|
||||
CustomAppBar title(TextWrapper? title) => this(title: title);
|
||||
@override
|
||||
CustomAppBar leading(Widget? leading) => this(leading: leading);
|
||||
@override
|
||||
@ -19,7 +19,7 @@ class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
||||
CustomAppBar key(Key? key) => this(key: key);
|
||||
@override
|
||||
CustomAppBar call({
|
||||
String? title,
|
||||
TextWrapper? title,
|
||||
Widget? leading,
|
||||
List<Widget>? actions,
|
||||
Key? key,
|
||||
|
@ -12,6 +12,6 @@ class CustomErrorWidget extends ErrorWidgetComponent
|
||||
@override
|
||||
Widget build(BuildContext context) => ColoredBox(
|
||||
color: Colors.red,
|
||||
child: Center(child: Text(error ?? 'Error')),
|
||||
child: Center(child: Text(error?.text ?? 'Error')),
|
||||
);
|
||||
}
|
||||
|
@ -10,12 +10,12 @@ class $CustomErrorWidgetCWProxyImpl implements $ErrorWidgetComponentCWProxy {
|
||||
const $CustomErrorWidgetCWProxyImpl(this._value);
|
||||
final CustomErrorWidget _value;
|
||||
@override
|
||||
CustomErrorWidget error(String? error) => this(error: error);
|
||||
CustomErrorWidget error(TextWrapper? error) => this(error: error);
|
||||
@override
|
||||
CustomErrorWidget key(Key? key) => this(key: key);
|
||||
@override
|
||||
CustomErrorWidget call({
|
||||
String? error,
|
||||
TextWrapper? error,
|
||||
Key? key,
|
||||
}) =>
|
||||
CustomErrorWidget(
|
||||
|
@ -27,8 +27,7 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ComponentTheme(
|
||||
Widget build(BuildContext context) => ComponentTheme(
|
||||
componentThemeWidget: AppThemeComponent.components,
|
||||
child: MaterialApp(
|
||||
title: 'Wyatt Ui Components Example',
|
||||
@ -40,7 +39,6 @@ class MyApp extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Home extends StatelessWidget {
|
||||
|
@ -15,3 +15,5 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export 'extensions/build_context_extensions.dart';
|
||||
export 'mixins/copy_with_mixin.dart';
|
||||
export 'utils/text_wrapper.dart';
|
||||
|
@ -0,0 +1,26 @@
|
||||
// Copyright (C) 2023 WYATT GROUP
|
||||
// Please see the AUTHORS file for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TextWrapper {
|
||||
const TextWrapper(this.text, {this.style});
|
||||
|
||||
factory TextWrapper.text(String text) => TextWrapper(text);
|
||||
|
||||
final String text;
|
||||
final TextStyle? style;
|
||||
}
|
@ -15,22 +15,21 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wyatt_ui_components/src/core/mixins/copy_with_mixin.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/component.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
|
||||
part 'app_bar_component.g.dart';
|
||||
|
||||
@ComponentProxyExtension()
|
||||
abstract class AppBarComponent extends Component
|
||||
with CopyWithMixin<$AppBarComponentCWProxy> {
|
||||
final String? title;
|
||||
final Widget? leading;
|
||||
final List<Widget>? actions;
|
||||
const AppBarComponent({
|
||||
this.title,
|
||||
this.leading,
|
||||
this.actions,
|
||||
super.key,
|
||||
});
|
||||
final TextWrapper? title;
|
||||
final Widget? leading;
|
||||
final List<Widget>? actions;
|
||||
}
|
||||
|
@ -7,12 +7,12 @@ part of 'app_bar_component.dart';
|
||||
// **************************************************************************
|
||||
|
||||
abstract class $AppBarComponentCWProxy {
|
||||
AppBarComponent title(String? title);
|
||||
AppBarComponent title(TextWrapper? title);
|
||||
AppBarComponent leading(Widget? leading);
|
||||
AppBarComponent actions(List<Widget>? actions);
|
||||
AppBarComponent key(Key? key);
|
||||
AppBarComponent call({
|
||||
String? title,
|
||||
TextWrapper? title,
|
||||
Widget? leading,
|
||||
List<Widget>? actions,
|
||||
Key? key,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
// Copyright (C) 2023 WYATT GROUP
|
||||
// Please see the AUTHORS file for details.
|
||||
//
|
||||
@ -17,18 +18,17 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:wyatt_ui_components/src/core/mixins/copy_with_mixin.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/component.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
|
||||
part 'bottom_navigation_bar_component.g.dart';
|
||||
|
||||
@ComponentProxyExtension()
|
||||
abstract class BottomNavigationBarComponent extends Component
|
||||
with CopyWithMixin<$BottomNavigationBarComponentCWProxy> {
|
||||
final int currentIndex;
|
||||
final void Function(BuildContext, int)? onTap;
|
||||
const BottomNavigationBarComponent({
|
||||
this.onTap,
|
||||
this.currentIndex = 0,
|
||||
super.key,
|
||||
});
|
||||
final int currentIndex;
|
||||
final void Function(BuildContext, int)? onTap;
|
||||
}
|
||||
|
@ -0,0 +1,60 @@
|
||||
// Copyright (C) 2023 WYATT GROUP
|
||||
// Please see the AUTHORS file for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/component.dart';
|
||||
|
||||
abstract class CardComponent extends Component {
|
||||
const CardComponent({
|
||||
this.radius = 12,
|
||||
this.padding = 25,
|
||||
this.borderColors,
|
||||
this.backgroundColor,
|
||||
this.minSize = const Size(330, 230),
|
||||
this.maxSize = const Size(330, 530),
|
||||
this.shadow = const BoxShadow(
|
||||
blurRadius: 30,
|
||||
offset: Offset(0, 5),
|
||||
color: Color.fromRGBO(0, 0, 0, 0.05),
|
||||
),
|
||||
this.background,
|
||||
super.key,
|
||||
});
|
||||
|
||||
/// Card radius
|
||||
final double? radius;
|
||||
|
||||
/// Padding and gaps of this card
|
||||
final double? padding;
|
||||
|
||||
/// Border gradient color (from left to right)
|
||||
final List<Color>? borderColors;
|
||||
|
||||
/// Card background color
|
||||
final Color? backgroundColor;
|
||||
|
||||
/// Minimum size for this card
|
||||
final Size? minSize;
|
||||
|
||||
/// Maximum size for this card
|
||||
final Size? maxSize;
|
||||
|
||||
/// Drop shadow
|
||||
final BoxShadow? shadow;
|
||||
|
||||
/// Background of the card
|
||||
final Widget? background;
|
||||
}
|
@ -13,3 +13,8 @@
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export './information_card_component.dart';
|
||||
export './portfolio_card_component.dart';
|
||||
export './quote_card_component.dart';
|
||||
export './skill_card_component.dart';
|
@ -0,0 +1,49 @@
|
||||
// Copyright (C) 2023 WYATT GROUP
|
||||
// Please see the AUTHORS file for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/cards/card_component.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
|
||||
part 'information_card_component.g.dart';
|
||||
|
||||
@ComponentProxyExtension()
|
||||
abstract class InformationCardComponent extends CardComponent
|
||||
with CopyWithMixin<$InformationCardComponentCWProxy> {
|
||||
const InformationCardComponent({
|
||||
this.icons,
|
||||
this.title,
|
||||
this.subtitle,
|
||||
this.body,
|
||||
this.axis = Axis.vertical,
|
||||
super.radius,
|
||||
super.padding,
|
||||
super.borderColors,
|
||||
super.backgroundColor,
|
||||
super.minSize,
|
||||
super.maxSize,
|
||||
super.shadow,
|
||||
super.background,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final Axis? axis;
|
||||
final List<Widget>? icons;
|
||||
final TextWrapper? title;
|
||||
final TextWrapper? subtitle;
|
||||
final TextWrapper? body;
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'information_card_component.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ComponentProxyGenerator
|
||||
// **************************************************************************
|
||||
|
||||
abstract class $InformationCardComponentCWProxy {
|
||||
InformationCardComponent icons(List<Widget>? icons);
|
||||
InformationCardComponent title(TextWrapper? title);
|
||||
InformationCardComponent subtitle(TextWrapper? subtitle);
|
||||
InformationCardComponent body(TextWrapper? body);
|
||||
InformationCardComponent axis(Axis? axis);
|
||||
InformationCardComponent radius(double? radius);
|
||||
InformationCardComponent padding(double? padding);
|
||||
InformationCardComponent borderColors(List<Color>? borderColors);
|
||||
InformationCardComponent backgroundColor(Color? backgroundColor);
|
||||
InformationCardComponent minSize(Size? minSize);
|
||||
InformationCardComponent maxSize(Size? maxSize);
|
||||
InformationCardComponent shadow(BoxShadow? shadow);
|
||||
InformationCardComponent background(Widget? background);
|
||||
InformationCardComponent key(Key? key);
|
||||
InformationCardComponent call({
|
||||
List<Widget>? icons,
|
||||
TextWrapper? title,
|
||||
TextWrapper? subtitle,
|
||||
TextWrapper? body,
|
||||
Axis? axis,
|
||||
double? radius,
|
||||
double? padding,
|
||||
List<Color>? borderColors,
|
||||
Color? backgroundColor,
|
||||
Size? minSize,
|
||||
Size? maxSize,
|
||||
BoxShadow? shadow,
|
||||
Widget? background,
|
||||
Key? key,
|
||||
});
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
// Copyright (C) 2023 WYATT GROUP
|
||||
// Please see the AUTHORS file for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/cards/card_component.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
|
||||
part 'portfolio_card_component.g.dart';
|
||||
|
||||
@ComponentProxyExtension()
|
||||
abstract class PortfolioCardComponent extends CardComponent
|
||||
with CopyWithMixin<$PortfolioCardComponentCWProxy> {
|
||||
const PortfolioCardComponent({
|
||||
this.showImagesOnTop,
|
||||
this.keyword,
|
||||
this.description,
|
||||
this.logo,
|
||||
this.projectName,
|
||||
this.subtitle,
|
||||
this.ctas,
|
||||
this.assets,
|
||||
super.radius,
|
||||
super.padding,
|
||||
super.borderColors,
|
||||
super.backgroundColor,
|
||||
super.minSize,
|
||||
super.maxSize,
|
||||
super.shadow,
|
||||
super.background,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final bool? showImagesOnTop;
|
||||
final List<TextWrapper>? keyword;
|
||||
final List<String>? assets;
|
||||
final TextWrapper? description;
|
||||
final String? logo;
|
||||
final TextWrapper? projectName;
|
||||
final TextWrapper? subtitle;
|
||||
final List<Widget>? ctas;
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'portfolio_card_component.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ComponentProxyGenerator
|
||||
// **************************************************************************
|
||||
|
||||
abstract class $PortfolioCardComponentCWProxy {
|
||||
PortfolioCardComponent showImagesOnTop(bool? showImagesOnTop);
|
||||
PortfolioCardComponent keyword(List<TextWrapper>? keyword);
|
||||
PortfolioCardComponent description(TextWrapper? description);
|
||||
PortfolioCardComponent logo(String? logo);
|
||||
PortfolioCardComponent projectName(TextWrapper? projectName);
|
||||
PortfolioCardComponent subtitle(TextWrapper? subtitle);
|
||||
PortfolioCardComponent ctas(List<Widget>? ctas);
|
||||
PortfolioCardComponent assets(List<String>? assets);
|
||||
PortfolioCardComponent radius(double? radius);
|
||||
PortfolioCardComponent padding(double? padding);
|
||||
PortfolioCardComponent borderColors(List<Color>? borderColors);
|
||||
PortfolioCardComponent backgroundColor(Color? backgroundColor);
|
||||
PortfolioCardComponent minSize(Size? minSize);
|
||||
PortfolioCardComponent maxSize(Size? maxSize);
|
||||
PortfolioCardComponent shadow(BoxShadow? shadow);
|
||||
PortfolioCardComponent background(Widget? background);
|
||||
PortfolioCardComponent key(Key? key);
|
||||
PortfolioCardComponent call({
|
||||
bool? showImagesOnTop,
|
||||
List<TextWrapper>? keyword,
|
||||
TextWrapper? description,
|
||||
String? logo,
|
||||
TextWrapper? projectName,
|
||||
TextWrapper? subtitle,
|
||||
List<Widget>? ctas,
|
||||
List<String>? assets,
|
||||
double? radius,
|
||||
double? padding,
|
||||
List<Color>? borderColors,
|
||||
Color? backgroundColor,
|
||||
Size? minSize,
|
||||
Size? maxSize,
|
||||
BoxShadow? shadow,
|
||||
Widget? background,
|
||||
Key? key,
|
||||
});
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
// Copyright (C) 2023 WYATT GROUP
|
||||
// Please see the AUTHORS file for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/cards/card_component.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
|
||||
part 'quote_card_component.g.dart';
|
||||
|
||||
@ComponentProxyExtension()
|
||||
abstract class QuoteCardComponent extends CardComponent
|
||||
with CopyWithMixin<$QuoteCardComponentCWProxy> {
|
||||
const QuoteCardComponent({
|
||||
this.avatar,
|
||||
this.name,
|
||||
this.subtitle,
|
||||
this.gradient,
|
||||
this.quote,
|
||||
this.leftQuote,
|
||||
this.rightQuote,
|
||||
super.radius,
|
||||
super.padding,
|
||||
super.borderColors,
|
||||
super.backgroundColor,
|
||||
super.minSize,
|
||||
super.maxSize,
|
||||
super.shadow,
|
||||
super.background,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final Widget? avatar;
|
||||
final TextWrapper? name;
|
||||
final TextWrapper? subtitle;
|
||||
final TextWrapper? quote;
|
||||
|
||||
final Gradient? gradient;
|
||||
final Widget? leftQuote;
|
||||
final Widget? rightQuote;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'quote_card_component.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ComponentProxyGenerator
|
||||
// **************************************************************************
|
||||
|
||||
abstract class $QuoteCardComponentCWProxy {
|
||||
QuoteCardComponent avatar(Widget? avatar);
|
||||
QuoteCardComponent name(TextWrapper? name);
|
||||
QuoteCardComponent subtitle(TextWrapper? subtitle);
|
||||
QuoteCardComponent gradient(Gradient? gradient);
|
||||
QuoteCardComponent quote(TextWrapper? quote);
|
||||
QuoteCardComponent leftQuote(Widget? leftQuote);
|
||||
QuoteCardComponent rightQuote(Widget? rightQuote);
|
||||
QuoteCardComponent radius(double? radius);
|
||||
QuoteCardComponent padding(double? padding);
|
||||
QuoteCardComponent borderColors(List<Color>? borderColors);
|
||||
QuoteCardComponent backgroundColor(Color? backgroundColor);
|
||||
QuoteCardComponent minSize(Size? minSize);
|
||||
QuoteCardComponent maxSize(Size? maxSize);
|
||||
QuoteCardComponent shadow(BoxShadow? shadow);
|
||||
QuoteCardComponent background(Widget? background);
|
||||
QuoteCardComponent key(Key? key);
|
||||
QuoteCardComponent call({
|
||||
Widget? avatar,
|
||||
TextWrapper? name,
|
||||
TextWrapper? subtitle,
|
||||
Gradient? gradient,
|
||||
TextWrapper? quote,
|
||||
Widget? leftQuote,
|
||||
Widget? rightQuote,
|
||||
double? radius,
|
||||
double? padding,
|
||||
List<Color>? borderColors,
|
||||
Color? backgroundColor,
|
||||
Size? minSize,
|
||||
Size? maxSize,
|
||||
BoxShadow? shadow,
|
||||
Widget? background,
|
||||
Key? key,
|
||||
});
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2023 WYATT GROUP
|
||||
// Please see the AUTHORS file for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/cards/card_component.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
|
||||
part 'skill_card_component.g.dart';
|
||||
|
||||
@ComponentProxyExtension()
|
||||
abstract class SkillCardComponent extends CardComponent
|
||||
with CopyWithMixin<$SkillCardComponentCWProxy> {
|
||||
const SkillCardComponent({
|
||||
this.icon,
|
||||
this.gradient,
|
||||
this.title,
|
||||
this.description,
|
||||
this.skills,
|
||||
this.leadingIcon,
|
||||
super.radius,
|
||||
super.padding,
|
||||
super.borderColors,
|
||||
super.backgroundColor,
|
||||
super.minSize,
|
||||
super.maxSize,
|
||||
super.shadow,
|
||||
super.background,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final IconData? icon;
|
||||
final List<Color>? gradient;
|
||||
final TextWrapper? title;
|
||||
final TextWrapper? description;
|
||||
final List<TextWrapper>? skills;
|
||||
final IconData? leadingIcon;
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'skill_card_component.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ComponentProxyGenerator
|
||||
// **************************************************************************
|
||||
|
||||
abstract class $SkillCardComponentCWProxy {
|
||||
SkillCardComponent icon(IconData? icon);
|
||||
SkillCardComponent gradient(List<Color>? gradient);
|
||||
SkillCardComponent title(TextWrapper? title);
|
||||
SkillCardComponent description(TextWrapper? description);
|
||||
SkillCardComponent skills(List<TextWrapper>? skills);
|
||||
SkillCardComponent leadingIcon(IconData? leadingIcon);
|
||||
SkillCardComponent radius(double? radius);
|
||||
SkillCardComponent padding(double? padding);
|
||||
SkillCardComponent borderColors(List<Color>? borderColors);
|
||||
SkillCardComponent backgroundColor(Color? backgroundColor);
|
||||
SkillCardComponent minSize(Size? minSize);
|
||||
SkillCardComponent maxSize(Size? maxSize);
|
||||
SkillCardComponent shadow(BoxShadow? shadow);
|
||||
SkillCardComponent background(Widget? background);
|
||||
SkillCardComponent key(Key? key);
|
||||
SkillCardComponent call({
|
||||
IconData? icon,
|
||||
List<Color>? gradient,
|
||||
TextWrapper? title,
|
||||
TextWrapper? description,
|
||||
List<TextWrapper>? skills,
|
||||
IconData? leadingIcon,
|
||||
double? radius,
|
||||
double? padding,
|
||||
List<Color>? borderColors,
|
||||
Color? backgroundColor,
|
||||
Size? minSize,
|
||||
Size? maxSize,
|
||||
BoxShadow? shadow,
|
||||
Widget? background,
|
||||
Key? key,
|
||||
});
|
||||
}
|
@ -16,6 +16,7 @@
|
||||
|
||||
export './app_bar_component.dart';
|
||||
export './bottom_navigation_bar_component.dart';
|
||||
export './cards/cards.dart';
|
||||
export './component.dart';
|
||||
export './error_widget_component.dart';
|
||||
export './loading_widget_component.dart';
|
||||
export './component.dart';
|
||||
|
@ -14,16 +14,15 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:wyatt_ui_components/src/core/mixins/copy_with_mixin.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/component.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||
|
||||
part 'error_widget_component.g.dart';
|
||||
|
||||
@ComponentProxyExtension()
|
||||
abstract class ErrorWidgetComponent extends Component
|
||||
with CopyWithMixin<$ErrorWidgetComponentCWProxy> {
|
||||
final String? error;
|
||||
const ErrorWidgetComponent({required this.error, super.key});
|
||||
final TextWrapper? error;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ part of 'error_widget_component.dart';
|
||||
// **************************************************************************
|
||||
|
||||
abstract class $ErrorWidgetComponentCWProxy {
|
||||
ErrorWidgetComponent error(String? error);
|
||||
ErrorWidgetComponent error(TextWrapper? error);
|
||||
ErrorWidgetComponent key(Key? key);
|
||||
ErrorWidgetComponent call({
|
||||
String? error,
|
||||
TextWrapper? error,
|
||||
Key? key,
|
||||
});
|
||||
}
|
||||
|
@ -15,15 +15,15 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
import 'package:wyatt_ui_components/src/core/mixins/copy_with_mixin.dart';
|
||||
import 'package:wyatt_ui_components/src/domain/entities/component.dart';
|
||||
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
|
||||
|
||||
part 'loading_widget_component.g.dart';
|
||||
|
||||
@ComponentProxyExtension()
|
||||
abstract class LoadingWidgetComponent extends Component
|
||||
with CopyWithMixin<$LoadingWidgetComponentCWProxy> {
|
||||
final Color? color;
|
||||
const LoadingWidgetComponent({required this.color, super.key});
|
||||
final Color? color;
|
||||
}
|
||||
|
@ -18,14 +18,14 @@ import 'package:flutter/material.dart';
|
||||
import 'package:wyatt_ui_components/src/features/features.dart';
|
||||
|
||||
class ComponentTheme extends StatelessWidget {
|
||||
final Widget child;
|
||||
final ComponentThemeData componentThemeWidget;
|
||||
|
||||
const ComponentTheme({
|
||||
required this.child,
|
||||
required this.componentThemeWidget,
|
||||
super.key,
|
||||
});
|
||||
final Widget child;
|
||||
final ComponentThemeData componentThemeWidget;
|
||||
|
||||
static ComponentThemeData of(BuildContext context) {
|
||||
final _InheritedComponentTheme? inheritedThemeComponent =
|
||||
@ -46,11 +46,11 @@ class ComponentTheme extends StatelessWidget {
|
||||
}
|
||||
|
||||
class _InheritedComponentTheme extends InheritedWidget {
|
||||
final ComponentTheme themeWidget;
|
||||
const _InheritedComponentTheme(
|
||||
this.themeWidget, {
|
||||
required super.child,
|
||||
});
|
||||
final ComponentTheme themeWidget;
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(covariant InheritedWidget oldWidget) =>
|
||||
|
@ -17,10 +17,6 @@
|
||||
import 'package:wyatt_ui_components/src/domain/entities/entities.dart';
|
||||
|
||||
class ComponentThemeData {
|
||||
final AppBarComponent? appBar;
|
||||
final BottomNavigationBarComponent? bottomNavigationBar;
|
||||
final ErrorWidgetComponent? errorWidget;
|
||||
final LoadingWidgetComponent? loadingWidget;
|
||||
|
||||
const ComponentThemeData.raw({
|
||||
this.appBar,
|
||||
@ -28,4 +24,8 @@ class ComponentThemeData {
|
||||
this.errorWidget,
|
||||
this.loadingWidget,
|
||||
});
|
||||
final AppBarComponent? appBar;
|
||||
final BottomNavigationBarComponent? bottomNavigationBar;
|
||||
final ErrorWidgetComponent? errorWidget;
|
||||
final LoadingWidgetComponent? loadingWidget;
|
||||
}
|
||||
|
@ -14,5 +14,5 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export 'component_theme_data.dart';
|
||||
export 'component_theme.dart';
|
||||
export 'component_theme_data.dart';
|
||||
|
@ -3,13 +3,15 @@ description: Primary ui components
|
||||
repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_ui_components
|
||||
version: 0.0.1
|
||||
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: ">=2.17.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
wyatt_component_copy_with_extension:
|
||||
wyatt_component_copy_with_extension:
|
||||
git:
|
||||
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
|
||||
path: packages/wyatt_component_copy_with_extension
|
||||
|
Loading…
x
Reference in New Issue
Block a user