mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2025-01-05 19:37:29 +01:00
40 lines
949 B
Dart
40 lines
949 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:unofficial_jisho_api/api.dart';
|
|
|
|
class SearchResultCard extends StatelessWidget {
|
|
final JishoResult _result;
|
|
const SearchResultCard(this._result);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
child: Column(
|
|
children: [
|
|
Text(_result.slug),
|
|
Text(_result.senses.toString()),
|
|
],
|
|
),
|
|
alignment: Alignment.center,
|
|
height: 50.0,
|
|
margin: EdgeInsets.symmetric(
|
|
horizontal: 20.0,
|
|
vertical: 20.0,
|
|
),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
color: Colors.white,
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withOpacity(0.5),
|
|
spreadRadius: 2,
|
|
blurRadius: 1,
|
|
offset: Offset(2, 2), // changes position of shadow
|
|
)
|
|
]),
|
|
);
|
|
}
|
|
|
|
}
|
|
|