From b851eb2e338e1cca99e2422b4a397e27445bd795 Mon Sep 17 00:00:00 2001 From: AnubhaSharma2709 Date: Wed, 24 May 2023 22:37:51 +0530 Subject: [PATCH 1/4] commit-1 --- lib/screens/main_app_widgets/fav_page.dart | 12 +- .../cards/All Cards/blog_card/card_1.dart | 2 +- .../cards/All Cards/blog_card/card_2.dart | 2 +- .../All Cards/blog_card_dark_mode/card_5.dart | 2 +- .../All Cards/blog_card_dark_mode/card_6.dart | 2 +- .../cards/All Cards/social_card/card_3.dart | 4 +- .../cards/All Cards/social_card/card_4.dart | 16 +-- .../social_card_dark_mode/card_7.dart | 4 +- .../social_card_dark_mode/card_8.dart | 16 +-- linux/flutter/generated_plugin_registrant.cc | 4 + linux/flutter/generated_plugins.cmake | 1 + macos/Flutter/GeneratedPluginRegistrant.swift | 2 + pubspec.lock | 111 ++++++++++++++---- .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 15 files changed, 131 insertions(+), 51 deletions(-) diff --git a/lib/screens/main_app_widgets/fav_page.dart b/lib/screens/main_app_widgets/fav_page.dart index df474f4..ff5f8f7 100644 --- a/lib/screens/main_app_widgets/fav_page.dart +++ b/lib/screens/main_app_widgets/fav_page.dart @@ -18,12 +18,12 @@ class FavPage extends StatelessWidget { builder: (context, favProviderModel, child) => AlertDialog( title: const Text('Remove'), content: const SingleChildScrollView( - child: ListBody( - children: [ - Text( - 'Do you want to remove this widget from the favorites list?'), - ], - ), + //child: ListBody( + // children: [ + //Text( + //'Do you want to remove this widget from the favorites list?'), + //], + // ), ), actions: [ TextButton( diff --git a/lib/ui_components/cards/All Cards/blog_card/card_1.dart b/lib/ui_components/cards/All Cards/blog_card/card_1.dart index 3d736d8..16c73df 100644 --- a/lib/ui_components/cards/All Cards/blog_card/card_1.dart +++ b/lib/ui_components/cards/All Cards/blog_card/card_1.dart @@ -14,7 +14,7 @@ class FirstCard extends StatelessWidget { ), Container( padding: const EdgeInsets.only(left: 10, right: 10, bottom: 20), - child: const Column( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( diff --git a/lib/ui_components/cards/All Cards/blog_card/card_2.dart b/lib/ui_components/cards/All Cards/blog_card/card_2.dart index 415b924..4045ff1 100644 --- a/lib/ui_components/cards/All Cards/blog_card/card_2.dart +++ b/lib/ui_components/cards/All Cards/blog_card/card_2.dart @@ -14,7 +14,7 @@ class SecondCard extends StatelessWidget { width: MediaQuery.of(context).size.width - MediaQuery.of(context).size.width / 2.4 - 8, - child: const Column( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/lib/ui_components/cards/All Cards/blog_card_dark_mode/card_5.dart b/lib/ui_components/cards/All Cards/blog_card_dark_mode/card_5.dart index 0130071..6de6d29 100644 --- a/lib/ui_components/cards/All Cards/blog_card_dark_mode/card_5.dart +++ b/lib/ui_components/cards/All Cards/blog_card_dark_mode/card_5.dart @@ -15,7 +15,7 @@ class FifthCard extends StatelessWidget { ), Container( padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10), - child: const Column( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( diff --git a/lib/ui_components/cards/All Cards/blog_card_dark_mode/card_6.dart b/lib/ui_components/cards/All Cards/blog_card_dark_mode/card_6.dart index 0bd9d26..e1decf9 100644 --- a/lib/ui_components/cards/All Cards/blog_card_dark_mode/card_6.dart +++ b/lib/ui_components/cards/All Cards/blog_card_dark_mode/card_6.dart @@ -15,7 +15,7 @@ class SixthCard extends StatelessWidget { width: MediaQuery.of(context).size.width - MediaQuery.of(context).size.width / 2.4 - 8, - child: const Column( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/lib/ui_components/cards/All Cards/social_card/card_3.dart b/lib/ui_components/cards/All Cards/social_card/card_3.dart index 12c6193..53d62a9 100644 --- a/lib/ui_components/cards/All Cards/social_card/card_3.dart +++ b/lib/ui_components/cards/All Cards/social_card/card_3.dart @@ -12,7 +12,7 @@ class ThirdCard extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Row( + Row( children: [ Icon( Icons.star_outline, @@ -62,7 +62,7 @@ class ThirdCard extends StatelessWidget { const SizedBox( height: 10, ), - const Row( + Row( children: [ CircleAvatar(), SizedBox( diff --git a/lib/ui_components/cards/All Cards/social_card/card_4.dart b/lib/ui_components/cards/All Cards/social_card/card_4.dart index 637f6e9..688efec 100644 --- a/lib/ui_components/cards/All Cards/social_card/card_4.dart +++ b/lib/ui_components/cards/All Cards/social_card/card_4.dart @@ -15,7 +15,7 @@ class FourthCard extends StatelessWidget { const EdgeInsets.only(left: 5, top: 10, bottom: 10, right: 5), child: Column( children: [ - const Row( + Row( children: [ CircleAvatar(), SizedBox( @@ -83,7 +83,7 @@ class FourthCard extends StatelessWidget { ], ), const SizedBox(height: 10), - const Row( + Row( children: [ Text( "Roshan Kumar", @@ -104,7 +104,7 @@ class FourthCard extends StatelessWidget { const SizedBox( height: 3, ), - const Row( + Row( children: [ Text( "@HSmith78", @@ -115,7 +115,7 @@ class FourthCard extends StatelessWidget { const SizedBox( height: 20, ), - const Row( + Row( children: [ Text( "Hey I'm Henry", @@ -134,7 +134,7 @@ class FourthCard extends StatelessWidget { ) ], ), - const Row( + Row( children: [ Icon( Icons.color_lens, @@ -151,7 +151,7 @@ class FourthCard extends StatelessWidget { ), ], ), - const Row( + Row( children: [ Icon( Icons.baby_changing_station, @@ -169,7 +169,7 @@ class FourthCard extends StatelessWidget { ), ], ), - const Row( + Row( children: [ Icon( Icons.circle, @@ -189,7 +189,7 @@ class FourthCard extends StatelessWidget { const SizedBox( height: 20, ), - const Row( + Row( children: [ SizedBox( // width: double.infinity, diff --git a/lib/ui_components/cards/All Cards/social_card_dark_mode/card_7.dart b/lib/ui_components/cards/All Cards/social_card_dark_mode/card_7.dart index 445cb88..d88f071 100644 --- a/lib/ui_components/cards/All Cards/social_card_dark_mode/card_7.dart +++ b/lib/ui_components/cards/All Cards/social_card_dark_mode/card_7.dart @@ -15,7 +15,7 @@ class SeventhCard extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Row( + Row( children: [ Icon( Icons.star, @@ -60,7 +60,7 @@ class SeventhCard extends StatelessWidget { const SizedBox( height: 10, ), - const Row( + Row( children: [ CircleAvatar(), SizedBox( diff --git a/lib/ui_components/cards/All Cards/social_card_dark_mode/card_8.dart b/lib/ui_components/cards/All Cards/social_card_dark_mode/card_8.dart index 2c06994..ca21746 100644 --- a/lib/ui_components/cards/All Cards/social_card_dark_mode/card_8.dart +++ b/lib/ui_components/cards/All Cards/social_card_dark_mode/card_8.dart @@ -17,7 +17,7 @@ class EightCard extends StatelessWidget { padding: const EdgeInsets.only(left: 10, top: 10, bottom: 10), child: Column( children: [ - const Row( + Row( children: [ CircleAvatar(), SizedBox( @@ -85,7 +85,7 @@ class EightCard extends StatelessWidget { ], ), const SizedBox(height: 10), - const Row( + Row( children: [ Text( "Roshan Kumar", @@ -104,7 +104,7 @@ class EightCard extends StatelessWidget { const SizedBox( height: 3, ), - const Row( + Row( children: [ Text( "@HSmith78", @@ -115,7 +115,7 @@ class EightCard extends StatelessWidget { const SizedBox( height: 20, ), - const Row( + Row( children: [ Text( "Hey I'm Henry", @@ -134,7 +134,7 @@ class EightCard extends StatelessWidget { ) ], ), - const Row( + Row( children: [ Icon( Icons.color_lens, @@ -149,7 +149,7 @@ class EightCard extends StatelessWidget { ), ], ), - const Row( + Row( children: [ Icon( Icons.baby_changing_station, @@ -167,7 +167,7 @@ class EightCard extends StatelessWidget { ), ], ), - const Row( + Row( children: [ Icon( Icons.circle, @@ -185,7 +185,7 @@ class EightCard extends StatelessWidget { const SizedBox( height: 10, ), - const Row( + Row( children: [ SizedBox( // width: double.infinity, diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e71a16d..f6f23bf 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,10 @@ #include "generated_plugin_registrant.h" +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 2e1de87..f16b4c3 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + url_launcher_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index e777c67..a1cdfd0 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,7 +6,9 @@ import FlutterMacOS import Foundation import path_provider_foundation +import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 9b01b8d..5904211 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.10.0" boolean_selector: dependency: transitive description: @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.2.1" clipboard: dependency: "direct main" description: @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.0" crypto: dependency: transitive description: @@ -131,6 +131,11 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" google_fonts: dependency: "direct main" description: @@ -140,13 +145,13 @@ packages: source: hosted version: "4.0.3" http: - dependency: transitive + dependency: "direct main" description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "0.13.6" http_parser: dependency: transitive description: @@ -167,10 +172,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.6.5" lints: dependency: transitive description: @@ -183,10 +188,10 @@ packages: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.13" material_color_utilities: dependency: transitive description: @@ -199,10 +204,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.8.0" nested: dependency: transitive description: @@ -223,10 +228,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.8.2" path_provider: dependency: transitive description: @@ -372,10 +377,10 @@ packages: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.4.16" typed_data: dependency: transitive description: @@ -384,6 +389,70 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + url: "https://pub.dev" + source: hosted + version: "6.1.11" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "1a5848f598acc5b7d8f7c18b8cb834ab667e59a13edc3c93e9d09cf38cc6bc87" + url: "https://pub.dev" + source: hosted + version: "6.0.34" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + url: "https://pub.dev" + source: hosted + version: "6.1.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "6bb1e5d7fe53daf02a8fee85352432a40b1f868a81880e99ec7440113d5cfcab" + url: "https://pub.dev" + source: hosted + version: "2.0.17" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" + url: "https://pub.dev" + source: hosted + version: "3.0.6" vector_math: dependency: transitive description: @@ -409,5 +478,5 @@ packages: source: hosted version: "1.0.0" sdks: - dart: ">=3.0.0-0 <4.0.0" - flutter: ">=3.0.0" + dart: ">=2.19.0 <3.0.0" + flutter: ">=3.3.0" diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 8b6d468..4f78848 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..88b22e5 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + url_launcher_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST From a4814f13c0bd949c5ac15251aaf58739a67cf5d8 Mon Sep 17 00:00:00 2001 From: AnubhaSharma2709 Date: Thu, 25 May 2023 01:15:57 +0530 Subject: [PATCH 2/4] commit-2 --- .../pricing_card/pricing_cards2.dart | 234 ++++++++++++++++++ .../pricing_card/pricing_cards3.dart | 179 ++++++++++++++ .../pricing_cards/pricing_cards.dart | 19 +- 3 files changed, 431 insertions(+), 1 deletion(-) create mode 100644 lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards2.dart create mode 100644 lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart diff --git a/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards2.dart b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards2.dart new file mode 100644 index 0000000..4c8f308 --- /dev/null +++ b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards2.dart @@ -0,0 +1,234 @@ +import 'package:flutter/material.dart'; + +class PricingCard2 extends StatefulWidget { + const PricingCard2( + {super.key, + required this.tier, + required this.supportingText, + required this.price, + required this.period, + required this.details, + required this.cardColor, + required this.textColor, + required this.buttonColor, + required this.buttonTextColor}); + final Color cardColor; + final Color textColor; + final Color buttonTextColor; + final Color buttonColor; + final String tier; + final String supportingText; + final String price; + final String period; + final List details; + + @override + State createState() => _PricingCard2State(); +} +class _PricingCard2State extends State { + bool detailsTapped = false; + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: widget.cardColor.withOpacity(0.85), + border: Border.all( + color: widget.textColor, + width: 6.0, + style: BorderStyle.solid), + borderRadius: const BorderRadius.all( + Radius.circular(8), + ), + boxShadow: [ + BoxShadow( + color: widget.cardColor, + offset: const Offset( + 0.5, + 0.5, + ), + blurRadius: 1.0, + spreadRadius: 1.0, + ), //BoxShadow + ], + ), + + + padding: const EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.tier, + style: TextStyle( + color: widget.textColor, + fontSize: 20, + fontWeight: FontWeight.w700, + ), + ), + const SizedBox( + height: 20, + ), + Text( + widget.supportingText, + style: TextStyle( + color: widget.textColor, + fontSize: 16, + fontWeight: FontWeight.w400, + ), + ), + const SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Padding( + padding: const EdgeInsets.only(right: 8), + child: Text( + widget.price, + style: TextStyle( + color: widget.textColor, + fontSize: 36, + fontWeight: FontWeight.w700, + ), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 4), + child: Text( + '/${widget.period}', + style: TextStyle( + color: widget.textColor, + fontSize: 16, + fontWeight: FontWeight.w400, + ), + ), + ), + ], + ), + GestureDetector( + onTap: () { + setState(() { + detailsTapped = !detailsTapped; + }); + }, + child: Padding( + padding: const EdgeInsets.only(top: 4), + child: Container( + decoration: BoxDecoration( + border: Border.all( + color: widget.textColor, + width: 1, + ), + borderRadius: BorderRadius.circular(8), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 6, horizontal: 10), + child: Row( + children: [ + Text( + 'Details', + style: TextStyle( + color: widget.textColor, + fontSize: 16, + fontWeight: FontWeight.w400, + ), + ), + Icon( + detailsTapped == false + ? Icons.keyboard_arrow_down_outlined + : Icons.keyboard_arrow_up_outlined, + color: widget.textColor, + ), + ], + ), + ), + ), + ), + ), + ], + ), + const SizedBox( + height: 20, + ), + Visibility( + visible: detailsTapped, + child: Column( + children: [ + ListView.builder( + shrinkWrap: true, + itemCount: widget.details.length, + itemBuilder: (context, index) { + return DetailsTile( + detailsTileContent: widget.details[index]); + }, + ), + const SizedBox( + height: 50, + ), + ], + ), + ), + ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: widget.buttonColor, + minimumSize: const Size.fromHeight(50), + ), + child: Center( + child: Text( + 'Get started', + style: TextStyle( + color: widget.buttonTextColor, + fontSize: 16, + fontWeight: FontWeight.w500, + ), + ), + ), + ), + ], + ), + ); + } +} + +class DetailsTile extends StatelessWidget { + const DetailsTile({ + super.key, + required this.detailsTileContent, + }); + + final String detailsTileContent; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.only(bottom: 15), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Padding( + padding: EdgeInsets.only(right: 10), + child: Icon( + Icons.check_circle_outline, + color: Color(0xff63d892), + ), + ), + Expanded( + child: Text( + detailsTileContent, + style: const TextStyle( + color: Color(0xff0f172a), + fontSize: 16, + fontWeight: FontWeight.w400, + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart new file mode 100644 index 0000000..7125123 --- /dev/null +++ b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart @@ -0,0 +1,179 @@ +import 'package:flutter/material.dart'; + +class PricingCard3 extends StatefulWidget { + const PricingCard3( + {super.key, + required this.tier, + required this.supportingText, + required this.price, + required this.period, + required this.details, + required this.cardColor, + required this.textColor, + required this.buttonColor, + required this.buttonTextColor}); + final Color cardColor; + final Color textColor; + final Color buttonTextColor; + final Color buttonColor; + final String tier; + final String supportingText; + final String price; + final String period; + final List details; + + @override + State createState() => _PricingCard3State(); +} +class _PricingCard3State extends State { + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: widget.cardColor.withOpacity(0.85), + border: Border.all( + color: widget.textColor, + width: 6.0, + style: BorderStyle.solid), + borderRadius: const BorderRadius.all( + Radius.circular(8), + ), + ), + padding: const EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Icon( + Icons.verified_rounded + ), + Text( + widget.tier, + style: TextStyle( + color: widget.textColor, + fontSize: 20, + fontWeight: FontWeight.w700, + ), + ), + const SizedBox( + height: 20, + ), + Text( + widget.supportingText, + style: TextStyle( + color: widget.textColor, + fontSize: 16, + fontWeight: FontWeight.w400, + ), + ), + const SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Padding( + padding: const EdgeInsets.only(right: 8), + child: Text( + widget.price, + style: TextStyle( + color: widget.textColor, + fontSize: 36, + fontWeight: FontWeight.w700, + ), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 4), + child: Text( + '/${widget.period}', + style: TextStyle( + color: widget.textColor, + fontSize: 16, + fontWeight: FontWeight.w400, + ), + ), + ), + ], + ), + const SizedBox( + height: 20, + ), + Column( + children: [ + ListView.builder( + shrinkWrap: true, + itemCount: widget.details.length, + itemBuilder: (context, index) { + return DetailsTile( + detailsTileContent: widget.details[index]); + }, + ), + const SizedBox( + height: 50, + ), + ], + ), + ], + ), + ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: widget.buttonColor, + minimumSize: const Size.fromHeight(50), + ), + child: Center( + child: Text( + 'Get started', + style: TextStyle( + color: widget.buttonTextColor, + fontSize: 16, + fontWeight: FontWeight.w500, + ), + ), + ), + ), + ], + ), + ); + } +} + +class DetailsTile extends StatelessWidget { + const DetailsTile({ + super.key, + required this.detailsTileContent, + }); + + final String detailsTileContent; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.only(bottom: 15), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Padding( + padding: EdgeInsets.only(right: 10), + child: Icon( + Icons.check_circle_outline, + color: Color(0xff63d892), + ), + ), + Expanded( + child: Text( + detailsTileContent, + style: const TextStyle( + color: Color(0xff0f172a), + fontSize: 16, + fontWeight: FontWeight.w400, + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/ui_components/pricing_cards/pricing_cards.dart b/lib/ui_components/pricing_cards/pricing_cards.dart index 1ee7445..903adb3 100644 --- a/lib/ui_components/pricing_cards/pricing_cards.dart +++ b/lib/ui_components/pricing_cards/pricing_cards.dart @@ -4,6 +4,8 @@ import 'package:provider/provider.dart'; import '../../provider/favorite_provider.dart'; import '../../theme/theme.dart'; import 'All Pricing Cards/pricing_card/pricing_cards1.dart'; +import 'All Pricing Cards/pricing_card/pricing_cards3.dart'; +import 'All Pricing Cards/pricing_card/pricing_cards2.dart'; class PricingCardScreen extends StatefulWidget { const PricingCardScreen({super.key}); @@ -29,8 +31,23 @@ class _PricingCardScreenState extends State { buttonColor: Color(0xff00c2cb), buttonTextColor: Color(0xff0f172a), ), + const PricingCard2( + tier: 'FREE', + supportingText: + 'For those who want to try our services with no commitment', + price: '\$0', + period: 'month', + details: [ + 'Easily receive new glasses on a regular basis', + 'More cost-effective than buying glasses individually', + ], + textColor: Color(0xff0f172a), + cardColor: Colors.white, + buttonColor: Color(0xff0f172a), + buttonTextColor: Colors.white, + ), ]; - List pricingCardsColor = [null]; + List pricingCardsColor = [null, null, null]; @override Widget build(BuildContext context) { From 16ebad2c02cd61e3cce97ae25f02743ad7a61b05 Mon Sep 17 00:00:00 2001 From: AnubhaSharma2709 Date: Thu, 25 May 2023 22:07:34 +0530 Subject: [PATCH 3/4] commit-3 --- .../pricing_card/pricing_cards3.dart | 252 +++++++++--------- .../pricing_cards/pricing_cards.dart | 61 +++++ 2 files changed, 184 insertions(+), 129 deletions(-) diff --git a/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart index 7125123..19ea4ee 100644 --- a/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart +++ b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart @@ -1,179 +1,173 @@ +import 'dart:ui'; + import 'package:flutter/material.dart'; class PricingCard3 extends StatefulWidget { const PricingCard3( {super.key, - required this.tier, - required this.supportingText, - required this.price, - required this.period, - required this.details, - required this.cardColor, - required this.textColor, - required this.buttonColor, - required this.buttonTextColor}); + required this.tier, + required this.supportingText, + required this.price, + required this.period, + required this.cardColor, + required this.textColor, + required this.buttonColor, + required this.buttonTextColor}); final Color cardColor; final Color textColor; final Color buttonTextColor; final Color buttonColor; - final String tier; final String supportingText; final String price; final String period; - final List details; + final String tier; @override State createState() => _PricingCard3State(); } + class _PricingCard3State extends State { @override + Size getscreenSize() { + return MediaQueryData.fromWindow(WidgetsBinding.instance.window).size; + } + Widget build(BuildContext context) { return Container( + width: MediaQuery.of(context).size.width* 0.85, decoration: BoxDecoration( - color: widget.cardColor.withOpacity(0.85), + color: widget.cardColor.withOpacity(0.95), border: Border.all( - color: widget.textColor, - width: 6.0, - style: BorderStyle.solid), + color: widget.cardColor,style: BorderStyle.solid), borderRadius: const BorderRadius.all( - Radius.circular(8), + Radius.circular(3), ), ), - padding: const EdgeInsets.all(12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Icon( - Icons.verified_rounded - ), - Text( - widget.tier, - style: TextStyle( - color: widget.textColor, - fontSize: 20, - fontWeight: FontWeight.w700, - ), - ), - const SizedBox( - height: 20, - ), - Text( - widget.supportingText, - style: TextStyle( - color: widget.textColor, - fontSize: 16, - fontWeight: FontWeight.w400, - ), + padding: const EdgeInsets.all(2), + child: Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(5),), + gradient: LinearGradient( + begin: Alignment.center, + end: Alignment.bottomCenter, + colors: [Colors.white54, Colors.white10]), ), - const SizedBox( - height: 20, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, children: [ + Icon( + Icons.verified_rounded, + size: 75, + color: widget.textColor, + ), + Text( + widget.tier, + style: TextStyle( + color: widget.textColor, + fontSize: 24, + fontWeight: FontWeight.w700, + ), + ), Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Row( + children: [ + Padding( + padding: const EdgeInsets.only(right: 8), + child: Text( + widget.price, + style: TextStyle( + color: widget.textColor, + fontSize: 32, + fontWeight: FontWeight.w700, + ), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 4), + child: Text( + '/${widget.period}', + style: TextStyle( + color: widget.textColor, + fontSize: 16, + fontWeight: FontWeight.w400, + ), + ), + ), + ], + ), + ]), + const SizedBox( + height: 20, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.center, children: [ Padding( - padding: const EdgeInsets.only(right: 8), - child: Text( - widget.price, + padding: const EdgeInsets.all(5.0), + child: Row( + children:[ + Icon( + Icons.circle_outlined, + color: widget.textColor, + ), + Text( + "Easily receive new glasses on a regular basis", + textAlign: TextAlign.center, style: TextStyle( color: widget.textColor, - fontSize: 36, - fontWeight: FontWeight.w700, + fontSize: 14, + fontWeight: FontWeight.w100, ), ), + ] ), ), Padding( - padding: const EdgeInsets.only(top: 4), + padding: const EdgeInsets.all(5.0), child: Text( - '/${widget.period}', + 'More cost-effective than buying glasses individually', + textAlign: TextAlign.center, style: TextStyle( color: widget.textColor, - fontSize: 16, - fontWeight: FontWeight.w400, + fontSize: 14, + fontWeight: FontWeight.w100, ), ), ), + const SizedBox( + height: 30, + ), ], ), - const SizedBox( - height: 20, - ), - Column( - children: [ - ListView.builder( - shrinkWrap: true, - itemCount: widget.details.length, - itemBuilder: (context, index) { - return DetailsTile( - detailsTileContent: widget.details[index]); - }, - ), - const SizedBox( - height: 50, - ), - ], - ), - ], - ), - ElevatedButton( - onPressed: () {}, - style: ElevatedButton.styleFrom( - backgroundColor: widget.buttonColor, - minimumSize: const Size.fromHeight(50), - ), - child: Center( - child: Text( - 'Get started', - style: TextStyle( - color: widget.buttonTextColor, - fontSize: 16, - fontWeight: FontWeight.w500, + Padding( + padding: const EdgeInsets.all(12.0), + child: ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: widget.buttonColor, + minimumSize: const Size.fromHeight(50), + ), + child: Center( + child: Text( + 'Get started', + style: TextStyle( + color: widget.buttonTextColor, + fontSize: 16, + fontWeight: FontWeight.w500, + ), + ), + ), ), ), - ), - ), - ], - ), - ); - } -} - -class DetailsTile extends StatelessWidget { - const DetailsTile({ - super.key, - required this.detailsTileContent, - }); - - final String detailsTileContent; - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.only(bottom: 15), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Padding( - padding: EdgeInsets.only(right: 10), - child: Icon( - Icons.check_circle_outline, - color: Color(0xff63d892), - ), - ), - Expanded( - child: Text( - detailsTileContent, - style: const TextStyle( - color: Color(0xff0f172a), - fontSize: 16, - fontWeight: FontWeight.w400, + const SizedBox( + height: 10, ), - ), + ], ), - ], - ), - ); + ), + ); } } diff --git a/lib/ui_components/pricing_cards/pricing_cards.dart b/lib/ui_components/pricing_cards/pricing_cards.dart index 903adb3..86c43d6 100644 --- a/lib/ui_components/pricing_cards/pricing_cards.dart +++ b/lib/ui_components/pricing_cards/pricing_cards.dart @@ -49,6 +49,21 @@ class _PricingCardScreenState extends State { ]; List pricingCardsColor = [null, null, null]; + final List priceCards = [ + PricingCard3( + tier: 'FREE', + supportingText: + 'For those who want to try our services with no commitment', + price: '\$0', + period: 'month', + cardColor: Colors.blueAccent.shade100, + textColor: Color(0xff0f172a), + buttonTextColor: Colors.white, + buttonColor: Color(0xff0f172a), + ), + ]; + List pricingCardColor = [null]; + @override Widget build(BuildContext context) { return Scaffold( @@ -114,6 +129,52 @@ class _PricingCardScreenState extends State { ), ), ), + Wrap( + direction: Axis.horizontal, + children: List.generate( + priceCards.length, + (index) => Consumer( + builder: (context, favProviderModel, child) => Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: priceCards[index], + ), + Padding( + padding: const EdgeInsets.fromLTRB(0, 3, 20, 3), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Add to favorite'), + const SizedBox( + width: 5, + ), + GestureDetector( + onTap: () { + favProviderModel.add( + Padding( + padding: const EdgeInsets.all(8.0), + child: priceCards[index], + ), + ); + setState(() { + pricingCardColor[index] = Colors.amber; + }); + }, + child: Icon( + Icons.star_border_outlined, + color: pricingCardColor[index], + ), + ), + ], + ), + ), + ], + ), + ), + ), + ), ]), ), ), From 8267bba0a05f36bcc11a38b380067d3821cf6d96 Mon Sep 17 00:00:00 2001 From: AnubhaSharma2709 Date: Fri, 26 May 2023 00:28:47 +0530 Subject: [PATCH 4/4] commit-4 --- .../pricing_card/pricing_cards3.dart | 223 +++++++++--------- .../pricing_card/pricing_cards4.dart | 208 ++++++++++++++++ .../pricing_cards/pricing_cards.dart | 68 +++++- 3 files changed, 390 insertions(+), 109 deletions(-) create mode 100644 lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards4.dart diff --git a/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart index 19ea4ee..313a3c3 100644 --- a/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart +++ b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards3.dart @@ -6,7 +6,6 @@ class PricingCard3 extends StatefulWidget { const PricingCard3( {super.key, required this.tier, - required this.supportingText, required this.price, required this.period, required this.cardColor, @@ -17,7 +16,6 @@ class PricingCard3 extends StatefulWidget { final Color textColor; final Color buttonTextColor; final Color buttonColor; - final String supportingText; final String price; final String period; final String tier; @@ -43,7 +41,7 @@ class _PricingCard3State extends State { Radius.circular(3), ), ), - padding: const EdgeInsets.all(2), + padding: const EdgeInsets.all(4), child: Container( decoration: const BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(5),), @@ -52,122 +50,133 @@ class _PricingCard3State extends State { end: Alignment.bottomCenter, colors: [Colors.white54, Colors.white10]), ), - - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Icon( - Icons.verified_rounded, - size: 75, - color: widget.textColor, - ), - Text( - widget.tier, - style: TextStyle( + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Icon( + Icons.verified_rounded, + size: 75, color: widget.textColor, - fontSize: 24, - fontWeight: FontWeight.w700, ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Row( - children: [ - Padding( - padding: const EdgeInsets.only(right: 8), - child: Text( - widget.price, - style: TextStyle( - color: widget.textColor, - fontSize: 32, - fontWeight: FontWeight.w700, + Text( + widget.tier, + style: TextStyle( + color: widget.textColor, + fontSize: 32, + fontWeight: FontWeight.w700, + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Row( + children: [ + Padding( + padding: const EdgeInsets.only(right: 8), + child: Text( + widget.price, + style: TextStyle( + color: widget.textColor, + fontSize: 36, + fontWeight: FontWeight.w700, + ), ), ), - ), - Padding( - padding: const EdgeInsets.only(top: 4), - child: Text( - '/${widget.period}', - style: TextStyle( - color: widget.textColor, - fontSize: 16, - fontWeight: FontWeight.w400, + Padding( + padding: const EdgeInsets.only(top: 4), + child: Text( + '/${widget.period}', + style: TextStyle( + color: widget.textColor, + fontSize: 18, + fontWeight: FontWeight.w400, + ), ), ), - ), - ], - ), - ]), - const SizedBox( - height: 20, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.all(5.0), - child: Row( - children:[ - Icon( - Icons.circle_outlined, - color: widget.textColor, - ), - Text( - "Easily receive new glasses on a regular basis", - textAlign: TextAlign.center, - style: TextStyle( - color: widget.textColor, - fontSize: 14, - fontWeight: FontWeight.w100, - ), - ), - ] ), - ), - Padding( - padding: const EdgeInsets.all(5.0), - child: Text( - 'More cost-effective than buying glasses individually', - textAlign: TextAlign.center, - style: TextStyle( - color: widget.textColor, - fontSize: 14, - fontWeight: FontWeight.w100, + ], ), + ]), + const SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.all(4.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Row( + children:[ + Padding( + padding: const EdgeInsets.only(bottom: 15), + child: Icon( + Icons.circle, + size: 12, + color: widget.textColor, + ), + ), + Expanded( + child: Text( + "Easily receive new glasses on a regular basis", + textAlign: TextAlign.center, + style: TextStyle( + color: widget.textColor, + fontSize: 14, + fontWeight: FontWeight.w100, + ), + ), + ), + ]), + Row( + children:[ + Padding( + padding: const EdgeInsets.only(bottom: 15), + child: Icon( + Icons.circle, + size: 12, + color: widget.textColor, + ), + ), + Expanded( + child: Text( + "Easily receive new glasses on a regular basis", + textAlign: TextAlign.center, + style: TextStyle( + color: widget.textColor, + fontSize: 14, + fontWeight: FontWeight.w100, + ), + ), + ), + ]), + ]), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: widget.buttonColor, + minimumSize: const Size.fromHeight(50), + ), - ), - const SizedBox( - height: 30, - ), - ], - ), - Padding( - padding: const EdgeInsets.all(12.0), - child: ElevatedButton( - onPressed: () {}, - style: ElevatedButton.styleFrom( - backgroundColor: widget.buttonColor, - minimumSize: const Size.fromHeight(50), - ), - child: Center( - child: Text( - 'Get started', - style: TextStyle( - color: widget.buttonTextColor, - fontSize: 16, - fontWeight: FontWeight.w500, + child: Center( + child: Text( + 'Get started', + style: TextStyle( + color: widget.buttonTextColor, + fontSize: 16, + fontWeight: FontWeight.w500, + ), ), ), ), ), - ), - const SizedBox( - height: 10, - ), - ], + ]), ), - ), - ); + ), + ); } } diff --git a/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards4.dart b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards4.dart new file mode 100644 index 0000000..5da8f64 --- /dev/null +++ b/lib/ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards4.dart @@ -0,0 +1,208 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; + +class PricingCard4 extends StatefulWidget { + const PricingCard4( + {super.key, + required this.supportingText, + required this.price, + required this.price1, + required this.price2, + required this.period, + required this.period1, + required this.period2, + required this.cardColor, + required this.textColor, + required this.buttonColor, + required this.buttonTextColor}); + final Color cardColor; + final Color textColor; + final Color buttonTextColor; + final Color buttonColor; + final String supportingText; + final String price; + final String price1; + final String price2; + final String period; + final String period1; + final String period2; + + @override + State createState() => _PricingCard4State(); +} + +class _PricingCard4State extends State { + @override + Size getscreenSize() { + return MediaQueryData.fromWindow(WidgetsBinding.instance.window).size; + } + + Widget build(BuildContext context) { + return Container( + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + color: widget.cardColor.withOpacity(0.95), + border: Border.all(color: widget.cardColor, style: BorderStyle.solid), + borderRadius: const BorderRadius.all( + Radius.circular(3), + ), + ), + padding: const EdgeInsets.all(8.0), + child: Padding( + padding: const EdgeInsets.all(5.0), + child: Column( + children: [ + Text('Choose your Plan', + style: TextStyle( + color: widget.textColor, + fontSize: 24, + fontWeight: FontWeight.w900, + ),), + SizedBox( + height: MediaQuery.of(context).size.height * 0.02, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.all(3.0), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.25, + height: MediaQuery.of(context).size.height * 0.1, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + side: BorderSide(width: 1.0, color: Colors.white60), + ), + onPressed: null, + child: Column( + children: [ + Text( + widget.price, + style: TextStyle( + color: widget.textColor, + fontSize: 26, + fontWeight: FontWeight.w700, + ), + ), + Text( + widget.period, + style: TextStyle( + color: widget.textColor, + fontSize: 12, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.all(3.0), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.25, + height: MediaQuery.of(context).size.height * 0.1, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + side: BorderSide(width: 1.0, color: Colors.white60), + ), + onPressed: null, + child: Column( + children: [ + Text( + widget.price1, + style: TextStyle( + color: widget.textColor, + fontSize: 26, + fontWeight: FontWeight.w700, + ), + ), + Text( + widget.period1, + style: TextStyle( + color: widget.textColor, + fontSize: 12, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.all(3.0), + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.25, + height: MediaQuery.of(context).size.height * 0.1, + child: OutlinedButton( + style: OutlinedButton.styleFrom( + side: BorderSide(width: 1.0, color: Colors.white60), + ), + onPressed: null, + child: Column( + children: [ + Text( + widget.price2, + style: TextStyle( + color: widget.textColor, + fontSize: 26, + fontWeight: FontWeight.w700, + ), + ), + Text( + widget.period2, + style: TextStyle( + color: widget.textColor, + fontSize: 12, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ], + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.02, + ), + ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: widget.buttonColor, + minimumSize: const Size.fromHeight(40), + ), + child: Center( + child: Text( + 'Proceed to Payment', + style: TextStyle( + color: widget.buttonTextColor, + fontSize: 16, + fontWeight: FontWeight.w500, + ), + ), + ), + ), + + Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + widget.supportingText, + textAlign: TextAlign.center, + style: TextStyle( + color: widget.textColor, + fontSize: 12, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ]), + ) + ); + } +} diff --git a/lib/ui_components/pricing_cards/pricing_cards.dart b/lib/ui_components/pricing_cards/pricing_cards.dart index 86c43d6..bf9c5ac 100644 --- a/lib/ui_components/pricing_cards/pricing_cards.dart +++ b/lib/ui_components/pricing_cards/pricing_cards.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter_component_ui/ui_components/pricing_cards/All%20Pricing%20Cards/pricing_card/pricing_cards4.dart'; import 'package:provider/provider.dart'; import '../../provider/favorite_provider.dart'; @@ -52,8 +53,6 @@ class _PricingCardScreenState extends State { final List priceCards = [ PricingCard3( tier: 'FREE', - supportingText: - 'For those who want to try our services with no commitment', price: '\$0', period: 'month', cardColor: Colors.blueAccent.shade100, @@ -64,6 +63,25 @@ class _PricingCardScreenState extends State { ]; List pricingCardColor = [null]; + final List choosePlans = [ + PricingCard4( + supportingText: + 'Plans for everyone and for every time period', + price: '\$12', + period: '12 month', + price1: '\$0', + period1: '1 month', + price2: '\$6', + period2: '6 month', + cardColor: Color(0xff0f172a), + textColor: Colors.white, + buttonTextColor: Color(0xff0f172a), + buttonColor: Colors.greenAccent.shade200, + ), + ]; + List choosePlansColor = [null]; + + @override Widget build(BuildContext context) { return Scaffold( @@ -175,6 +193,52 @@ class _PricingCardScreenState extends State { ), ), ), + Wrap( + direction: Axis.horizontal, + children: List.generate( + choosePlans.length, + (index) => Consumer( + builder: (context, favProviderModel, child) => Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: choosePlans[index], + ), + Padding( + padding: const EdgeInsets.fromLTRB(0, 3, 20, 3), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Add to favorite'), + const SizedBox( + width: 5, + ), + GestureDetector( + onTap: () { + favProviderModel.add( + Padding( + padding: const EdgeInsets.all(8.0), + child: choosePlans[index], + ), + ); + setState(() { + choosePlansColor[index] = Colors.amber; + }); + }, + child: Icon( + Icons.star_border_outlined, + color: choosePlansColor[index], + ), + ), + ], + ), + ), + ], + ), + ), + ), + ), ]), ), ),