85 lines
2.3 KiB
Dart
85 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:trans_lark/generated/assets.dart';
|
|
|
|
class TLanguageResultBarWidget extends StatelessWidget {
|
|
const TLanguageResultBarWidget({
|
|
super.key,
|
|
required this.fromLanguage,
|
|
required this.toLanguage,
|
|
});
|
|
|
|
final String fromLanguage;
|
|
final String toLanguage;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
children: [
|
|
Expanded(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 10),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
const SizedBox(width: 8),
|
|
Flexible(
|
|
child: Text(
|
|
fromLanguage,
|
|
style: const TextStyle(
|
|
color: Color(0xff435561),
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(width: 20),
|
|
Container(
|
|
width: 26,
|
|
height: 18,
|
|
decoration: BoxDecoration(
|
|
color: const Color(0xff7FD5AA),
|
|
borderRadius: BorderRadius.circular(9),
|
|
),
|
|
child: FittedBox(
|
|
fit: BoxFit.none,
|
|
child: Image.asset(
|
|
Assets.imagesExchangeLanguage,
|
|
color: Colors.white,
|
|
width: 12,
|
|
height: 12,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(width: 20),
|
|
Expanded(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 10),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
const SizedBox(width: 8),
|
|
Flexible(
|
|
child: Text(
|
|
toLanguage,
|
|
style: const TextStyle(
|
|
color: Color(0xff435561),
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|