Resolves #348 Button entity refactoring
This commit is contained in:
parent
6508f109f7
commit
d2049b726a
@ -15,25 +15,26 @@ class ButtonEntityContainer extends StatelessWidget {
|
|||||||
if (entityWrapper.entity.statelessType > StatelessEntityType.MISSED) {
|
if (entityWrapper.entity.statelessType > StatelessEntityType.MISSED) {
|
||||||
return Container(width: 0.0, height: 0.0,);
|
return Container(width: 0.0, height: 0.0,);
|
||||||
}
|
}
|
||||||
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () => entityWrapper.handleTap(),
|
onTap: () => entityWrapper.handleTap(),
|
||||||
onLongPress: () => entityWrapper.handleHold(),
|
onLongPress: () => entityWrapper.handleHold(),
|
||||||
|
child: FractionallySizedBox(
|
||||||
|
widthFactor: 1,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
FractionallySizedBox(
|
LayoutBuilder(
|
||||||
widthFactor: 0.4,
|
builder: (BuildContext context, BoxConstraints constraints) {
|
||||||
child: FittedBox(
|
return EntityIcon(
|
||||||
fit: BoxFit.fitHeight,
|
|
||||||
child: EntityIcon(
|
|
||||||
padding: EdgeInsets.fromLTRB(2.0, 6.0, 2.0, 2.0),
|
padding: EdgeInsets.fromLTRB(2.0, 6.0, 2.0, 2.0),
|
||||||
size: Sizes.iconSize,
|
size: constraints.maxWidth / 2.5,
|
||||||
)
|
);
|
||||||
),
|
}
|
||||||
),
|
),
|
||||||
_buildName()
|
_buildName()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
part of '../main.dart';
|
part of '../../main.dart';
|
||||||
|
|
||||||
class CardHeaderWidget extends StatelessWidget {
|
class CardHeaderWidget extends StatelessWidget {
|
||||||
|
|
@ -113,7 +113,7 @@ part 'ui_class/sizes_class.dart';
|
|||||||
part 'ui_class/panel_class.dart';
|
part 'ui_class/panel_class.dart';
|
||||||
part 'ui_widgets/view.dart';
|
part 'ui_widgets/view.dart';
|
||||||
part 'cards/widgets/card_widget.dart';
|
part 'cards/widgets/card_widget.dart';
|
||||||
part 'ui_widgets/card_header_widget.dart';
|
part 'cards/widgets/card_header_widget.dart';
|
||||||
part 'panels/config_panel_widget.dart';
|
part 'panels/config_panel_widget.dart';
|
||||||
part 'panels/widgets/link_to_web_config.dart';
|
part 'panels/widgets/link_to_web_config.dart';
|
||||||
part 'utils/logger.dart';
|
part 'utils/logger.dart';
|
||||||
|
Reference in New Issue
Block a user