mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2025-01-22 10:24:46 +01:00
Add text to search card
This commit is contained in:
parent
42a6f5e412
commit
b5f983d377
@ -4,38 +4,36 @@ 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(
|
||||||
children: [
|
child: Column(
|
||||||
Expanded(
|
children: [
|
||||||
child: Container(
|
Text(_result.slug),
|
||||||
child: Center(
|
Text(_result.senses.toString()),
|
||||||
child: Text(_result.toJson().toString()),
|
],
|
||||||
),
|
),
|
||||||
height: 50.0,
|
alignment: Alignment.center,
|
||||||
margin: EdgeInsets.symmetric(
|
height: 50.0,
|
||||||
horizontal: 20.0,
|
margin: EdgeInsets.symmetric(
|
||||||
vertical: 20.0,
|
horizontal: 20.0,
|
||||||
),
|
vertical: 20.0,
|
||||||
decoration: BoxDecoration(
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
boxShadow: [
|
color: Colors.white,
|
||||||
BoxShadow(
|
boxShadow: [
|
||||||
color: Colors.grey.withOpacity(0.5),
|
BoxShadow(
|
||||||
spreadRadius: 2,
|
color: Colors.grey.withOpacity(0.5),
|
||||||
blurRadius: 1,
|
spreadRadius: 2,
|
||||||
offset: Offset(2, 2), // changes position of shadow
|
blurRadius: 1,
|
||||||
)
|
offset: Offset(2, 2), // changes position of shadow
|
||||||
]),
|
)
|
||||||
),
|
]),
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchResultCard(this._result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user