wt1.1.2f fix for 1.1.3
This commit is contained in:
@@ -5,12 +5,12 @@ import 'package:bloc/bloc.dart';
|
||||
|
||||
class ImageButton extends StatelessWidget {
|
||||
final String text;
|
||||
final TextStyle style;
|
||||
TextStyle style = TextStyle(fontSize: 14);
|
||||
final String image;
|
||||
final double top;
|
||||
final double left;
|
||||
final double height;
|
||||
final double width;
|
||||
double width = 180;
|
||||
final bool isShape;
|
||||
final Bloc bloc;
|
||||
final Alignment textAlignment;
|
||||
@@ -30,10 +30,15 @@ class ImageButton extends StatelessWidget {
|
||||
this.textAlignment,
|
||||
this.onTap,
|
||||
@required this.isLocked
|
||||
});
|
||||
}) {
|
||||
width = width ?? 180;
|
||||
style = style ?? TextStyle(fontSize: 14, fontFamily: "Roboto Mono");
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double top = width - (style.fontSize - 5) * text.length < 0 ? width - 2 * style.fontSize - 10 : width - style.fontSize - 10;
|
||||
print ("Top: " + top.toStringAsFixed(0) + " length: " + ((style.fontSize - 5) * text.length).toString());
|
||||
return Stack(
|
||||
//alignment: textAlignment,
|
||||
fit: StackFit.passthrough,
|
||||
@@ -63,11 +68,11 @@ class ImageButton extends StatelessWidget {
|
||||
)]
|
||||
),
|
||||
Positioned(
|
||||
top: text.length > 20 ? 140 : 160,
|
||||
top: top,
|
||||
left: left,
|
||||
child: Container(
|
||||
height: 200,
|
||||
width: 180,
|
||||
height: width - 2 * left,
|
||||
width: width - 2 * left,
|
||||
child: InkWell(
|
||||
onTap: onTap ?? onTap,
|
||||
child: Text(
|
||||
|
||||
Reference in New Issue
Block a user