|
@@ -61,12 +61,20 @@ class ActionList {
|
|
itemBuilder: (context, index) => items[index],
|
|
itemBuilder: (context, index) => items[index],
|
|
anchorContext: anchorContext,
|
|
anchorContext: anchorContext,
|
|
anchorDirection: AnchorDirection.bottomRight,
|
|
anchorDirection: AnchorDirection.bottomRight,
|
|
- constraints: BoxConstraints.tight(const Size(120, 80)),
|
|
|
|
|
|
+ constraints: BoxConstraints(
|
|
|
|
+ minWidth: 120,
|
|
|
|
+ maxWidth: 280,
|
|
|
|
+ minHeight: items.length * (CreateItem.height),
|
|
|
|
+ maxHeight: items.length * (CreateItem.height),
|
|
|
|
+ ),
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
class CreateItem extends StatelessWidget {
|
|
class CreateItem extends StatelessWidget {
|
|
|
|
+ static const double height = 30;
|
|
|
|
+ static const double verticalPadding = 6;
|
|
|
|
+
|
|
final PluginBuilder pluginBuilder;
|
|
final PluginBuilder pluginBuilder;
|
|
final Function(PluginBuilder) onSelected;
|
|
final Function(PluginBuilder) onSelected;
|
|
const CreateItem({
|
|
const CreateItem({
|
|
@@ -85,11 +93,20 @@ class CreateItem extends StatelessWidget {
|
|
child: GestureDetector(
|
|
child: GestureDetector(
|
|
behavior: HitTestBehavior.opaque,
|
|
behavior: HitTestBehavior.opaque,
|
|
onTap: () => onSelected(pluginBuilder),
|
|
onTap: () => onSelected(pluginBuilder),
|
|
- child: FlowyText.medium(
|
|
|
|
- pluginBuilder.menuName,
|
|
|
|
- color: theme.textColor,
|
|
|
|
- fontSize: 12,
|
|
|
|
- ).padding(horizontal: 10, vertical: 6),
|
|
|
|
|
|
+ child: ConstrainedBox(
|
|
|
|
+ constraints: const BoxConstraints(
|
|
|
|
+ minWidth: 120,
|
|
|
|
+ minHeight: CreateItem.height,
|
|
|
|
+ ),
|
|
|
|
+ child: Align(
|
|
|
|
+ alignment: Alignment.centerLeft,
|
|
|
|
+ child: FlowyText.medium(
|
|
|
|
+ pluginBuilder.menuName,
|
|
|
|
+ color: theme.textColor,
|
|
|
|
+ fontSize: 12,
|
|
|
|
+ ).padding(horizontal: 10),
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
),
|
|
),
|
|
);
|
|
);
|
|
}
|
|
}
|