Design picker
This commit is contained in:
parent
82d7926d44
commit
66bb6fb2fb
|
|
@ -20,14 +20,23 @@ class DesignPicker extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final localization = AppLocalization.of(context);
|
final localization = AppLocalization.of(context);
|
||||||
final store = StoreProvider.of<AppState>(context);
|
final store = StoreProvider.of<AppState>(context);
|
||||||
final designState = store.state.designState;
|
final state = store.state;
|
||||||
|
final designState = state.designState;
|
||||||
|
|
||||||
return AppDropdownButton<String>(
|
return AppDropdownButton<String>(
|
||||||
value: initialValue ?? designState.cleanDesign.id,
|
value: initialValue ?? designState.cleanDesign.id,
|
||||||
onChanged: (dynamic value) => onSelected(designState.map[value]),
|
onChanged: (dynamic value) => onSelected(designState.map[value]),
|
||||||
items: designState.list
|
items: designState.list
|
||||||
.where((designId) =>
|
.where((designId) {
|
||||||
designState.map[designId].isActive || designId == initialValue)
|
/*
|
||||||
|
if (state.isHosted &&
|
||||||
|
!state.isPaidAccount &&
|
||||||
|
!state.account.isTrial) {}
|
||||||
|
*/
|
||||||
|
|
||||||
|
return designState.map[designId].isActive ||
|
||||||
|
designId == initialValue;
|
||||||
|
})
|
||||||
.map((value) => DropdownMenuItem(
|
.map((value) => DropdownMenuItem(
|
||||||
value: value,
|
value: value,
|
||||||
child: Text(designState.map[value].displayName),
|
child: Text(designState.map[value].displayName),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue