mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
PurchaseScreen: Add a fake offering so we can work with this in dev
This commit is contained in:
@ -61,6 +61,25 @@ class _PurchaseScreenState extends State<PurchaseScreen> {
|
||||
|
||||
if (_offerings.length > 1) {
|
||||
_selectedOffering = _offerings[1];
|
||||
} else {
|
||||
var fakePackageJson = {
|
||||
'identifier': 'monthly_fake',
|
||||
'product': {
|
||||
'identifier': 'fake_product',
|
||||
'title': 'Fake Product',
|
||||
'priceString': '0 Fake',
|
||||
'price': 0.0,
|
||||
},
|
||||
};
|
||||
|
||||
var fakeOffer = Offering.fromJson(<String, dynamic>{
|
||||
'identifier': 'monthly_fake_offering',
|
||||
'monthly': fakePackageJson,
|
||||
'availablePackages': [fakePackageJson],
|
||||
});
|
||||
|
||||
_offerings = [fakeOffer];
|
||||
_selectedOffering = _offerings[0];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user