buildDictionaryResult method
The dictionary result unpositioned. See buildDictionary for the positioned version.
Implementation
Widget buildDictionaryResult() {
Color color = appModel.overrideDictionaryColor ?? theme.cardColor;
if ((appModel.overrideDictionaryTheme ?? theme).brightness ==
Brightness.dark) {
color = JidoujishoColor.lighten(color, 0.05);
} else {
color = JidoujishoColor.darken(color, 0.05);
}
return Dismissible(
key: ValueKey(_dictionaryResultNotifier.value),
onDismissed: (dismissDirection) {},
onUpdate: (details) {
if (details.reached) {
onDictionaryDismiss();
}
},
dismissThresholds: const {DismissDirection.horizontal: 0.05},
movementDuration: const Duration(milliseconds: 20),
child: Container(
padding: Spacing.of(context).insets.all.semiSmall,
margin: Spacing.of(context).insets.all.normal,
color: color.withOpacity(dictionaryBackgroundOpacity),
child: Stack(
children: [
buildSearchResult(),
buildDictionaryLoading(),
],
),
),
);
}