Skip to content

Commit

Permalink
feat:fixes on publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
AhsanRns committed May 16, 2024
1 parent cfb55f2 commit 525b08c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 1 addition & 3 deletions evently/lib/evently_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:evently/generated/locale_keys.g.dart';
import 'package:evently/main.dart';
import 'package:evently/models/denom.dart';
import 'package:evently/models/events.dart';
import 'package:evently/models/perks_model.dart';
import 'package:evently/models/picked_file_model.dart';
import 'package:evently/models/storage_response_model.dart';
import 'package:evently/repository/repository.dart';
Expand All @@ -21,7 +20,6 @@ import 'package:pylons_sdk/low_level.dart';

import 'services/third_party_services/quick_node.dart';


@LazySingleton()
class EventlyProvider extends ChangeNotifier {
EventlyProvider({
Expand Down Expand Up @@ -268,7 +266,7 @@ class EventlyProvider extends ChangeNotifier {
description: description,
numberOfTickets: numberOfTickets.toString(),
price: price.toString(),
listOfPerks: perks.map((e) => e.toString()).toList(),
listOfPerks: perks.join(','),
);

final recipe = event.createRecipe(
Expand Down
23 changes: 12 additions & 11 deletions evently/lib/models/events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class Events extends Equatable {

factory Events.fromRecipe(Recipe recipe) {
Map<String, String> map = _extractAttributeValues(recipe.entries.itemOutputs[0].strings);

return Events(
eventName: map[kEventName]!,
hostName: map[kEventHostName]!,
Expand Down Expand Up @@ -80,9 +79,12 @@ class Events extends Equatable {
case kEndTime:
case kLocation:
case kDescription:
case kPerks:
case kNumberOfTickets:
case kPrice:
case kPerks:
case kFreeDrop:
case kCookBookId:
case kRecipeId:
attributeValues[attribute.key] = attribute.value;
break;
default:
Expand Down Expand Up @@ -189,11 +191,10 @@ const kCookBookId = "kCookBookId";
const kVersion = "v0.2.0";
const kUpylon = "upylon";
const kPylonSymbol = 'upylon';
const String transferFeeAmount = '1';
const transferFeeAmount = '1';
const kEventlyEvent = "Evently_Event";
const kExtraInfo = "extraInfo";
const String costPerBlock = '0';

const costPerBlock = '0';

class PerksModel {
PerksModel({required this.name, required this.description});
Expand All @@ -202,14 +203,14 @@ class PerksModel {
final String description;

factory PerksModel.updateName({required String name, required PerksModel perksModel}) => PerksModel(
name: name,
description: perksModel.description,
);
name: name,
description: perksModel.description,
);

factory PerksModel.updateDescription({required String description, required PerksModel perksModel}) => PerksModel(
name: perksModel.name,
description: description,
);
name: perksModel.name,
description: description,
);

@override
String toString() {
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion evently/lib/screens/perks_screen.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:evently/evently_provider.dart';
import 'package:evently/generated/locale_keys.g.dart';
import 'package:evently/models/perks_model.dart';
import 'package:evently/models/events.dart';
import 'package:evently/screens/custom_widgets/bottom_buttons.dart';
import 'package:evently/screens/custom_widgets/page_app_bar.dart';
import 'package:evently/screens/custom_widgets/step_labels.dart';
Expand Down
1 change: 1 addition & 0 deletions evently/lib/screens/price_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:evently/evently_provider.dart';
import 'package:evently/models/events.dart';
import 'package:evently/screens/custom_widgets/bottom_buttons.dart';
import 'package:evently/screens/custom_widgets/page_app_bar.dart';
import 'package:evently/screens/custom_widgets/step_labels.dart';
Expand Down

0 comments on commit 525b08c

Please sign in to comment.