Jisho-Study-Tool/lib/components/kanji/kanji__search_page/onyomi.dart

42 lines
1019 B
Dart
Raw Normal View History

2020-07-12 23:58:30 +02:00
import 'package:flutter/material.dart';
class Onyomi extends StatelessWidget {
2020-07-14 15:39:31 +02:00
final List<String> _onyomi;
2020-07-12 23:58:30 +02:00
@override
Widget build(BuildContext context) {
return Container(
2020-07-14 15:39:31 +02:00
margin: EdgeInsets.symmetric(
horizontal: 10.0,
vertical: 5.0,
),
2020-07-16 14:09:03 +02:00
alignment: Alignment.centerLeft,
child: Wrap(
runSpacing: 10.0,
2020-07-14 15:39:31 +02:00
children: _onyomi.map((onyomi) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 10.0),
padding: EdgeInsets.symmetric(
vertical: 10.0,
horizontal: 10.0,
),
child: Text(
onyomi,
style: TextStyle(
fontSize: 20.0,
color: Colors.white,
),
),
decoration: BoxDecoration(
color: Colors.orange,
borderRadius: BorderRadius.circular(10.0),
),
);
}).toList(),
),
2020-07-12 23:58:30 +02:00
);
}
2020-07-14 15:39:31 +02:00
Onyomi(this._onyomi);
}