From 447aed3471f7650981763ab29604745d3fed20ce Mon Sep 17 00:00:00 2001 From: AhsanRns Date: Fri, 10 May 2024 10:18:51 +0500 Subject: [PATCH] feat: pylon sdk --- evently/lib/evently_provider.dart | 2 +- evently/lib/repository/repository.dart | 13 +++++++++++++ evently/lib/screens/detail_screen.dart | 10 +++++----- evently/lib/screens/overview_screen.dart | 11 ++++++++--- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/evently/lib/evently_provider.dart b/evently/lib/evently_provider.dart index 7366f3e496..319eb448b7 100644 --- a/evently/lib/evently_provider.dart +++ b/evently/lib/evently_provider.dart @@ -71,7 +71,7 @@ class EventlyProvider extends ChangeNotifier { String get endTime => _endTime; String get location => _location; String get description => _description; - bool get detailEnable => _isDetailEnable; + bool get isDetailEnable => _isDetailEnable; set setStartDate(String value) { _startDate = value; diff --git a/evently/lib/repository/repository.dart b/evently/lib/repository/repository.dart index 227c4f6767..55d833d46e 100644 --- a/evently/lib/repository/repository.dart +++ b/evently/lib/repository/repository.dart @@ -7,7 +7,14 @@ import 'package:evently/utils/file_utils_helper.dart'; import 'package:injectable/injectable.dart'; abstract class Repository { + /// This function picks a file from device storage + /// Input: [format] it is the file format which needs to be picked from local storage + /// returns [PickedFileModel] the selected file or [Failure] if aborted Future> pickFile(); + + /// This method will generate evently Id for the event + /// Output: [String] the id of the Event that is going to be added in the recipe + String autoGenerateEventlyId(); } @LazySingleton(as: Repository) @@ -26,4 +33,10 @@ class RepositoryImp implements Repository { return Left(PickingFileFailure(message: LocaleKeys.picking_file_error.tr())); } } + + @override + String autoGenerateEventlyId() { + // TODO: implement autoGenerateEaselId + throw UnimplementedError(); + } } diff --git a/evently/lib/screens/detail_screen.dart b/evently/lib/screens/detail_screen.dart index 585e08bbd1..6408b7e44d 100644 --- a/evently/lib/screens/detail_screen.dart +++ b/evently/lib/screens/detail_screen.dart @@ -57,7 +57,7 @@ class _DetailsScreenState extends State { child: EventlyTextField( enable: false, label: LocaleKeys.start_date.tr(), - controller: TextEditingController(), + controller: TextEditingController(text: provider.startDate), textCapitalization: TextCapitalization.sentences, validator: (value) { return null; @@ -69,7 +69,7 @@ class _DetailsScreenState extends State { child: EventlyTextField( enable: false, label: LocaleKeys.end_date.tr(), - controller: TextEditingController(), + controller: TextEditingController(text: provider.endDate), textCapitalization: TextCapitalization.sentences, validator: (value) { return null; @@ -85,7 +85,7 @@ class _DetailsScreenState extends State { child: EventlyTextField( enable: false, label: LocaleKeys.start_time.tr(), - controller: TextEditingController(), + controller: TextEditingController(text: provider.startTime), textCapitalization: TextCapitalization.sentences, validator: (value) { return null; @@ -97,7 +97,7 @@ class _DetailsScreenState extends State { child: EventlyTextField( enable: false, label: LocaleKeys.end_time.tr(), - controller: TextEditingController(), + controller: TextEditingController(text: provider.endTime), textCapitalization: TextCapitalization.sentences, validator: (value) { return null; @@ -135,7 +135,7 @@ class _DetailsScreenState extends State { BottomButtons( onPressContinue: () {}, onPressSaveDraft: () {}, - isContinueEnable: false, + isContinueEnable: provider.isDetailEnable, ), ], ), diff --git a/evently/lib/screens/overview_screen.dart b/evently/lib/screens/overview_screen.dart index 2af00ca246..c0d8c037db 100644 --- a/evently/lib/screens/overview_screen.dart +++ b/evently/lib/screens/overview_screen.dart @@ -93,7 +93,7 @@ class _OverViewScreenState extends State { strokeWidth: 3.h, child: provider.thumbnail != null ? SizedBox( - height: 176, + height: 180, width: double.infinity, child: Stack( alignment: Alignment.center, @@ -104,7 +104,12 @@ class _OverViewScreenState extends State { height: 176, width: double.infinity, ), - GestureDetector(onTap: () => provider.pickThumbnail(), child: SvgPicture.asset(SVGUtils.kSvgUpload)), + GestureDetector( + onTap: () => provider.pickThumbnail(), + child: SvgPicture.asset( + SVGUtils.kSvgUpload, + colorFilter: const ColorFilter.mode(EventlyAppTheme.kWhite, BlendMode.srcIn), + )), ], ), ) @@ -112,7 +117,7 @@ class _OverViewScreenState extends State { onTap: () => provider.pickThumbnail(), child: Container( width: double.infinity, - height: 176, + height: 180, padding: EdgeInsets.symmetric(vertical: 20.w), child: Column( children: [