diff --git a/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.dart b/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.dart index 64223350..0cb81c93 100644 --- a/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.dart +++ b/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.dart @@ -9,6 +9,6 @@ class CustomAppBar extends AppBarComponent with $CustomAppBarCWMixin { const CustomAppBar({super.title}); @override Widget build(BuildContext context) => AppBar( - title: Text(title ?? 'Title'), + title: Text(title?.text ?? 'Title'), ); } diff --git a/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.g.dart b/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.g.dart index 4f4d5343..f64c8fee 100644 --- a/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.g.dart +++ b/packages/wyatt_bloc_layout/example/lib/components/custom_app_bar.g.dart @@ -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? actions, Key? key, diff --git a/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.dart b/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.dart index 799214e3..8890f785 100644 --- a/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.dart +++ b/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.dart @@ -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')), ); } diff --git a/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.g.dart b/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.g.dart index ed5b8c5b..64db5487 100644 --- a/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.g.dart +++ b/packages/wyatt_bloc_layout/example/lib/components/custom_error_widget.g.dart @@ -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( diff --git a/packages/wyatt_bloc_layout/lib/src/core/crud_cubit_consumer_screen_mixin.dart b/packages/wyatt_bloc_layout/lib/src/core/crud_cubit_consumer_screen_mixin.dart index f3b1133c..62d9ea8b 100644 --- a/packages/wyatt_bloc_layout/lib/src/core/crud_cubit_consumer_screen_mixin.dart +++ b/packages/wyatt_bloc_layout/lib/src/core/crud_cubit_consumer_screen_mixin.dart @@ -23,7 +23,7 @@ import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart'; mixin CrudMixin { Widget errorBuilder(BuildContext context, CrudError state) => - context.components.errorWidget?.copyWith(error: state.message) ?? + context.components.errorWidget?.copyWith(error: state.message.wrap()) ?? const SizedBox.shrink(); Widget loadingBuilder(BuildContext context, CrudLoading state) => diff --git a/packages/wyatt_component_copy_with_gen/example/lib/custom_app_bar_example.dart b/packages/wyatt_component_copy_with_gen/example/lib/custom_app_bar_example.dart index e08015f2..870222a6 100644 --- a/packages/wyatt_component_copy_with_gen/example/lib/custom_app_bar_example.dart +++ b/packages/wyatt_component_copy_with_gen/example/lib/custom_app_bar_example.dart @@ -27,6 +27,6 @@ class CustomAppBarExample extends AppBarComponent @override Widget build(BuildContext context) => AppBar( - title: Text(super.title ?? ''), + title: Text(super.title?.text ?? ''), ); } diff --git a/packages/wyatt_ui_components/example/lib/main.dart b/packages/wyatt_ui_components/example/lib/main.dart index 2ee31aeb..d49b551b 100644 --- a/packages/wyatt_ui_components/example/lib/main.dart +++ b/packages/wyatt_ui_components/example/lib/main.dart @@ -28,17 +28,17 @@ class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) => ComponentTheme( - componentThemeWidget: AppThemeComponent.components, - child: MaterialApp( - title: 'Wyatt Ui Components Example', - theme: ThemeData( - primarySwatch: Colors.blue, + componentThemeWidget: AppThemeComponent.components, + child: MaterialApp( + title: 'Wyatt Ui Components Example', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: const Scaffold( + body: Home(), + ), ), - home: const Scaffold( - body: Home(), - ), - ), - ); + ); } class Home extends StatelessWidget { @@ -48,14 +48,15 @@ class Home extends StatelessWidget { Widget build(BuildContext context) => Scaffold( appBar: PreferredSize( preferredSize: const Size.fromHeight(60), - child: context.components.appBar?.copyWith.title('Example title') ?? + child: context.components.appBar?.copyWith + .title('Example title'.wrap()) ?? const SizedBox.shrink(), ), body: Column( children: [ Expanded( child: context.components.errorWidget - ?.copyWith(error: 'Example erreur') ?? + ?.copyWith(error: 'Example erreur'.wrap()) ?? const SizedBox.shrink(), ), const SizedBox( diff --git a/packages/wyatt_ui_components/lib/src/core/core.dart b/packages/wyatt_ui_components/lib/src/core/core.dart index dd4b140f..079c0687 100644 --- a/packages/wyatt_ui_components/lib/src/core/core.dart +++ b/packages/wyatt_ui_components/lib/src/core/core.dart @@ -15,5 +15,6 @@ // along with this program. If not, see . export 'extensions/build_context_extensions.dart'; +export 'extensions/string_extension.dart'; export 'mixins/copy_with_mixin.dart'; export 'utils/text_wrapper.dart'; diff --git a/packages/wyatt_ui_components/lib/src/core/extensions/string_extension.dart b/packages/wyatt_ui_components/lib/src/core/extensions/string_extension.dart new file mode 100644 index 00000000..d0e7817e --- /dev/null +++ b/packages/wyatt_ui_components/lib/src/core/extensions/string_extension.dart @@ -0,0 +1,23 @@ +// 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 . + +import 'package:flutter/widgets.dart'; +import 'package:wyatt_ui_components/src/core/utils/text_wrapper.dart'; + +extension StringExtension on String? { + TextWrapper? wrap({TextStyle? style}) => + this != null ? TextWrapper(this!, style: style) : null; +} diff --git a/packages/wyatt_ui_kit/.gitignore b/packages/wyatt_ui_kit/.gitignore new file mode 100644 index 00000000..3cceda55 --- /dev/null +++ b/packages/wyatt_ui_kit/.gitignore @@ -0,0 +1,7 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ + +# Avoid committing pubspec.lock for library packages; see +# https://dart.dev/guides/libraries/private-files#pubspeclock. +pubspec.lock diff --git a/packages/wyatt_ui_kit/.vscode/extensions.json b/packages/wyatt_ui_kit/.vscode/extensions.json new file mode 100644 index 00000000..30cd2233 --- /dev/null +++ b/packages/wyatt_ui_kit/.vscode/extensions.json @@ -0,0 +1,24 @@ +/* + * 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 . + */ + +{ + "recommendations": [ + "psioniq.psi-header", + "blaugold.melos-code" + ] +} \ No newline at end of file diff --git a/packages/wyatt_ui_kit/.vscode/launch.json b/packages/wyatt_ui_kit/.vscode/launch.json new file mode 100644 index 00000000..653eabc8 --- /dev/null +++ b/packages/wyatt_ui_kit/.vscode/launch.json @@ -0,0 +1,34 @@ +/* + * 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 . + */ + +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Example", + "request": "launch", + "type": "dart", + "cwd": "example/", + "program": "lib/main.dart", + "flutterMode": "debug" + }, + ] +} \ No newline at end of file diff --git a/packages/wyatt_ui_kit/.vscode/settings.json b/packages/wyatt_ui_kit/.vscode/settings.json new file mode 100644 index 00000000..a729c46c --- /dev/null +++ b/packages/wyatt_ui_kit/.vscode/settings.json @@ -0,0 +1,72 @@ +{ + "dart.runPubGetOnPubspecChanges": "never", + "bloc.newCubitTemplate.type": "equatable", + "psi-header.changes-tracking": { + "isActive": true + }, + "psi-header.config": { + "blankLinesAfter": 1, + "forceToTop": true + }, + "psi-header.lang-config": [ + { + "beforeHeader": [ + "# -*- coding:utf-8 -*-", + "#!/usr/bin/env python3" + ], + "begin": "###", + "end": "###", + "language": "python", + "prefix": "# " + }, + { + "beforeHeader": [ + "#!/usr/bin/env sh", + "" + ], + "language": "shellscript", + "begin": "", + "end": "", + "prefix": "# " + }, + { + "begin": "", + "end": "", + "language": "dart", + "prefix": "// " + }, + { + "begin": "", + "end": "", + "language": "yaml", + "prefix": "# " + }, + { + "begin": "", + "language": "markdown", + }, + ], + "psi-header.templates": [ + { + "language": "*", + "template": [ + "Copyright (C) <> 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 ." + ], + } + ], +} \ No newline at end of file diff --git a/packages/wyatt_ui_kit/CHANGELOG.md b/packages/wyatt_ui_kit/CHANGELOG.md new file mode 100644 index 00000000..effe43c8 --- /dev/null +++ b/packages/wyatt_ui_kit/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/packages/wyatt_ui_kit/README.md b/packages/wyatt_ui_kit/README.md new file mode 100644 index 00000000..86e4538b --- /dev/null +++ b/packages/wyatt_ui_kit/README.md @@ -0,0 +1,50 @@ + + +# Flutter - Wyatt Ui Kit + +

+ Style: Wyatt Analysis + SDK: Flutter +

+ +UIKit and Design System used in Wyatt Studio. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/packages/wyatt_ui_kit/analysis_options.yaml b/packages/wyatt_ui_kit/analysis_options.yaml new file mode 100644 index 00000000..8c9daa4e --- /dev/null +++ b/packages/wyatt_ui_kit/analysis_options.yaml @@ -0,0 +1 @@ +include: package:wyatt_analysis/analysis_options.flutter.yaml diff --git a/packages/wyatt_ui_kit/example/.gitignore b/packages/wyatt_ui_kit/example/.gitignore new file mode 100644 index 00000000..24476c5d --- /dev/null +++ b/packages/wyatt_ui_kit/example/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/wyatt_ui_kit/example/.metadata b/packages/wyatt_ui_kit/example/.metadata new file mode 100644 index 00000000..30e0d3ce --- /dev/null +++ b/packages/wyatt_ui_kit/example/.metadata @@ -0,0 +1,30 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + channel: stable + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + - platform: web + create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/wyatt_ui_kit/example/README.md b/packages/wyatt_ui_kit/example/README.md new file mode 100644 index 00000000..2b3fce4c --- /dev/null +++ b/packages/wyatt_ui_kit/example/README.md @@ -0,0 +1,16 @@ +# example + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/wyatt_ui_kit/example/analysis_options.yaml b/packages/wyatt_ui_kit/example/analysis_options.yaml new file mode 100644 index 00000000..0939257e --- /dev/null +++ b/packages/wyatt_ui_kit/example/analysis_options.yaml @@ -0,0 +1,7 @@ + +include: package:wyatt_analysis/analysis_options.flutter.yaml + + + + + diff --git a/packages/wyatt_ui_kit/example/lib/main.dart b/packages/wyatt_ui_kit/example/lib/main.dart new file mode 100644 index 00000000..8a831274 --- /dev/null +++ b/packages/wyatt_ui_kit/example/lib/main.dart @@ -0,0 +1,43 @@ +// 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 . + +import 'package:flutter/material.dart'; + +import 'package:wyatt_ui_kit/wyatt_ui_kit.dart'; + +void main(List args) { + runApp(const App()); +} + +class App extends StatelessWidget { + const App({super.key}); + + static const String title = 'Wyatt Ui Kit Example'; + + @override + Widget build(BuildContext context) => MaterialApp( + title: title, + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: Scaffold( + appBar: AppBar( + title: const Text(title), + ), + body: Center(child: Text(WyattUiKit.testString)), + ), + ); +} diff --git a/packages/wyatt_ui_kit/example/pubspec.yaml b/packages/wyatt_ui_kit/example/pubspec.yaml new file mode 100644 index 00000000..1f5a0745 --- /dev/null +++ b/packages/wyatt_ui_kit/example/pubspec.yaml @@ -0,0 +1,25 @@ +name: wyatt_ui_kit_example +description: A new Flutter project. +version: 1.0.0 + +publish_to: "none" + +environment: + sdk: ">=2.19.0 <3.0.0" + +dependencies: + flutter: { sdk: flutter } + + wyatt_ui_kit: + path: "../" + +dev_dependencies: + flutter_test: { sdk: flutter } + + wyatt_analysis: + hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub + version: ^2.4.0 + +# The following section is specific to Flutter. +flutter: + uses-material-design: true diff --git a/packages/wyatt_ui_kit/example/web/favicon.png b/packages/wyatt_ui_kit/example/web/favicon.png new file mode 100644 index 00000000..8aaa46ac Binary files /dev/null and b/packages/wyatt_ui_kit/example/web/favicon.png differ diff --git a/packages/wyatt_ui_kit/example/web/icons/Icon-192.png b/packages/wyatt_ui_kit/example/web/icons/Icon-192.png new file mode 100644 index 00000000..b749bfef Binary files /dev/null and b/packages/wyatt_ui_kit/example/web/icons/Icon-192.png differ diff --git a/packages/wyatt_ui_kit/example/web/icons/Icon-512.png b/packages/wyatt_ui_kit/example/web/icons/Icon-512.png new file mode 100644 index 00000000..88cfd48d Binary files /dev/null and b/packages/wyatt_ui_kit/example/web/icons/Icon-512.png differ diff --git a/packages/wyatt_ui_kit/example/web/icons/Icon-maskable-192.png b/packages/wyatt_ui_kit/example/web/icons/Icon-maskable-192.png new file mode 100644 index 00000000..eb9b4d76 Binary files /dev/null and b/packages/wyatt_ui_kit/example/web/icons/Icon-maskable-192.png differ diff --git a/packages/wyatt_ui_kit/example/web/icons/Icon-maskable-512.png b/packages/wyatt_ui_kit/example/web/icons/Icon-maskable-512.png new file mode 100644 index 00000000..d69c5669 Binary files /dev/null and b/packages/wyatt_ui_kit/example/web/icons/Icon-maskable-512.png differ diff --git a/packages/wyatt_ui_kit/example/web/index.html b/packages/wyatt_ui_kit/example/web/index.html new file mode 100644 index 00000000..be820e83 --- /dev/null +++ b/packages/wyatt_ui_kit/example/web/index.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + example + + + + + + + + + + diff --git a/packages/wyatt_ui_kit/example/web/manifest.json b/packages/wyatt_ui_kit/example/web/manifest.json new file mode 100644 index 00000000..096edf8f --- /dev/null +++ b/packages/wyatt_ui_kit/example/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "example", + "short_name": "example", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/packages/wyatt_ui_kit/lib/src/wyatt_ui_kit.dart b/packages/wyatt_ui_kit/lib/src/wyatt_ui_kit.dart new file mode 100644 index 00000000..0d483300 --- /dev/null +++ b/packages/wyatt_ui_kit/lib/src/wyatt_ui_kit.dart @@ -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 . + +abstract class WyattUiKit { + static String get testString => 'Package: Wyatt Ui Kit'; +} diff --git a/packages/wyatt_ui_kit/lib/wyatt_ui_kit.dart b/packages/wyatt_ui_kit/lib/wyatt_ui_kit.dart new file mode 100644 index 00000000..0e1dd56a --- /dev/null +++ b/packages/wyatt_ui_kit/lib/wyatt_ui_kit.dart @@ -0,0 +1,20 @@ +// 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 . + +/// UIKit and Design System used in Wyatt Studio. +library wyatt_ui_kit; + +export 'src/wyatt_ui_kit.dart'; diff --git a/packages/wyatt_ui_kit/pubspec.yaml b/packages/wyatt_ui_kit/pubspec.yaml new file mode 100644 index 00000000..15d313a8 --- /dev/null +++ b/packages/wyatt_ui_kit/pubspec.yaml @@ -0,0 +1,34 @@ +name: wyatt_ui_kit +description: UIKit and Design System used in Wyatt Studio. +repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_ui_kit +version: 1.0.0 + +environment: + sdk: ">=2.19.0 <3.0.0" + +dependencies: + flutter: { sdk: flutter } + flutter_animate: ^3.0.0 + 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 + wyatt_ui_components: + git: + url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git + path: packages/wyatt_ui_components + +dev_dependencies: + build_runner: ^2.3.3 + flutter_test: { sdk: flutter } + wyatt_analysis: + hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub + version: ^2.4.0 + 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 + +# The following section is specific to Flutter. +flutter: + uses-material-design: true diff --git a/packages/wyatt_ui_kit/test/wyatt_ui_kit_test.dart b/packages/wyatt_ui_kit/test/wyatt_ui_kit_test.dart new file mode 100644 index 00000000..771213c1 --- /dev/null +++ b/packages/wyatt_ui_kit/test/wyatt_ui_kit_test.dart @@ -0,0 +1 @@ +// TODO(wyatt): add some tests \ No newline at end of file diff --git a/packages/wyatt_ui_layout/example/lib/components/custom_app_bar.dart b/packages/wyatt_ui_layout/example/lib/components/custom_app_bar.dart index dd5394ca..5943737e 100644 --- a/packages/wyatt_ui_layout/example/lib/components/custom_app_bar.dart +++ b/packages/wyatt_ui_layout/example/lib/components/custom_app_bar.dart @@ -13,6 +13,6 @@ class CustomAppBar extends AppBarComponent with $CustomAppBarCWMixin { @override Widget build(BuildContext context) => AppBar( - title: Text(title ?? ''), + title: Text(title?.text ?? ''), ); } diff --git a/packages/wyatt_ui_layout/lib/src/presentation/layouts/app_bar_layout.dart b/packages/wyatt_ui_layout/lib/src/presentation/layouts/app_bar_layout.dart index c7aae7db..26cd6fdb 100644 --- a/packages/wyatt_ui_layout/lib/src/presentation/layouts/app_bar_layout.dart +++ b/packages/wyatt_ui_layout/lib/src/presentation/layouts/app_bar_layout.dart @@ -36,7 +36,7 @@ class AppBarLayout extends Layout { appBar: PreferredSize( preferredSize: const Size.fromHeight(60), child: context.components.appBar?.copyWith( - title: title, + title: title.wrap(), leading: leading, actions: actions, ) ?? diff --git a/packages/wyatt_ui_layout/lib/src/presentation/layouts/frame_layout.dart b/packages/wyatt_ui_layout/lib/src/presentation/layouts/frame_layout.dart index e4347fa0..da0f7f40 100644 --- a/packages/wyatt_ui_layout/lib/src/presentation/layouts/frame_layout.dart +++ b/packages/wyatt_ui_layout/lib/src/presentation/layouts/frame_layout.dart @@ -38,7 +38,7 @@ class FrameLayout extends Layout { appBar: PreferredSize( preferredSize: const Size.fromHeight(60), child: context.components.appBar?.copyWith( - title: title, + title: title.wrap(), leading: leading, actions: actions, ) ??