Add text to search card
This commit is contained in:
parent
42a6f5e412
commit
b5f983d377
|
@ -4,16 +4,18 @@ import 'package:unofficial_jisho_api/api.dart';
|
||||||
|
|
||||||
class SearchResultCard extends StatelessWidget {
|
class SearchResultCard extends StatelessWidget {
|
||||||
final JishoResult _result;
|
final JishoResult _result;
|
||||||
|
const SearchResultCard(this._result);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Row(
|
return Container(
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Text(_result.slug),
|
||||||
child: Container(
|
Text(_result.senses.toString()),
|
||||||
child: Center(
|
],
|
||||||
child: Text(_result.toJson().toString()),
|
|
||||||
),
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
margin: EdgeInsets.symmetric(
|
margin: EdgeInsets.symmetric(
|
||||||
horizontal: 20.0,
|
horizontal: 20.0,
|
||||||
|
@ -30,12 +32,8 @@ class SearchResultCard extends StatelessWidget {
|
||||||
offset: Offset(2, 2), // changes position of shadow
|
offset: Offset(2, 2), // changes position of shadow
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchResultCard(this._result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue