ui_components/refactor/migrate-components-code-generator #117
@ -12,8 +12,10 @@ dependencies:
|
|||||||
source_gen: ^1.2.7
|
source_gen: ^1.2.7
|
||||||
analyzer: ^5.4.0
|
analyzer: ^5.4.0
|
||||||
|
|
||||||
wyatt_component_copy_with_extension:
|
wyatt_component_copy_with_extension:
|
||||||
path: ../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
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
test: ^1.21.0
|
test: ^1.21.0
|
||||||
|
@ -1,24 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2022 WYATT GROUP
|
* Copyright (C) 2023 WYATT GROUP
|
||||||
* Please see the AUTHORS file for details.
|
* Please see the AUTHORS file for details.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": ["psioniq.psi-header", "blaugold.melos-code"]
|
||||||
"psioniq.psi-header",
|
}
|
||||||
"blaugold.melos-code"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
* Copyright (C) 2022 WYATT GROUP
|
* Copyright (C) 2023 WYATT GROUP
|
||||||
* Please see the AUTHORS file for details.
|
* Please see the AUTHORS file for details.
|
||||||
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (C) 2022 WYATT GROUP
|
# Copyright (C) 2023 WYATT GROUP
|
||||||
# Please see the AUTHORS file for details.
|
# Please see the AUTHORS file for details.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
@ -14,6 +14,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# 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.experimental.yaml
|
||||||
|
|
||||||
|
@ -1,18 +1,15 @@
|
|||||||
import 'package:flutter/material.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';
|
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||||
|
|
||||||
class CustomAppBar extends AppBarComponent {
|
part 'custom_app_bar.g.dart';
|
||||||
|
|
||||||
|
@ComponentCopyWithExtension()
|
||||||
|
class CustomAppBar extends AppBarComponent with $CustomAppBarCWMixin {
|
||||||
const CustomAppBar({super.title, super.key});
|
const CustomAppBar({super.title, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => AppBar(
|
Widget build(BuildContext context) => AppBar(
|
||||||
title: Text(super.title ?? ''),
|
title: Text(super.title ?? ''),
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
|
||||||
AppBarComponent? configure(
|
|
||||||
{String? title, Widget? leading, List<Widget>? actions}) =>
|
|
||||||
CustomAppBar(
|
|
||||||
title: title ?? this.title,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'custom_app_bar.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentCopyWithGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class $CustomAppBarCWProxyImpl implements $AppBarComponentCWProxy {
|
||||||
|
const $CustomAppBarCWProxyImpl(this._value);
|
||||||
|
final CustomAppBar _value;
|
||||||
|
@override
|
||||||
|
CustomAppBar title(String? title) => this(title: title);
|
||||||
|
@override
|
||||||
|
CustomAppBar leading(Widget? leading) => this(leading: leading);
|
||||||
|
@override
|
||||||
|
CustomAppBar actions(List<Widget>? actions) => this(actions: actions);
|
||||||
|
@override
|
||||||
|
CustomAppBar key(Key? key) => this(key: key);
|
||||||
|
@override
|
||||||
|
CustomAppBar call({
|
||||||
|
String? title,
|
||||||
|
Widget? leading,
|
||||||
|
List<Widget>? actions,
|
||||||
|
Key? key,
|
||||||
|
}) =>
|
||||||
|
CustomAppBar(
|
||||||
|
title: title ?? _value.title,
|
||||||
|
key: key ?? _value.key,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin $CustomAppBarCWMixin on Component {
|
||||||
|
$AppBarComponentCWProxy get copyWith =>
|
||||||
|
$CustomAppBarCWProxyImpl(this as CustomAppBar);
|
||||||
|
}
|
@ -1,7 +1,12 @@
|
|||||||
import 'package:flutter/material.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';
|
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||||
|
|
||||||
class CustomBottomNavigationBar extends BottomNavigationBarComponent {
|
part 'custom_bottom_bar.g.dart';
|
||||||
|
|
||||||
|
@ComponentCopyWithExtension()
|
||||||
|
class CustomBottomNavigationBar extends BottomNavigationBarComponent
|
||||||
|
with $CustomBottomNavigationBarCWMixin {
|
||||||
const CustomBottomNavigationBar({
|
const CustomBottomNavigationBar({
|
||||||
super.currentIndex,
|
super.currentIndex,
|
||||||
super.onTap,
|
super.onTap,
|
||||||
@ -27,14 +32,4 @@ class CustomBottomNavigationBar extends BottomNavigationBarComponent {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
|
||||||
CustomBottomNavigationBar? configure({
|
|
||||||
void Function(BuildContext, int)? onTap,
|
|
||||||
int currentIndex = 0,
|
|
||||||
}) =>
|
|
||||||
CustomBottomNavigationBar(
|
|
||||||
onTap: onTap ?? this.onTap,
|
|
||||||
currentIndex: currentIndex,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'custom_bottom_bar.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentCopyWithGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class $CustomBottomNavigationBarCWProxyImpl
|
||||||
|
implements $BottomNavigationBarComponentCWProxy {
|
||||||
|
const $CustomBottomNavigationBarCWProxyImpl(this._value);
|
||||||
|
final CustomBottomNavigationBar _value;
|
||||||
|
@override
|
||||||
|
CustomBottomNavigationBar onTap(void Function(BuildContext, int)? onTap) =>
|
||||||
|
this(onTap: onTap);
|
||||||
|
@override
|
||||||
|
CustomBottomNavigationBar currentIndex(int? currentIndex) =>
|
||||||
|
this(currentIndex: currentIndex);
|
||||||
|
@override
|
||||||
|
CustomBottomNavigationBar key(Key? key) => this(key: key);
|
||||||
|
@override
|
||||||
|
CustomBottomNavigationBar call({
|
||||||
|
void Function(BuildContext, int)? onTap,
|
||||||
|
int? currentIndex,
|
||||||
|
Key? key,
|
||||||
|
}) =>
|
||||||
|
CustomBottomNavigationBar(
|
||||||
|
currentIndex: currentIndex ?? _value.currentIndex,
|
||||||
|
onTap: onTap ?? _value.onTap,
|
||||||
|
key: key ?? _value.key,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin $CustomBottomNavigationBarCWMixin on Component {
|
||||||
|
$BottomNavigationBarComponentCWProxy get copyWith =>
|
||||||
|
$CustomBottomNavigationBarCWProxyImpl(this as CustomBottomNavigationBar);
|
||||||
|
}
|
@ -1,7 +1,12 @@
|
|||||||
import 'package:flutter/material.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';
|
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||||
|
|
||||||
class CustomErrorWidget extends ErrorWidgetComponent {
|
part 'custom_error_widget.g.dart';
|
||||||
|
|
||||||
|
@ComponentCopyWithExtension()
|
||||||
|
class CustomErrorWidget extends ErrorWidgetComponent
|
||||||
|
with $CustomErrorWidgetCWMixin {
|
||||||
const CustomErrorWidget({super.error, super.key});
|
const CustomErrorWidget({super.error, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -9,8 +14,4 @@ class CustomErrorWidget extends ErrorWidgetComponent {
|
|||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
child: Center(child: Text(error ?? 'Error')),
|
child: Center(child: Text(error ?? 'Error')),
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
|
||||||
ErrorWidgetComponent? configure({String? error}) =>
|
|
||||||
CustomErrorWidget(error: error ?? this.error);
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'custom_error_widget.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentCopyWithGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class $CustomErrorWidgetCWProxyImpl implements $ErrorWidgetComponentCWProxy {
|
||||||
|
const $CustomErrorWidgetCWProxyImpl(this._value);
|
||||||
|
final CustomErrorWidget _value;
|
||||||
|
@override
|
||||||
|
CustomErrorWidget error(String? error) => this(error: error);
|
||||||
|
@override
|
||||||
|
CustomErrorWidget key(Key? key) => this(key: key);
|
||||||
|
@override
|
||||||
|
CustomErrorWidget call({
|
||||||
|
String? error,
|
||||||
|
Key? key,
|
||||||
|
}) =>
|
||||||
|
CustomErrorWidget(
|
||||||
|
error: error ?? _value.error,
|
||||||
|
key: key ?? _value.key,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin $CustomErrorWidgetCWMixin on Component {
|
||||||
|
$ErrorWidgetComponentCWProxy get copyWith =>
|
||||||
|
$CustomErrorWidgetCWProxyImpl(this as CustomErrorWidget);
|
||||||
|
}
|
@ -1,7 +1,12 @@
|
|||||||
import 'package:flutter/material.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';
|
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
|
||||||
|
|
||||||
class CustomLoadingWidget extends LoadingWidgetComponent {
|
part 'custom_loading_widget.g.dart';
|
||||||
|
|
||||||
|
@ComponentCopyWithExtension()
|
||||||
|
class CustomLoadingWidget extends LoadingWidgetComponent
|
||||||
|
with $CustomLoadingWidgetCWMixin {
|
||||||
const CustomLoadingWidget({super.color, super.key});
|
const CustomLoadingWidget({super.color, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -10,9 +15,4 @@ class CustomLoadingWidget extends LoadingWidgetComponent {
|
|||||||
color: color,
|
color: color,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
|
||||||
CustomLoadingWidget? configure({Color? color}) => CustomLoadingWidget(
|
|
||||||
color: color ?? this.color,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'custom_loading_widget.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentCopyWithGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class $CustomLoadingWidgetCWProxyImpl
|
||||||
|
implements $LoadingWidgetComponentCWProxy {
|
||||||
|
const $CustomLoadingWidgetCWProxyImpl(this._value);
|
||||||
|
final CustomLoadingWidget _value;
|
||||||
|
@override
|
||||||
|
CustomLoadingWidget color(Color? color) => this(color: color);
|
||||||
|
@override
|
||||||
|
CustomLoadingWidget key(Key? key) => this(key: key);
|
||||||
|
@override
|
||||||
|
CustomLoadingWidget call({
|
||||||
|
Color? color,
|
||||||
|
Key? key,
|
||||||
|
}) =>
|
||||||
|
CustomLoadingWidget(
|
||||||
|
color: color ?? _value.color,
|
||||||
|
key: key ?? _value.key,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin $CustomLoadingWidgetCWMixin on Component {
|
||||||
|
$LoadingWidgetComponentCWProxy get copyWith =>
|
||||||
|
$CustomLoadingWidgetCWProxyImpl(this as CustomLoadingWidget);
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
@ -50,14 +50,14 @@ class Home extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
appBar: PreferredSize(
|
appBar: PreferredSize(
|
||||||
preferredSize: const Size.fromHeight(60),
|
preferredSize: const Size.fromHeight(60),
|
||||||
child: context.components.appBar?.configure(title: 'Example title') ??
|
child: context.components.appBar?.copyWith.title('Example title') ??
|
||||||
const SizedBox.shrink(),
|
const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: context.components.errorWidget
|
child: context.components.errorWidget
|
||||||
?.configure(error: 'Example erreur') ??
|
?.copyWith(error: 'Example erreur') ??
|
||||||
const SizedBox.shrink(),
|
const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
@ -65,7 +65,7 @@ class Home extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: context.components.loadingWidget
|
child: context.components.loadingWidget
|
||||||
?.configure(color: Colors.green) ??
|
?.copyWith(color: Colors.green) ??
|
||||||
const SizedBox.shrink(),
|
const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -3,7 +3,7 @@ description: A new Flutter project.
|
|||||||
|
|
||||||
# The following line prevents the package from being accidentally published to
|
# The following line prevents the package from being accidentally published to
|
||||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
# The following defines the version and build number for your application.
|
# The following defines the version and build number for your application.
|
||||||
# A version number is three numbers separated by dots, like 1.2.43
|
# A version number is three numbers separated by dots, like 1.2.43
|
||||||
@ -27,19 +27,26 @@ environment:
|
|||||||
# the latest version available on pub.dev. To see which dependencies have newer
|
# the latest version available on pub.dev. To see which dependencies have newer
|
||||||
# versions available, run `flutter pub outdated`.
|
# versions available, run `flutter pub outdated`.
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
|
|
||||||
wyatt_ui_components:
|
wyatt_ui_components:
|
||||||
path: "../"
|
path: "../"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
|
build_runner: ^2.3.3
|
||||||
|
wyatt_component_copy_with_gen:
|
||||||
|
git:
|
||||||
|
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
|
||||||
|
path: packages/wyatt_component_copy_with_gen
|
||||||
|
|
||||||
wyatt_analysis:
|
wyatt_analysis:
|
||||||
git:
|
git:
|
||||||
@ -50,10 +57,8 @@ dev_dependencies:
|
|||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|
||||||
|
|
||||||
# The following section is specific to Flutter.
|
# The following section is specific to Flutter.
|
||||||
flutter:
|
flutter:
|
||||||
|
|
||||||
# The following line ensures that the Material Icons font is
|
# The following line ensures that the Material Icons font is
|
||||||
# included with your application, so that you can use the icons in
|
# included with your application, so that you can use the icons in
|
||||||
# the material Icons class.
|
# the material Icons class.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
// 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/>.
|
||||||
|
|
||||||
|
mixin CopyWithMixin<Proxy> {
|
||||||
|
Proxy get copyWith;
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
@ -14,4 +14,4 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
export 'entities/components.dart';
|
export './entities/entities.dart';
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
// 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';
|
||||||
|
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';
|
||||||
|
|
||||||
|
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,
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'app_bar_component.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentProxyGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
abstract class $AppBarComponentCWProxy {
|
||||||
|
AppBarComponent title(String? title);
|
||||||
|
AppBarComponent leading(Widget? leading);
|
||||||
|
AppBarComponent actions(List<Widget>? actions);
|
||||||
|
AppBarComponent key(Key? key);
|
||||||
|
AppBarComponent call({
|
||||||
|
String? title,
|
||||||
|
Widget? leading,
|
||||||
|
List<Widget>? actions,
|
||||||
|
Key? key,
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
// 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: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,
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'bottom_navigation_bar_component.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentProxyGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
abstract class $BottomNavigationBarComponentCWProxy {
|
||||||
|
BottomNavigationBarComponent onTap(void Function(BuildContext, int)? onTap);
|
||||||
|
BottomNavigationBarComponent currentIndex(int? currentIndex);
|
||||||
|
BottomNavigationBarComponent key(Key? key);
|
||||||
|
BottomNavigationBarComponent call({
|
||||||
|
void Function(BuildContext, int)? onTap,
|
||||||
|
Key? key,
|
||||||
|
});
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
@ -18,6 +18,4 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
abstract class Component extends StatelessWidget {
|
abstract class Component extends StatelessWidget {
|
||||||
const Component({super.key});
|
const Component({super.key});
|
||||||
|
|
||||||
Component? configure();
|
|
||||||
}
|
}
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
// Copyright (C) 2022 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';
|
|
||||||
import 'package:wyatt_ui_components/src/domain/entities/component.dart';
|
|
||||||
|
|
||||||
abstract class AppBarComponent extends Component {
|
|
||||||
final String? title;
|
|
||||||
final Widget? leading;
|
|
||||||
final List<Widget>? actions;
|
|
||||||
const AppBarComponent({
|
|
||||||
this.title,
|
|
||||||
this.leading,
|
|
||||||
this.actions,
|
|
||||||
super.key,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
AppBarComponent? configure({
|
|
||||||
String? title,
|
|
||||||
Widget? leading,
|
|
||||||
List<Widget>? actions,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class BottomNavigationBarComponent extends Component {
|
|
||||||
final int currentIndex;
|
|
||||||
final void Function(BuildContext, int)? onTap;
|
|
||||||
const BottomNavigationBarComponent({
|
|
||||||
this.onTap,
|
|
||||||
this.currentIndex = 0,
|
|
||||||
super.key,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
BottomNavigationBarComponent? configure({
|
|
||||||
void Function(BuildContext, int)? onTap,
|
|
||||||
int currentIndex = 0,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class ErrorWidgetComponent extends Component {
|
|
||||||
final String? error;
|
|
||||||
const ErrorWidgetComponent({required this.error, super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
ErrorWidgetComponent? configure({String? error});
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class LoadingWidgetComponent extends Component {
|
|
||||||
final Color? color;
|
|
||||||
const LoadingWidgetComponent({required this.color, super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
LoadingWidgetComponent? configure({Color? color});
|
|
||||||
}
|
|
@ -0,0 +1,21 @@
|
|||||||
|
// 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/>.
|
||||||
|
|
||||||
|
export './app_bar_component.dart';
|
||||||
|
export './bottom_navigation_bar_component.dart';
|
||||||
|
export './error_widget_component.dart';
|
||||||
|
export './loading_widget_component.dart';
|
||||||
|
export './component.dart';
|
@ -0,0 +1,29 @@
|
|||||||
|
// 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: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';
|
||||||
|
|
||||||
|
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});
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'error_widget_component.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentProxyGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
abstract class $ErrorWidgetComponentCWProxy {
|
||||||
|
ErrorWidgetComponent error(String? error);
|
||||||
|
ErrorWidgetComponent key(Key? key);
|
||||||
|
ErrorWidgetComponent call({
|
||||||
|
String? error,
|
||||||
|
Key? key,
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
// 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';
|
||||||
|
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});
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'loading_widget_component.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// ComponentProxyGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
abstract class $LoadingWidgetComponentCWProxy {
|
||||||
|
LoadingWidgetComponent color(Color? color);
|
||||||
|
LoadingWidgetComponent key(Key? key);
|
||||||
|
LoadingWidgetComponent call({
|
||||||
|
Color? color,
|
||||||
|
Key? key,
|
||||||
|
});
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:wyatt_ui_components/src/domain/entities/components.dart';
|
import 'package:wyatt_ui_components/src/domain/entities/entities.dart';
|
||||||
|
|
||||||
class ComponentThemeData {
|
class ComponentThemeData {
|
||||||
final AppBarComponent? appBar;
|
final AppBarComponent? appBar;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
@ -14,7 +14,6 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
export 'core/core.dart';
|
|
||||||
export 'core/core.dart';
|
export 'core/core.dart';
|
||||||
export 'domain/domain.dart';
|
export 'domain/domain.dart';
|
||||||
export 'features/features.dart';
|
export 'features/features.dart';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
// Copyright (C) 2023 WYATT GROUP
|
||||||
// Please see the AUTHORS file for details.
|
// Please see the AUTHORS file for details.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -4,21 +4,28 @@ repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/mas
|
|||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.17.0 <3.0.0'
|
sdk: ">=2.17.0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
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
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
|
build_runner: ^2.3.3
|
||||||
|
wyatt_component_copy_with_gen:
|
||||||
|
git:
|
||||||
|
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
|
||||||
|
path: packages/wyatt_component_copy_with_gen
|
||||||
|
|
||||||
wyatt_analysis:
|
wyatt_analysis:
|
||||||
git:
|
git:
|
||||||
url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages
|
url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages
|
||||||
ref: wyatt_analysis-v2.3.0
|
ref: wyatt_analysis-v2.3.0
|
||||||
path: packages/wyatt_analysis
|
path: packages/wyatt_analysis
|
||||||
|
Loading…
x
Reference in New Issue
Block a user