parent
6952c1cfd0
commit
720dac5438
@ -468,7 +468,7 @@ class _ElevatedButtonWithIconChild extends StatelessWidget {
|
|||||||
final double gap = scale <= 1 ? 8 : lerpDouble(8, 4, math.min(scale - 1, 1))!;
|
final double gap = scale <= 1 ? 8 : lerpDouble(8, 4, math.min(scale - 1, 1))!;
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[icon, SizedBox(width: gap), Flexible(child: label)],
|
children: <Widget>[icon, SizedBox(width: gap), label],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ class _FlatButtonWithIcon extends FlatButton with MaterialButtonWithIconMixin {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
icon,
|
icon,
|
||||||
const SizedBox(width: 8.0),
|
const SizedBox(width: 8.0),
|
||||||
Flexible(child: label),
|
label,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
minWidth: minWidth,
|
minWidth: minWidth,
|
||||||
|
@ -274,7 +274,7 @@ class _OutlineButtonWithIcon extends OutlineButton with MaterialButtonWithIconMi
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
icon,
|
icon,
|
||||||
const SizedBox(width: 8.0),
|
const SizedBox(width: 8.0),
|
||||||
Flexible(child:label),
|
label,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -374,7 +374,7 @@ class _OutlinedButtonWithIconChild extends StatelessWidget {
|
|||||||
final double gap = scale <= 1 ? 8 : lerpDouble(8, 4, math.min(scale - 1, 1))!;
|
final double gap = scale <= 1 ? 8 : lerpDouble(8, 4, math.min(scale - 1, 1))!;
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[icon, SizedBox(width: gap), Flexible(child:label)],
|
children: <Widget>[icon, SizedBox(width: gap), label],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ class _RaisedButtonWithIcon extends RaisedButton with MaterialButtonWithIconMixi
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
icon,
|
icon,
|
||||||
const SizedBox(width: 8.0),
|
const SizedBox(width: 8.0),
|
||||||
Flexible(child: label),
|
label,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -465,7 +465,7 @@ class _TextButtonWithIconChild extends StatelessWidget {
|
|||||||
final double gap = scale <= 1 ? 8 : lerpDouble(8, 4, math.min(scale - 1, 1))!;
|
final double gap = scale <= 1 ? 8 : lerpDouble(8, 4, math.min(scale - 1, 1))!;
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[icon, SizedBox(width: gap), Flexible(child:label)],
|
children: <Widget>[icon, SizedBox(width: gap), label],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1114,26 +1114,6 @@ void main() {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Fixed ElevatedButton.icon RenderFlex overflow', (WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
|
||||||
MaterialApp(
|
|
||||||
home: Scaffold(
|
|
||||||
body: SizedBox(
|
|
||||||
width: 200,
|
|
||||||
child: ElevatedButton.icon(
|
|
||||||
onPressed: () {},
|
|
||||||
icon: const Icon(Icons.add),
|
|
||||||
label: const Text(
|
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a euismod nibh. Morbi laoreet purus.',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
expect(tester.takeException(), null);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextStyle _iconStyle(WidgetTester tester, IconData icon) {
|
TextStyle _iconStyle(WidgetTester tester, IconData icon) {
|
||||||
|
@ -882,26 +882,6 @@ void main() {
|
|||||||
await buildWidget(buttonMinWidth: buttonMinWidth);
|
await buildWidget(buttonMinWidth: buttonMinWidth);
|
||||||
expect(tester.widget<RawMaterialButton>(rawMaterialButtonFinder).constraints.minWidth, buttonMinWidth);
|
expect(tester.widget<RawMaterialButton>(rawMaterialButtonFinder).constraints.minWidth, buttonMinWidth);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Fixed FlatButton.icon RenderFlex overflow', (WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
|
||||||
MaterialApp(
|
|
||||||
home: Scaffold(
|
|
||||||
body: SizedBox(
|
|
||||||
width: 200,
|
|
||||||
child: FlatButton.icon(
|
|
||||||
onPressed: () {},
|
|
||||||
icon: const Icon(Icons.add),
|
|
||||||
label: const Text(
|
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a euismod nibh. Morbi laoreet purus.',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
expect(tester.takeException(), null);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextStyle? _iconStyle(WidgetTester tester, IconData icon) {
|
TextStyle? _iconStyle(WidgetTester tester, IconData icon) {
|
||||||
|
@ -1222,26 +1222,6 @@ void main() {
|
|||||||
expect(box.size, equals(const Size(76, 36)));
|
expect(box.size, equals(const Size(76, 36)));
|
||||||
expect(childRect, equals(const Rect.fromLTRB(372.0, 293.0, 428.0, 307.0)));
|
expect(childRect, equals(const Rect.fromLTRB(372.0, 293.0, 428.0, 307.0)));
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Fixed OutlineButton.icon RenderFlex overflow', (WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
|
||||||
MaterialApp(
|
|
||||||
home: Scaffold(
|
|
||||||
body: SizedBox(
|
|
||||||
width: 200,
|
|
||||||
child: OutlineButton.icon(
|
|
||||||
onPressed: () {},
|
|
||||||
icon: const Icon(Icons.add),
|
|
||||||
label: const Text(
|
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a euismod nibh. Morbi laoreet purus.',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
expect(tester.takeException(), null);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PhysicalModelLayer _findPhysicalLayer(Element element) {
|
PhysicalModelLayer _findPhysicalLayer(Element element) {
|
||||||
|
@ -1290,26 +1290,6 @@ void main() {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Fixed OutlinedButton.icon RenderFlex overflow', (WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
|
||||||
MaterialApp(
|
|
||||||
home: Scaffold(
|
|
||||||
body: SizedBox(
|
|
||||||
width: 200,
|
|
||||||
child: OutlinedButton.icon(
|
|
||||||
onPressed: () {},
|
|
||||||
icon: const Icon(Icons.add),
|
|
||||||
label: const Text(
|
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a euismod nibh. Morbi laoreet purus.',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
expect(tester.takeException(), null);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PhysicalModelLayer _findPhysicalLayer(Element element) {
|
PhysicalModelLayer _findPhysicalLayer(Element element) {
|
||||||
|
@ -727,26 +727,6 @@ void main() {
|
|||||||
expect(paddingRect.top, tallerWidget.top - 5);
|
expect(paddingRect.top, tallerWidget.top - 5);
|
||||||
expect(paddingRect.bottom, tallerWidget.bottom + 12);
|
expect(paddingRect.bottom, tallerWidget.bottom + 12);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Fixed RaisedButton.icon RenderFlex overflow', (WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
|
||||||
MaterialApp(
|
|
||||||
home: Scaffold(
|
|
||||||
body: SizedBox(
|
|
||||||
width: 200,
|
|
||||||
child: RaisedButton.icon(
|
|
||||||
onPressed: () {},
|
|
||||||
icon: const Icon(Icons.add),
|
|
||||||
label: const Text(
|
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a euismod nibh. Morbi laoreet purus.',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
expect(tester.takeException(), null);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextStyle _iconStyle(WidgetTester tester, IconData icon) {
|
TextStyle _iconStyle(WidgetTester tester, IconData icon) {
|
||||||
|
@ -1087,26 +1087,6 @@ void main() {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Fixed TextButton.icon RenderFlex overflow', (WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
|
||||||
MaterialApp(
|
|
||||||
home: Scaffold(
|
|
||||||
body: SizedBox(
|
|
||||||
width: 200,
|
|
||||||
child: TextButton.icon(
|
|
||||||
onPressed: () {},
|
|
||||||
icon: const Icon(Icons.add),
|
|
||||||
label: const Text(
|
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut a euismod nibh. Morbi laoreet purus.',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
expect(tester.takeException(), null);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextStyle? _iconStyle(WidgetTester tester, IconData icon) {
|
TextStyle? _iconStyle(WidgetTester tester, IconData icon) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user