Skip to content

Commit

Permalink
feat: pylon sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
AhsanRns committed May 10, 2024
1 parent 4d66c9e commit 447aed3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion evently/lib/evently_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 13 additions & 0 deletions evently/lib/repository/repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<Either<Failure, PickedFileModel>> 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)
Expand All @@ -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();
}
}
10 changes: 5 additions & 5 deletions evently/lib/screens/detail_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class _DetailsScreenState extends State<DetailsScreen> {
child: EventlyTextField(
enable: false,
label: LocaleKeys.start_date.tr(),
controller: TextEditingController(),
controller: TextEditingController(text: provider.startDate),
textCapitalization: TextCapitalization.sentences,
validator: (value) {
return null;
Expand All @@ -69,7 +69,7 @@ class _DetailsScreenState extends State<DetailsScreen> {
child: EventlyTextField(
enable: false,
label: LocaleKeys.end_date.tr(),
controller: TextEditingController(),
controller: TextEditingController(text: provider.endDate),
textCapitalization: TextCapitalization.sentences,
validator: (value) {
return null;
Expand All @@ -85,7 +85,7 @@ class _DetailsScreenState extends State<DetailsScreen> {
child: EventlyTextField(
enable: false,
label: LocaleKeys.start_time.tr(),
controller: TextEditingController(),
controller: TextEditingController(text: provider.startTime),
textCapitalization: TextCapitalization.sentences,
validator: (value) {
return null;
Expand All @@ -97,7 +97,7 @@ class _DetailsScreenState extends State<DetailsScreen> {
child: EventlyTextField(
enable: false,
label: LocaleKeys.end_time.tr(),
controller: TextEditingController(),
controller: TextEditingController(text: provider.endTime),
textCapitalization: TextCapitalization.sentences,
validator: (value) {
return null;
Expand Down Expand Up @@ -135,7 +135,7 @@ class _DetailsScreenState extends State<DetailsScreen> {
BottomButtons(
onPressContinue: () {},
onPressSaveDraft: () {},
isContinueEnable: false,
isContinueEnable: provider.isDetailEnable,
),
],
),
Expand Down
11 changes: 8 additions & 3 deletions evently/lib/screens/overview_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class _OverViewScreenState extends State<OverViewScreen> {
strokeWidth: 3.h,
child: provider.thumbnail != null
? SizedBox(
height: 176,
height: 180,
width: double.infinity,
child: Stack(
alignment: Alignment.center,
Expand All @@ -104,15 +104,20 @@ class _OverViewScreenState extends State<OverViewScreen> {
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),
)),
],
),
)
: GestureDetector(
onTap: () => provider.pickThumbnail(),
child: Container(
width: double.infinity,
height: 176,
height: 180,
padding: EdgeInsets.symmetric(vertical: 20.w),
child: Column(
children: [
Expand Down

0 comments on commit 447aed3

Please sign in to comment.