Skip to content

fix: Retire the dynamic configuration extracted from the pubspec.yaml file - #340

Open
JlUgia wants to merge 2 commits into
mainfrom
statically-generated-package-matadata
Open

JlUgia wants to merge 2 commits into
mainfrom
statically-generated-package-matadata

Conversation

@JlUgia

@JlUgia JlUgia commented Sep 14, 2026

Copy link
Copy Markdown
Member

This PR moves away from dynamically loading the pubspec.yaml in avor of a static file that gets generated and overwritten at release time

Related: #331

…avor of a static file that gets generated and overwritten at release time
@JlUgia
JlUgia requested a review from dmengelt September 16, 2026 11:06

import 'package:flutter/services.dart';

import 'package:yaml/yaml.dart';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I guess we can also remove the dependency from pubspec.yaml?

/// Retrieves package information from the `pubspec.yaml` file as a [Map].
static Future<Map<dynamic, dynamic>> _getPackageConfiguration() async {
final configurationFile = await rootBundle
.loadString('packages/pay_platform_interface/pubspec.yaml');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: same here. pubspec.yaml can be removed from the assets entry in pubspec.yaml?


/// Returns the core configuration map in this object.
Future<Map<String, dynamic>> parameterMap() async {
Map<String, dynamic> parameterMap() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this be a breaking change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants