From 33d4bdb4a76d0ba1089a9a4195cb679fe9498f0a Mon Sep 17 00:00:00 2001 From: Amanda Southworth Date: Thu, 30 Nov 2023 19:22:58 -0800 Subject: [PATCH 1/2] Adding onboardingSimpShareView --- Package/analysis_options.yaml | 1 + Package/lib/aureus.dart | 1 + Package/lib/src/Core/Foundation/UI/text.dart | 9 ++-- .../Onboarding/OnboardingSimpShareView.dart | 46 +++++++++++++++++++ 4 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 Package/lib/src/Widgets/Views/Onboarding/OnboardingSimpShareView.dart diff --git a/Package/analysis_options.yaml b/Package/analysis_options.yaml index 67c85568..943e8933 100644 --- a/Package/analysis_options.yaml +++ b/Package/analysis_options.yaml @@ -24,6 +24,7 @@ linter: use_key_in_widget_constructors: false avoid_print: false overridden_fields: false + # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options diff --git a/Package/lib/aureus.dart b/Package/lib/aureus.dart index e00ec7c4..ef5f80b1 100644 --- a/Package/lib/aureus.dart +++ b/Package/lib/aureus.dart @@ -148,6 +148,7 @@ export 'src/Widgets/Components/Tabbing Bars/VerticalSideNavBarComponent.dart'; export 'src/Widgets/Views/Onboarding/OnboardingDemoView.dart'; export 'src/Widgets/Views/Onboarding/OnboardingInformationView.dart'; export 'src/Widgets/Views/Onboarding/OnboardingLandingView.dart'; +export 'src/Widgets/Views/Onboarding/OnboardingSimpShareView.dart'; // -------------------------- Utilities export 'src/Widgets/Views/Utilities/DataConsentView.dart'; diff --git a/Package/lib/src/Core/Foundation/UI/text.dart b/Package/lib/src/Core/Foundation/UI/text.dart index 859ca188..59faddd3 100644 --- a/Package/lib/src/Core/Foundation/UI/text.dart +++ b/Package/lib/src/Core/Foundation/UI/text.dart @@ -222,10 +222,11 @@ class HeadingOneText extends StatelessWidget { @override Widget build(BuildContext context) { return GradientAnimationText( - text: Text(data, - style: heading1().copyWith( - color: coloration.decorationColor(decorationVariant: textColor)), - semanticsLabel: data), + text: Text( + data, + style: heading1(), + semanticsLabel: data, + ), colors: [ coloration.contrastColor().withOpacity(0.9), coloration.contrastColor().withOpacity(0.8), diff --git a/Package/lib/src/Widgets/Views/Onboarding/OnboardingSimpShareView.dart b/Package/lib/src/Widgets/Views/Onboarding/OnboardingSimpShareView.dart new file mode 100644 index 00000000..da117e73 --- /dev/null +++ b/Package/lib/src/Widgets/Views/Onboarding/OnboardingSimpShareView.dart @@ -0,0 +1,46 @@ +import 'package:aureus/aureus.dart'; + +/// @nodoc +import 'package:flutter/material.dart'; + +/// {@category Widgets} +/// {@subCategory Views} +/// {@image } + +/*--------- ONBOARDING LANDING VIEW ----------*/ +/// A view where you can ask a user to share your resource. + +class OnboardingSimpSharingView extends StatefulWidget { + /// The message where you ask them to share the resource. + final String simpMessage; + + /// What happens if they agree to share. + final VoidCallback onSimpAgree; + + /// What happens if they decline. You should probably let them go. + final VoidCallback onSimpDeny; + + const OnboardingSimpSharingView({ + required this.simpMessage, + required this.onSimpAgree, + required this.onSimpDeny, + }); + + @override + _OnboardingSimpSharingViewState createState() => + _OnboardingSimpSharingViewState(); +} + +class _OnboardingSimpSharingViewState extends State { + @override + Widget build(BuildContext context) { + ContainerWrapperElement viewLayout = ContainerWrapperElement( + containerVariant: wrapperVariants.fullScreen, children: const []); + + return ContainerView( + decorationVariant: decorationPriority.important, + builder: viewLayout, + showQuickActionBar: false, + ); + } +} From 33721b132506a2426308613e3c0359552343416e Mon Sep 17 00:00:00 2001 From: Amanda Southworth Date: Mon, 4 Dec 2023 20:25:11 -0800 Subject: [PATCH 2/2] Adding OnboardingSimpView and example app addition --- .DS_Store | Bin 14340 -> 14340 bytes .../Interactions/Actions/ActionsSubview.dart | 10 +- .../Interactions/InteractionsSubview.dart | 3 +- .../Sensations/SensationsSubview.dart | 11 +- .../GenerationLandingView.dart | 1 - .../Components/ComponentsSubView.dart | 3 +- .../UI Components/Elements/ElementsList.dart | 5 +- .../Elements/ElementsSubView.dart | 2 +- .../Core/UI Components/Views/ViewSubView.dart | 27 +-- .../Core/UI Components/Views/ViewsList.dart | 18 +- Example App/pubspec.lock | 154 +++++++++++++++++- Package/CHANGELOG.md | 5 + Package/analysis_options.yaml | 4 +- .../Cards/Complex/ComplexCardElement.dart | 1 + .../Detail/CategoryIconDetailCardElement.dart | 1 + .../Cards/Detail/DetailBadgeCardElement.dart | 1 + .../Elements/Cards/Grid/GridCardElement.dart | 2 + .../Onboarding/OnboardingInformationView.dart | 25 +-- .../Onboarding/OnboardingLandingView.dart | 85 ++++++---- .../Onboarding/OnboardingSimpShareView.dart | 32 +++- Package/pubspec.yaml | 2 +- .../data_consent_object_test.dart | 5 +- .../interactive_semantics_wrapper_test.dart | 8 +- .../universal_gesture_detector_test.dart | 8 +- .../aureus_widget_views_safety_plan_test.dart | 4 +- .../aureus_widget_views_supporting_test.dart | 4 +- 26 files changed, 324 insertions(+), 97 deletions(-) diff --git a/.DS_Store b/.DS_Store index ee4cc86c86f093864730a55375c6da5dc3db1823..aa044e6301a622d6d93620f55e37f64dbf5b9a52 100644 GIT binary patch delta 261 zcmZoEXepSmjjwA#Zlz4aQAY+2C;p}HHaAK*vu|eS(B|NPNlcs|B~XxI7@VA+TfhJW z3cdvlK(Wnr0u_ubTpGV1iPKC;+pXRILC2 delta 261 zcmZoEXepSmjqg|Q?fa8djyf`Mm_=W`u(?sfnSC=mhc*WXOk&~$DS?6v!{Frn+yVw5 zur~j|02JF?Cs4u2!m@;a(&k@+4_VogW~e@yq%!%TxB`MHGFe)JhneNlfz4VHzu4os zgC*^N2Cy*bF{CqOGL+=zySOCf { var actionsList = ContainerActionsList(); Widget returnCard(String title, VoidCallback action) { - return GestureDetector( + return StandardCardElement( + decorationVariant: decorationPriority.standard, + cardLabel: title, onTap: action, - child: StandardCardElement( - decorationVariant: decorationPriority.standard, - cardLabel: title, - ), ); } @@ -43,7 +41,7 @@ class _ActionsSubviewState extends State { ]; var viewBuilder = ContainerWrapperElement(children: [ - HeadingOneText("Actions", decorationPriority.standard), + HeadingOneText(data: "Actions", textColor: decorationPriority.standard), SizedBox(height: 10), DividerElement(), SizedBox(height: 10), diff --git a/Example App/lib/src/Core/Interactions/Interactions/InteractionsSubview.dart b/Example App/lib/src/Core/Interactions/Interactions/InteractionsSubview.dart index 58c65484..f737edbf 100644 --- a/Example App/lib/src/Core/Interactions/Interactions/InteractionsSubview.dart +++ b/Example App/lib/src/Core/Interactions/Interactions/InteractionsSubview.dart @@ -52,7 +52,8 @@ class _InteractionsSubviewState extends State { var viewBuilder = ContainerWrapperElement( children: [ - HeadingOneText("Interactions", decorationPriority.standard), + HeadingOneText( + data: "Interactions", textColor: decorationPriority.standard), SizedBox(height: 10), interactions.buttonBackingTest, ], diff --git a/Example App/lib/src/Core/Interactions/Sensations/SensationsSubview.dart b/Example App/lib/src/Core/Interactions/Sensations/SensationsSubview.dart index f29f81ec..d5d52b4b 100644 --- a/Example App/lib/src/Core/Interactions/Sensations/SensationsSubview.dart +++ b/Example App/lib/src/Core/Interactions/Sensations/SensationsSubview.dart @@ -11,12 +11,10 @@ class SensationsSubview extends StatefulWidget { class _SensationsSubviewState extends State { Widget returnCard(String title, VoidCallback action) { - return GestureDetector( + return StandardCardElement( + decorationVariant: decorationPriority.standard, + cardLabel: title, onTap: action, - child: StandardCardElement( - decorationVariant: decorationPriority.standard, - cardLabel: title, - ), ); } @@ -60,7 +58,8 @@ class _SensationsSubviewState extends State { var viewBuilder = ContainerWrapperElement( children: [ - HeadingOneText("Sensations", decorationPriority.standard), + HeadingOneText( + data: "Sensations", textColor: decorationPriority.standard), SizedBox(height: 10), DividerElement(), SizedBox(height: 10), diff --git a/Example App/lib/src/Core/Landing/Resource Generation/GenerationLandingView.dart b/Example App/lib/src/Core/Landing/Resource Generation/GenerationLandingView.dart index 21d09d4d..b29499cf 100644 --- a/Example App/lib/src/Core/Landing/Resource Generation/GenerationLandingView.dart +++ b/Example App/lib/src/Core/Landing/Resource Generation/GenerationLandingView.dart @@ -5,7 +5,6 @@ class GenerationLandingPage extends StatelessWidget { @override Widget build(BuildContext context) { - var screenSize = MediaQuery.of(context).size; var generationToolCarousel = ToolDetailView( parentTool: GenerationTool(), onUseTool: () { diff --git a/Example App/lib/src/Core/UI Components/Components/ComponentsSubView.dart b/Example App/lib/src/Core/UI Components/Components/ComponentsSubView.dart index 51eaaf46..c4615d17 100644 --- a/Example App/lib/src/Core/UI Components/Components/ComponentsSubView.dart +++ b/Example App/lib/src/Core/UI Components/Components/ComponentsSubView.dart @@ -39,7 +39,8 @@ class _ComponentsSubviewState extends State { }); var viewBuilder = ContainerWrapperElement(children: [ - HeadingOneText("Components", decorationPriority.standard), + HeadingOneText( + data: "Components", textColor: decorationPriority.standard), SizedBox(height: 10), componentList ], containerVariant: wrapperVariants.stackScroll); diff --git a/Example App/lib/src/Core/UI Components/Elements/ElementsList.dart b/Example App/lib/src/Core/UI Components/Elements/ElementsList.dart index fc934c75..5f9b2f04 100644 --- a/Example App/lib/src/Core/UI Components/Elements/ElementsList.dart +++ b/Example App/lib/src/Core/UI Components/Elements/ElementsList.dart @@ -96,7 +96,8 @@ Map aureusElements = { //where all text related items in aureus are initiated for testing -Text text1 = HeadingOneText('Heading One', decorationPriority.standard); +Widget text1 = + HeadingOneText(data: 'Heading One', textColor: decorationPriority.standard); Text text2 = HeadingTwoText('Heading Two', decorationPriority.standard); Text text3 = HeadingThreeText('Heading Three', decorationPriority.standard); Text text4 = HeadingFourText('Heading Four', decorationPriority.standard); @@ -108,7 +109,7 @@ Text text9 = ButtonTwoText('Button Two', decorationPriority.standard); Text text10 = TagOneText('Tag One', decorationPriority.standard); Text text11 = TagTwoText('Tag Two', decorationPriority.standard); -List textTesting = [ +List textTesting = [ text1, text2, text3, diff --git a/Example App/lib/src/Core/UI Components/Elements/ElementsSubView.dart b/Example App/lib/src/Core/UI Components/Elements/ElementsSubView.dart index 4c075c00..00e92746 100644 --- a/Example App/lib/src/Core/UI Components/Elements/ElementsSubView.dart +++ b/Example App/lib/src/Core/UI Components/Elements/ElementsSubView.dart @@ -39,7 +39,7 @@ class _ElementsSubviewState extends State { }); var viewBuilder = ContainerWrapperElement(children: [ - HeadingOneText("Elements", decorationPriority.standard), + HeadingOneText(data: "Elements", textColor: decorationPriority.standard), SizedBox(height: 10), elementsList ], containerVariant: wrapperVariants.stackScroll); diff --git a/Example App/lib/src/Core/UI Components/Views/ViewSubView.dart b/Example App/lib/src/Core/UI Components/Views/ViewSubView.dart index a7a6e073..1c9571a7 100644 --- a/Example App/lib/src/Core/UI Components/Views/ViewSubView.dart +++ b/Example App/lib/src/Core/UI Components/Views/ViewSubView.dart @@ -18,18 +18,19 @@ class _ViewsSubviewState extends State { // Iterating through the top level of categories to make a sub-carousel for (var viewData in viewRow.value) { - var cardElement = Focus( - child: GestureDetector( - onTap: () => { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => viewData.view, - )) - }, - child: StandardCardElement( - decorationVariant: decorationPriority.standard, - cardLabel: viewData.viewTitle))); + var cardElement = StandardCardElement( + decorationVariant: decorationPriority.standard, + cardLabel: viewData.viewTitle, + onTap: (() { + print('i am being tapped'); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => viewData.view, + ), + ); + }), + ); tempCards .add(Padding(padding: EdgeInsets.all(8.0), child: cardElement)); @@ -72,7 +73,7 @@ class _ViewsSubviewState extends State { @override Widget build(BuildContext context) { var viewBuilder = ContainerWrapperElement(children: [ - HeadingOneText("Views", decorationPriority.standard), + HeadingOneText(data: "Views", textColor: decorationPriority.standard), SizedBox(height: 10), viewList(), ], containerVariant: wrapperVariants.stackScroll); diff --git a/Example App/lib/src/Core/UI Components/Views/ViewsList.dart b/Example App/lib/src/Core/UI Components/Views/ViewsList.dart index f49a1c42..64f8e771 100644 --- a/Example App/lib/src/Core/UI Components/Views/ViewsList.dart +++ b/Example App/lib/src/Core/UI Components/Views/ViewsList.dart @@ -15,6 +15,10 @@ Map> aureusViewsCategory = { viewTitle: "Onboarding Demo", view: views.onboardingDemoView, ), + viewMetaData( + viewTitle: "Onboarding Simp Ask", + view: views.simpShareView, + ), ], "Landing": [ viewMetaData( @@ -27,7 +31,7 @@ Map> aureusViewsCategory = { ), viewMetaData( viewTitle: "Landing Page", - view: LandingPage(), + view: views.onboardingLandingView, ), ], "Safety Plan": [ @@ -254,6 +258,18 @@ class exampleAppViews { "", "", ]); + + var simpShareView = OnboardingSimpSharingView( + simpMessage: "Hi, will you simp for us by sharing this online?", + onSimpAgree: () => { + notificationMaster.sendAlertNotificationRequest( + 'Thank you for agreeing!', Assets.back), + }, + onSimpDeny: () => { + notificationMaster.sendAlertNotificationRequest( + 'Why didnt u agree :-(', Assets.back), + }, + ); } /* VIEWS */ diff --git a/Example App/pubspec.lock b/Example App/pubspec.lock index ca9d429b..d39abcbb 100644 --- a/Example App/pubspec.lock +++ b/Example App/pubspec.lock @@ -1,6 +1,30 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" + source: hosted + version: "61.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" + source: hosted + version: "5.13.0" + args: + dependency: transitive + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" async: dependency: transitive description: @@ -23,7 +47,7 @@ packages: path: "/Users/amandasouthworth/Desktop/astra/Aureus/Package" relative: false source: path - version: "0.0.21" + version: "0.0.22" boolean_selector: dependency: transitive description: @@ -32,6 +56,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e" + url: "https://pub.dev" + source: hosted + version: "8.7.0" camera: dependency: transitive description: @@ -88,6 +136,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" + url: "https://pub.dev" + source: hosted + version: "4.7.0" collection: dependency: transitive description: @@ -96,6 +152,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.17.2" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" cross_file: dependency: transitive description: @@ -128,6 +192,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + url: "https://pub.dev" + source: hosted + version: "2.3.2" fake_async: dependency: transitive description: @@ -152,11 +224,27 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.4" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_gradient_animation_text: + dependency: transitive + description: + name: flutter_gradient_animation_text + sha256: "0e144ecfae2c77da8444a56fcd17b2c6490e4b22a6fd32668fc581202ba02e91" + url: "https://pub.dev" + source: hosted + version: "1.0.2" flutter_map: dependency: transitive description: @@ -191,6 +279,14 @@ packages: description: flutter source: sdk version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" golden_toolkit: dependency: "direct main" description: @@ -295,6 +391,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" matcher: dependency: transitive description: @@ -327,6 +431,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + mockito: + dependency: transitive + description: + name: mockito + sha256: "7d5b53bcd556c1bc7ffbe4e4d5a19c3e112b7e925e9e172dd7c6ad0630812616" + url: "https://pub.dev" + source: hosted + version: "5.4.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" path: dependency: transitive description: @@ -471,6 +591,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" quiver: dependency: transitive description: @@ -596,6 +724,14 @@ packages: description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + url: "https://pub.dev" + source: hosted + version: "1.4.0" source_span: dependency: transitive description: @@ -804,6 +940,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.16" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" web: dependency: transitive description: @@ -836,6 +980,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" sdks: dart: ">=3.1.0-185.0.dev <4.0.0" flutter: ">=3.10.0" diff --git a/Package/CHANGELOG.md b/Package/CHANGELOG.md index d14b33f4..c5348fe1 100644 --- a/Package/CHANGELOG.md +++ b/Package/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.23 +- Adds OnboardingSimpView +- Fixing bug with OnboardingInformationView +- Fixing bug with OnboardingLandingView + ## 0.0.22 - Removed a duplicate items bug in SafetyPlanFunctionalityView - Added a small button to Checkbox Article View diff --git a/Package/analysis_options.yaml b/Package/analysis_options.yaml index 943e8933..c99e179d 100644 --- a/Package/analysis_options.yaml +++ b/Package/analysis_options.yaml @@ -18,13 +18,15 @@ linter: rules: # For production code. Never edit this. file_names: false + avoid_print: true # For debugging code. Comment these out when you're ready to # make a new PR or release a new version of Aureus. use_key_in_widget_constructors: false - avoid_print: false + overridden_fields: false + # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options diff --git a/Package/lib/src/Widgets/Elements/Cards/Complex/ComplexCardElement.dart b/Package/lib/src/Widgets/Elements/Cards/Complex/ComplexCardElement.dart index b7d8e573..6bad94a2 100644 --- a/Package/lib/src/Widgets/Elements/Cards/Complex/ComplexCardElement.dart +++ b/Package/lib/src/Widgets/Elements/Cards/Complex/ComplexCardElement.dart @@ -1,3 +1,4 @@ +// ignore_for_file: must_be_immutable import 'package:aureus/aureus.dart'; /// @nodoc diff --git a/Package/lib/src/Widgets/Elements/Cards/Detail/CategoryIconDetailCardElement.dart b/Package/lib/src/Widgets/Elements/Cards/Detail/CategoryIconDetailCardElement.dart index d5b879e4..c9132321 100644 --- a/Package/lib/src/Widgets/Elements/Cards/Detail/CategoryIconDetailCardElement.dart +++ b/Package/lib/src/Widgets/Elements/Cards/Detail/CategoryIconDetailCardElement.dart @@ -1,3 +1,4 @@ +// ignore_for_file: must_be_immutable import 'package:aureus/aureus.dart'; /// @nodoc diff --git a/Package/lib/src/Widgets/Elements/Cards/Detail/DetailBadgeCardElement.dart b/Package/lib/src/Widgets/Elements/Cards/Detail/DetailBadgeCardElement.dart index 7ea704ea..b1e52970 100644 --- a/Package/lib/src/Widgets/Elements/Cards/Detail/DetailBadgeCardElement.dart +++ b/Package/lib/src/Widgets/Elements/Cards/Detail/DetailBadgeCardElement.dart @@ -1,3 +1,4 @@ +// ignore_for_file: must_be_immutable import 'package:aureus/aureus.dart'; /// @nodoc diff --git a/Package/lib/src/Widgets/Elements/Cards/Grid/GridCardElement.dart b/Package/lib/src/Widgets/Elements/Cards/Grid/GridCardElement.dart index e137ceee..359c003b 100644 --- a/Package/lib/src/Widgets/Elements/Cards/Grid/GridCardElement.dart +++ b/Package/lib/src/Widgets/Elements/Cards/Grid/GridCardElement.dart @@ -1,3 +1,5 @@ +// ignore_for_file: must_be_immutable + import 'package:aureus/aureus.dart'; /// @nodoc diff --git a/Package/lib/src/Widgets/Views/Onboarding/OnboardingInformationView.dart b/Package/lib/src/Widgets/Views/Onboarding/OnboardingInformationView.dart index 3f893120..2ccfbc6b 100644 --- a/Package/lib/src/Widgets/Views/Onboarding/OnboardingInformationView.dart +++ b/Package/lib/src/Widgets/Views/Onboarding/OnboardingInformationView.dart @@ -160,8 +160,6 @@ class _OnboardingInformationViewState extends State { Widget informationCard = FloatingContainerElement( child: Container( - padding: EdgeInsets.all( - size.widthOf(weight: sizingWeight.w0, area: screenSize) / 2), decoration: CardBackingDecoration( decorationVariant: decorationPriority.inactive) .buildBacking(), @@ -171,20 +169,25 @@ class _OnboardingInformationViewState extends State { ); ContainerWrapperElement viewLayout = ContainerWrapperElement( - containerVariant: wrapperVariants.stackScroll, + containerVariant: wrapperVariants.fullScreen, children: [ - Align( - alignment: Alignment.topRight, - child: IconButtonElement( + Row( + children: [ + HeadingOneText( + data: "Meet ${resourceValues.name}.", + textColor: decorationPriority.standard), + const Spacer(), + IconButtonElement( decorationVariant: decorationPriority.standard, buttonIcon: Assets.no, buttonHint: 'Return to onboarding landing', - buttonAction: () => {Navigator.pop(context)}, + buttonAction: () => { + Navigator.pop(context), + }, buttonPriority: buttonSize.secondary, - )), - HeadingOneText( - data: "Meet ${resourceValues.name}.", - textColor: decorationPriority.standard), + ), + ], + ), informationCard, ], ); diff --git a/Package/lib/src/Widgets/Views/Onboarding/OnboardingLandingView.dart b/Package/lib/src/Widgets/Views/Onboarding/OnboardingLandingView.dart index f7c87cef..6efcafaf 100644 --- a/Package/lib/src/Widgets/Views/Onboarding/OnboardingLandingView.dart +++ b/Package/lib/src/Widgets/Views/Onboarding/OnboardingLandingView.dart @@ -26,44 +26,59 @@ class OnboardingLandingView extends StatefulWidget { } class _OnboardingLandingViewState extends State { + List buttons = []; + + @override + void initState() { + super.initState(); + + for (var element in widget.actionButtons) { + buttons.add(Padding( + padding: const EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0), + child: element, + )); + } + } + @override Widget build(BuildContext context) { ContainerWrapperElement viewLayout = ContainerWrapperElement( - containerVariant: wrapperVariants.fullScreen, - children: [ - const Spacer(), - Center( - child: SizedBox( - height: 65.0, - width: 65.0, - child: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: coloration.resourceLogo().image, - fit: BoxFit.contain, - )))), - ), - const Spacer(), - Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - HeadingThreeText( - "I'm ${resourceValues.name}", decorationPriority.standard), - HeadingOneText( - data: resourceValues.mission ?? "", - textColor: decorationPriority.standard) - ], - ), - const Spacer(), - Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - mainAxisSize: MainAxisSize.min, - children: widget.actionButtons, - ), - const Spacer(), - ]); + containerVariant: wrapperVariants.fullScreen, + children: [ + const Spacer(), + Center( + child: SizedBox( + height: 65.0, + width: 65.0, + child: Container( + decoration: BoxDecoration( + image: DecorationImage( + image: coloration.resourceLogo().image, + fit: BoxFit.contain, + )))), + ), + const Spacer(), + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + HeadingThreeText( + "I'm ${resourceValues.name}", decorationPriority.standard), + HeadingOneText( + data: resourceValues.mission ?? "", + textColor: decorationPriority.standard) + ], + ), + const Spacer(), + Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + mainAxisSize: MainAxisSize.min, + children: widget.actionButtons, + ), + const Spacer(), + ], + ); return ContainerView( decorationVariant: decorationPriority.important, diff --git a/Package/lib/src/Widgets/Views/Onboarding/OnboardingSimpShareView.dart b/Package/lib/src/Widgets/Views/Onboarding/OnboardingSimpShareView.dart index da117e73..e02babbf 100644 --- a/Package/lib/src/Widgets/Views/Onboarding/OnboardingSimpShareView.dart +++ b/Package/lib/src/Widgets/Views/Onboarding/OnboardingSimpShareView.dart @@ -34,8 +34,38 @@ class OnboardingSimpSharingView extends StatefulWidget { class _OnboardingSimpSharingViewState extends State { @override Widget build(BuildContext context) { + var header = HeadingOneText( + data: widget.simpMessage, textColor: decorationPriority.standard); + + var yesButton = StandardIconButtonElement( + decorationVariant: decorationPriority.important, + buttonTitle: "Yes, I will.", + buttonHint: "Agrees to the ask.", + buttonAction: widget.onSimpAgree, + buttonIcon: Assets.yes, + ); + + var noButton = StandardIconButtonElement( + decorationVariant: decorationPriority.standard, + buttonTitle: "No, I won't.", + buttonHint: "Disagrees to the ask.", + buttonAction: widget.onSimpDeny, + buttonIcon: Assets.no, + ); + ContainerWrapperElement viewLayout = ContainerWrapperElement( - containerVariant: wrapperVariants.fullScreen, children: const []); + containerVariant: wrapperVariants.fullScreen, + children: [ + const Spacer(), + header, + const Spacer(), + const SizedBox(height: 10), + yesButton, + const SizedBox(height: 10), + noButton, + const Spacer(), + ], + ); return ContainerView( decorationVariant: decorationPriority.important, diff --git a/Package/pubspec.yaml b/Package/pubspec.yaml index ff535594..15a1861c 100644 --- a/Package/pubspec.yaml +++ b/Package/pubspec.yaml @@ -1,6 +1,6 @@ name: aureus description: An open-source design system for non-profits to quickly develop user safety critical applications. -version: 0.0.22 +version: 0.0.23 homepage: https://withaureus.org/ documentation: https://github.com/Astra-Labs/Aureus/ diff --git a/Package/test/Object Tests/Functionality Obj Tests/data_consent_object_test.dart b/Package/test/Object Tests/Functionality Obj Tests/data_consent_object_test.dart index c290211a..a7134d34 100644 --- a/Package/test/Object Tests/Functionality Obj Tests/data_consent_object_test.dart +++ b/Package/test/Object Tests/Functionality Obj Tests/data_consent_object_test.dart @@ -1,4 +1,3 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:aureus/aureus.dart'; - +//import 'package:flutter_test/flutter_test.dart'; +//import 'package:aureus/aureus.dart'; void main() {} diff --git a/Package/test/Widget Tests/Element Widg Tests/Accessibility/interactive_semantics_wrapper_test.dart b/Package/test/Widget Tests/Element Widg Tests/Accessibility/interactive_semantics_wrapper_test.dart index 21d3de38..4af82191 100644 --- a/Package/test/Widget Tests/Element Widg Tests/Accessibility/interactive_semantics_wrapper_test.dart +++ b/Package/test/Widget Tests/Element Widg Tests/Accessibility/interactive_semantics_wrapper_test.dart @@ -1,8 +1,8 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; -import 'package:flutter_test/flutter_test.dart'; +//import 'package:flutter/material.dart'; +//import 'package:flutter/rendering.dart'; +//import 'package:flutter_test/flutter_test.dart'; -import 'package:aureus/aureus.dart'; // Import your library +//import 'package:aureus/aureus.dart'; // Import your library void main() { /* diff --git a/Package/test/Widget Tests/Element Widg Tests/Accessibility/universal_gesture_detector_test.dart b/Package/test/Widget Tests/Element Widg Tests/Accessibility/universal_gesture_detector_test.dart index 72cb65ab..48068d6a 100644 --- a/Package/test/Widget Tests/Element Widg Tests/Accessibility/universal_gesture_detector_test.dart +++ b/Package/test/Widget Tests/Element Widg Tests/Accessibility/universal_gesture_detector_test.dart @@ -1,7 +1,7 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:aureus/src/Widgets/Elements/Accessibility/UniversalGestureDetectorElement.dart'; // Import the file where UniversalGestureDetector is defined +//import 'package:flutter/material.dart'; +//import 'package:flutter/services.dart'; +//import 'package:flutter_test/flutter_test.dart'; +//import 'package:aureus/src/Widgets/Elements/Accessibility/UniversalGestureDetectorElement.dart'; // Import the file where UniversalGestureDetector is defined void main() { /* diff --git a/Package/test/Widget Tests/View Widg Tests/Safety Plan/aureus_widget_views_safety_plan_test.dart b/Package/test/Widget Tests/View Widg Tests/Safety Plan/aureus_widget_views_safety_plan_test.dart index c290211a..21b5dad1 100644 --- a/Package/test/Widget Tests/View Widg Tests/Safety Plan/aureus_widget_views_safety_plan_test.dart +++ b/Package/test/Widget Tests/View Widg Tests/Safety Plan/aureus_widget_views_safety_plan_test.dart @@ -1,4 +1,4 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:aureus/aureus.dart'; +//import 'package:flutter_test/flutter_test.dart'; +//import 'package:aureus/aureus.dart'; void main() {} diff --git a/Package/test/Widget Tests/View Widg Tests/Supporting/aureus_widget_views_supporting_test.dart b/Package/test/Widget Tests/View Widg Tests/Supporting/aureus_widget_views_supporting_test.dart index c290211a..21b5dad1 100644 --- a/Package/test/Widget Tests/View Widg Tests/Supporting/aureus_widget_views_supporting_test.dart +++ b/Package/test/Widget Tests/View Widg Tests/Supporting/aureus_widget_views_supporting_test.dart @@ -1,4 +1,4 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:aureus/aureus.dart'; +//import 'package:flutter_test/flutter_test.dart'; +//import 'package:aureus/aureus.dart'; void main() {}